From: Simon McVittie Date: Tue, 10 Jan 2012 15:56:08 +0000 (+0000) Subject: Header parsing test: verify that a full URI can appear after the "GET" X-Git-Tag: LIBSOUP_2_37_5~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=13cead1bafe6695ef8f7964c4bde9db1c7262027;p=platform%2Fupstream%2Flibsoup.git 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 Reviewed-by: Dan Winship --- diff --git a/tests/header-parsing.c b/tests/header-parsing.c index 626b27c..fcdd550 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 ***/ /****************************/