diff options
author | joe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845> | 2008-01-30 16:59:35 +0000 |
---|---|---|
committer | joe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845> | 2008-01-30 16:59:35 +0000 |
commit | 3368ebf1e889887ce80598fd12c7548a760ba0b4 (patch) | |
tree | 7a9ae4122566c7e43e9642db5911d1c4ab8901fc /test/basic.c | |
parent | 0d96000eb77c8b45662e4362f164b01ece06d3a2 (diff) | |
download | neon-3368ebf1e889887ce80598fd12c7548a760ba0b4.tar.gz |
* src/ne_basic.c (dispatch_to_fd): Fix handling of ranged PUT with
unspecified length. (Submitted by Henrik Holst <henrik witsbits.com>)
* test/basic. (get_eof_range): New test case.
git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@1306 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
Diffstat (limited to 'test/basic.c')
-rw-r--r-- | test/basic.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/test/basic.c b/test/basic.c index 3b5fae1..f149ed4 100644 --- a/test/basic.c +++ b/test/basic.c @@ -1,6 +1,6 @@ /* Tests for high-level HTTP interface (ne_basic.h) - Copyright (C) 2002-2006, Joe Orton <joe@manyfish.co.uk> + Copyright (C) 2002-2008, Joe Orton <joe@manyfish.co.uk> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -167,6 +167,14 @@ static int get_range(void) "Content-Length: 10\r\n\r\nabcdefghij"); } +static int get_eof_range(void) +{ + return do_range(1, -1, NULL, + "HTTP/1.1 206 Widgets\r\n" "Connection: close\r\n" + "Content-Range: bytes 1-10/10\r\n" + "Content-Length: 10\r\n\r\nabcdefghij"); +} + static int fail_range_length(void) { return do_range(1, 10, "range response length mismatch should fail", @@ -267,6 +275,7 @@ ne_test tests[] = { T(lookup_localhost), T(content_type), T(get_range), + T(get_eof_range), T(fail_range_length), T(fail_range_units), T(fail_range_notrange), |