+ size_t max_segments = strlen(subject) / 2;
+ char **url_segments = malloc(max_segments * sizeof(char *));
+ int segments;
+
+ if (NULL == url_segments)
+ {
+ log_error(LOG_LEVEL_ERROR, "Out of memory while decoding URL: %s", new_url);
+ freez(subject);
+ return NULL;
+ }
+
+ segments = ssplit(subject, "?&", url_segments, max_segments, 1, 1);
+
+ while (segments-- > 0)