[libsoup] Header parsing test: verify that a full URI can appear after the "GET"
- From: Simon McVittie <smcv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsoup] Header parsing test: verify that a full URI can appear after the "GET"
- Date: Fri, 3 Feb 2012 14:26:25 +0000 (UTC)
commit 13cead1bafe6695ef8f7964c4bde9db1c7262027
Author: Simon McVittie <simon mcvittie collabora co uk>
Date: Tue Jan 10 15:56:08 2012 +0000
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>
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 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 ***/
/****************************/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]