http://bugzilla.gnome.org/show_bug.cgi?id=594405
/* Find query */
question = memchr (uri_string, '?', end - uri_string);
if (question) {
- if (question[1]) {
- uri->query = uri_normalized_copy (question + 1,
- end - (question + 1),
- NULL, TRUE);
- if (!uri->query) {
- soup_uri_free (uri);
- return NULL;
- }
+ uri->query = uri_normalized_copy (question + 1,
+ end - (question + 1),
+ NULL, TRUE);
+ if (!uri->query) {
+ soup_uri_free (uri);
+ return NULL;
}
end = question;
}
/* Try to recover certain kinds of invalid URIs */
{ "http://host/path with spaces",
- "http://host/path%20with%20spaces" }
+ "http://host/path%20with%20spaces" },
+
+ /* Bug 594405; 0-length is different from not-present */
+ { "http://host/path?", "http://host/path?" },
+ { "http://host/path#", "http://host/path#" }
};
static int num_abs_tests = G_N_ELEMENTS(abs_tests);