Permalink
Browse files

now we allow DELETE requests with chunked request bodies per hoodoos'…

…s request; also, we no longer bundle Test::Nginx with us.
  • Loading branch information...
1 parent 9126393 commit b0a3ee38e398f7b1405dfac84581903b093d67c5 @agentzh committed Feb 8, 2011
View
@@ -20,7 +20,7 @@ test/blib
test.sh
t.sh
t/t.sh
-test/t/servroot/
+t/servroot/
releng
reset
*.t_
@@ -35,3 +35,7 @@ src/util.h
src/module.h
src/body.c
src/util.c
+ctags
+go
+util/gprof
+all.sh
@@ -304,7 +304,8 @@ ngx_http_chunkin_resume_handler(ngx_http_request_t *r) {
dd("method: %.*s (%d)", (int) r->method_name.len, r->method_name.data, (int) r->method);
if (!conf->enabled || r != r->main
- || (r->method != NGX_HTTP_PUT && r->method != NGX_HTTP_POST))
+ || (r->method != NGX_HTTP_PUT && r->method != NGX_HTTP_POST &&
+ r->method != NGX_HTTP_DELETE))
{
dd("conf not enabled or in subrequest or not POST nor PUT requests");
View
@@ -1,6 +1,6 @@
-# vi:filetype=perl
+# vi:filetype=
-use lib 'lib';
+use lib 't/lib';
use Test::Nginx::Socket::Chunkin;
repeat_each(3);
@@ -554,3 +554,25 @@ User-Agent: SonyEricssonW395/R1BA010 Profile/MIDP-2.1 Configuration/CLDC-1.1 UNT
--- timeout: 60
--- SKIP
+
+
+=== TEST 24: binary in data
+--- config
+ chunkin on;
+ location /ar.do {
+ echo $request_method;
+ echo_request_body;
+ }
+--- more_headers
+Transfer-Encoding: chunked
+--- request eval
+"DELETE /ar.do
+5\r
+hello\r
+0\r
+\r
+"
+--- response_body chop
+DELETE
+hello
+
@@ -1,6 +1,6 @@
-# vi:filetype=perl
+# vi:filetype=
-use lib 'lib';
+use lib 't/lib';
use Test::Nginx::Socket::Chunkin;
plan tests => repeat_each() * 2 * blocks();
View
@@ -1,6 +1,6 @@
-# vi:filetype=perl
+# vi:filetype=
-use lib 'lib';
+use lib 't/lib';
use Test::Nginx::Socket::Chunkin;
plan tests => repeat_each() * 2 * blocks();
@@ -1,6 +1,6 @@
-# vi:filetype=perl
+# vi:filetype=
-use lib 'lib';
+use lib 't/lib';
use Test::Nginx::LWP::Chunkin;
plan tests => repeat_each() * 2 * blocks();
@@ -1,6 +1,6 @@
-# vi:filetype=perl
+# vi:filetype=
-use lib 'lib';
+use lib 't/lib';
my $skip_all;
@@ -1,6 +1,6 @@
-# vi:filetype=perl
+# vi:filetype=
-use lib 'lib';
+use lib 't/lib';
use Test::Nginx::LWP::Chunkin;
plan tests => repeat_each() * 2 * blocks();
@@ -1,6 +1,6 @@
-# vi:filetype=perl
+# vi:filetype=
-use lib 'lib';
+use lib 't/lib';
use Test::Nginx::Socket::Chunkin;
#worker_connections(1024);
@@ -1,6 +1,6 @@
# vi:ft=
-use lib 'lib';
+use lib 't/lib';
use Test::Nginx::LWP::Chunkin;
plan tests => repeat_each() * 2 * blocks();
@@ -1,6 +1,6 @@
-# vi:filetype=perl
+# vi:filetype=
-use lib 'lib';
+use lib 't/lib';
use Test::Nginx::Socket::Chunkin;
plan tests => repeat_each() * 2 * blocks();
Oops, something went wrong.

0 comments on commit b0a3ee3

Please sign in to comment.