diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2012-01-10 15:56:08 +0000 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2012-02-03 13:50:19 +0000 |
commit | 13cead1bafe6695ef8f7964c4bde9db1c7262027 (patch) | |
tree | 457f3e861aa9f85db395cc235be9bf2add69c1ef /tests/header-parsing.c | |
parent | bac2bd836978190f4eebf7d2f9b8bdc37d767a9d (diff) | |
download | libsoup-13cead1bafe6695ef8f7964c4bde9db1c7262027.tar.gz libsoup-13cead1bafe6695ef8f7964c4bde9db1c7262027.tar.bz2 libsoup-13cead1bafe6695ef8f7964c4bde9db1c7262027.zip |
Header parsing test: verify that a full URI can appear after the "GET"
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=667637
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Dan Winship <danw@gnome.org>
Diffstat (limited to 'tests/header-parsing.c')
-rw-r--r-- | tests/header-parsing.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/header-parsing.c b/tests/header-parsing.c index 626b27c7..fcdd5503 100644 --- a/tests/header-parsing.c +++ b/tests/header-parsing.c @@ -177,6 +177,30 @@ static struct RequestTest { } }, + { "GET with full URI", + "GET http://example.com HTTP/1.1\r\n", -1, + SOUP_STATUS_OK, + "GET", "http://example.com", SOUP_HTTP_1_1, + { { NULL } } + }, + + { "GET with full URI in upper-case", + "GET HTTP://example.com HTTP/1.1\r\n", -1, + SOUP_STATUS_OK, + "GET", "HTTP://example.com", SOUP_HTTP_1_1, + { { NULL } } + }, + + /* It's better for this to be passed through: this means a SoupServer + * could implement ftp-over-http proxying, for instance + */ + { "GET with full URI of unrecognised scheme", + "GET AbOuT: HTTP/1.1\r\n", -1, + SOUP_STATUS_OK, + "GET", "AbOuT:", SOUP_HTTP_1_1, + { { NULL } } + }, + /****************************/ /*** RECOVERABLE REQUESTS ***/ /****************************/ |