diff options
author | joe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845> | 2007-08-10 10:29:26 +0000 |
---|---|---|
committer | joe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845> | 2007-08-10 10:29:26 +0000 |
commit | c5560c55cc241aeb952b0530e5d1f4682f288168 (patch) | |
tree | b7e4b69e7a70e79487b58e954d50ff1f2cb1fa1d /test/request.c | |
parent | aa44aa13368eac43690c8a91d7b872e494c7c4e3 (diff) | |
download | neon-c5560c55cc241aeb952b0530e5d1f4682f288168.tar.gz |
* src/ne_request.c (ne_begin_request): Ignore the "identity"
transfer-coding since "privoxy" apparently sends it. Fail for unknown
transfer-codings.
* test/request.c (te_identity): New test, replacing any_te_header.
(fail_on_invalid): Test for failure with unknown transfer-codings.
* doc/using.xml: Update section on transfer-encoding interpretation.
git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@1219 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
Diffstat (limited to 'test/request.c')
-rw-r--r-- | test/request.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/test/request.c b/test/request.c index da7931f..257d354 100644 --- a/test/request.c +++ b/test/request.c @@ -303,13 +303,15 @@ static int te_header(void) "\r\n" ABCDE_CHUNKS); } -/* test that the presence of *any* t-e header implies a chunked - * response. */ -static int any_te_header(void) +static int te_identity(void) { - return expect_response("abcde", single_serve_string, RESP200 - "Transfer-Encoding: punked\r\n" "\r\n" - ABCDE_CHUNKS); + /* http://bugzilla.gnome.org/show_bug.cgi?id=310636 says privoxy + * uses the "identity" transfer-coding. */ + return expect_response("abcde", single_serve_string, + RESP200 "Transfer-Encoding: identity\r\n" + "Content-Length: 5\r\n" + "\r\n" + "abcde"); } static int chunk_numeric(void) @@ -1558,6 +1560,9 @@ static int fail_on_invalid(void) static const struct { const char *resp, *error; } ts[] = { + /* non-chunked TE. */ + { RESP200 "transfer-encoding: punked\r\n" "\r\n" ABCDE_CHUNKS , + "Unknown transfer-coding" }, /* chunk without trailing CRLF */ { RESP200 TE_CHUNKED "\r\n" "5\r\n" "abcdeFISH", "delimiter was invalid" }, @@ -2042,7 +2047,7 @@ ne_test tests[] = { T(no_headers), T(chunks), T(te_header), - T(any_te_header), + T(te_identity), T(reason_phrase), T(chunk_numeric), T(chunk_extensions), |