summaryrefslogtreecommitdiff
path: root/tests/uri-parsing.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2009-03-23 21:39:40 +0000
committerDan Winship <danw@src.gnome.org>2009-03-23 21:39:40 +0000
commitd1efe3dad63edf97a2bc7b06cd7c1c9c9603ac31 (patch)
treefcee73b46dbbc7710969f2679a03cc0a18e23800 /tests/uri-parsing.c
parent035ecf09bfe1f671ca88f41d59879928b614f39a (diff)
downloadlibsoup-d1efe3dad63edf97a2bc7b06cd7c1c9c9603ac31.tar.gz
Bug 566530 - Handle (illegal) unencoded spaces in URIs
* libsoup/soup-uri.c (uri_normalized_copy): optionally fix up parts with unencoded spaces in them. (soup_uri_new_with_base): tell uri_normalized_copy() to fix up spaces in the path and query components * tests/uri-parsing.c (abs_tests): test parsing and unparsing a URI with an unencoded space in it. * tests/redirect-test.c (tests, server_callback): add a test of redirecting to a URI with an unencoded space in it. svn path=/trunk/; revision=1252
Diffstat (limited to 'tests/uri-parsing.c')
-rw-r--r--tests/uri-parsing.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/uri-parsing.c b/tests/uri-parsing.c
index 52d52717..407ddfd7 100644
--- a/tests/uri-parsing.c
+++ b/tests/uri-parsing.c
@@ -57,7 +57,11 @@ static struct {
{ "http://[::FFFF:129.144.52.38]:80/index.html",
"http://[::FFFF:129.144.52.38]/index.html" },
{ "http://[2010:836B:4179::836B:4179]",
- "http://[2010:836B:4179::836B:4179]/" }
+ "http://[2010:836B:4179::836B:4179]/" },
+
+ /* Try to recover certain kinds of invalid URIs */
+ { "http://host/path with spaces",
+ "http://host/path%20with%20spaces" }
};
static int num_abs_tests = G_N_ELEMENTS(abs_tests);