798
800
--- response_body
805
=== TEST 32: test memcached with subrequests
808
server 127.0.0.1:$TEST_NGINX_MEMCACHED_PORT;
809
keepalive 100 single;
813
set $memc_key some_key;
814
set $memc_exptime 600;
820
res = ngx.location.capture("/memc",
821
{ method = ngx.HTTP_PUT, body = "hello 1234" });
822
-- ngx.say("PUT: " .. res.status);
824
res = ngx.location.capture("/memc");
825
ngx.say("some_key: " .. res.body);
833
lua reuse free buf chain, but reallocate memory because
839
=== TEST 33: main POST, sub GET (main does not read the body)
842
default_type 'foo/bar';
845
ngx.say(ngx.var.request_method)
846
ngx.say(ngx.req.get_body_data())
851
proxy_pass http://127.0.0.1:$server_port/other;
852
#proxy_pass http://127.0.0.1:8892/other;
857
res = ngx.location.capture("/foo",
858
{ method = ngx.HTTP_GET });
874
=== TEST 34: main POST, sub GET (main has read the body)
877
default_type 'foo/bar';
880
ngx.say(ngx.var.request_method)
881
ngx.say(ngx.req.get_body_data())
886
proxy_pass http://127.0.0.1:$server_port/other;
887
#proxy_pass http://127.0.0.1:8892/other;
894
res = ngx.location.capture("/foo",
895
{ method = ngx.HTTP_GET });
911
=== TEST 35: main POST, sub POST (inherit bodies directly)
914
default_type 'foo/bar';
917
ngx.say(ngx.var.request_method)
918
ngx.say(ngx.req.get_body_data())
923
proxy_pass http://127.0.0.1:$server_port/other;
924
#proxy_pass http://127.0.0.1:8892/other;
931
res = ngx.location.capture("/foo",
932
{ method = ngx.HTTP_POST });
948
=== TEST 36: main POST, sub PUT (inherit bodies directly)
951
default_type 'foo/bar';
954
ngx.say(ngx.var.request_method)
955
ngx.say(ngx.req.get_body_data())
960
proxy_pass http://127.0.0.1:$server_port/other;
961
#proxy_pass http://127.0.0.1:8892/other;
968
res = ngx.location.capture("/foo",
969
{ method = ngx.HTTP_PUT });
985
=== TEST 37: recursive calls
989
ngx.location.capture("/t")
996
subrequests cycle while processing "/t"
1000
=== TEST 38: OPTIONS
1003
default_type 'foo/bar';
1004
echo $echo_request_method;
1009
res = ngx.location.capture("/other",
1010
{ method = ngx.HTTP_OPTIONS });
1024
=== TEST 39: OPTIONS with a body
1027
default_type 'foo/bar';
1028
echo $echo_request_method;
1034
res = ngx.location.capture("/other",
1035
{ method = ngx.HTTP_OPTIONS, body = "hello world" });
1042
--- response_body chop