Mercurial > hg > nginx-tests
annotate dav.t @ 1930:0e8b5b442b1d
Tests: basic QUIC key update tests.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Fri, 18 Aug 2023 17:03:34 +0400 |
parents | 5ac6efbe5552 |
children | 2a0a6035a1af |
rev | line source |
---|---|
141
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1 #!/usr/bin/perl |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2 |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
3 # (C) Maxim Dounin |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
4 |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
5 # Tests for nginx dav module. |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
6 |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
7 ############################################################################### |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
8 |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
9 use warnings; |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
10 use strict; |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
11 |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
12 use Test::More; |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
13 |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
14 BEGIN { use FindBin; chdir($FindBin::Bin); } |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
15 |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
16 use lib 'lib'; |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
17 use Test::Nginx; |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
18 |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
19 ############################################################################### |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
20 |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
21 select STDERR; $| = 1; |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
22 select STDOUT; $| = 1; |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
23 |
1691
0d8531f744bc
Tests: added Location header escaping tests (ticket #882).
Sergey Kandaurov <pluknet@nginx.com>
parents:
1541
diff
changeset
|
24 my $t = Test::Nginx->new()->has(qw/http dav/)->plan(28); |
141
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
25 |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
26 $t->write_file_expand('nginx.conf', <<'EOF'); |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
27 |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
28 %%TEST_GLOBALS%% |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
29 |
249
6a0d934950bc
Tests: remove extra spaces in "daemon off".
Maxim Dounin <mdounin@mdounin.ru>
parents:
176
diff
changeset
|
30 daemon off; |
141
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
31 |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
32 events { |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
33 } |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
34 |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
35 http { |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
36 %%TEST_GLOBALS_HTTP%% |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
37 |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
38 server { |
974
882267679006
Tests: simplified parallel modifications in tests.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
952
diff
changeset
|
39 listen 127.0.0.1:8080; |
141
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
40 server_name localhost; |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
41 |
1536
0ce1c9516764
Tests: dav.t MKCOL test for trailing slash in Location (if any).
Sergey Kandaurov <pluknet@nginx.com>
parents:
1535
diff
changeset
|
42 absolute_redirect off; |
0ce1c9516764
Tests: dav.t MKCOL test for trailing slash in Location (if any).
Sergey Kandaurov <pluknet@nginx.com>
parents:
1535
diff
changeset
|
43 |
141
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
44 location / { |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
45 dav_methods PUT DELETE MKCOL COPY MOVE; |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
46 } |
1150
ccf134a800ae
Tests: added Location tests with alias for dav and static modules.
Sergey Kandaurov <pluknet@nginx.com>
parents:
974
diff
changeset
|
47 |
ccf134a800ae
Tests: added Location tests with alias for dav and static modules.
Sergey Kandaurov <pluknet@nginx.com>
parents:
974
diff
changeset
|
48 location /i/ { |
ccf134a800ae
Tests: added Location tests with alias for dav and static modules.
Sergey Kandaurov <pluknet@nginx.com>
parents:
974
diff
changeset
|
49 alias %%TESTDIR%%/; |
ccf134a800ae
Tests: added Location tests with alias for dav and static modules.
Sergey Kandaurov <pluknet@nginx.com>
parents:
974
diff
changeset
|
50 dav_methods PUT DELETE MKCOL COPY MOVE; |
ccf134a800ae
Tests: added Location tests with alias for dav and static modules.
Sergey Kandaurov <pluknet@nginx.com>
parents:
974
diff
changeset
|
51 } |
141
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
52 } |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
53 } |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
54 |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
55 EOF |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
56 |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
57 $t->run(); |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
58 |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
59 ############################################################################### |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
60 |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
61 my $r; |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
62 |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
63 $r = http(<<EOF . '0123456789'); |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
64 PUT /file HTTP/1.1 |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
65 Host: localhost |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
66 Connection: close |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
67 Content-Length: 10 |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
68 |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
69 EOF |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
70 |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
71 like($r, qr/201 Created.*(Content-Length|\x0d\0a0\x0d\x0a)/ms, 'put file'); |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
72 is(-s $t->testdir() . '/file', 10, 'put file size'); |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
73 |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
74 $r = http(<<EOF); |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
75 PUT /file HTTP/1.1 |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
76 Host: localhost |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
77 Connection: close |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
78 Content-Length: 0 |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
79 |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
80 EOF |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
81 |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
82 like($r, qr/204 No Content/, 'put file again'); |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
83 unlike($r, qr/Content-Length|Transfer-Encoding/, 'no length in 204'); |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
84 is(-s $t->testdir() . '/file', 0, 'put file again size'); |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
85 |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
86 $r = http(<<EOF); |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
87 DELETE /file HTTP/1.1 |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
88 Host: localhost |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
89 Connection: close |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
90 Content-Length: 0 |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
91 |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
92 EOF |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
93 |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
94 like($r, qr/204 No Content/, 'delete file'); |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
95 unlike($r, qr/Content-Length|Transfer-Encoding/, 'no length in 204'); |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
96 ok(!-f $t->testdir() . '/file', 'file deleted'); |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
97 |
154
2644bad81b0b
Tests: add test for preread body and extra data problem.
Maxim Dounin <mdounin@mdounin.ru>
parents:
141
diff
changeset
|
98 $r = http(<<EOF . '0123456789' . 'extra'); |
2644bad81b0b
Tests: add test for preread body and extra data problem.
Maxim Dounin <mdounin@mdounin.ru>
parents:
141
diff
changeset
|
99 PUT /file HTTP/1.1 |
2644bad81b0b
Tests: add test for preread body and extra data problem.
Maxim Dounin <mdounin@mdounin.ru>
parents:
141
diff
changeset
|
100 Host: localhost |
2644bad81b0b
Tests: add test for preread body and extra data problem.
Maxim Dounin <mdounin@mdounin.ru>
parents:
141
diff
changeset
|
101 Connection: close |
2644bad81b0b
Tests: add test for preread body and extra data problem.
Maxim Dounin <mdounin@mdounin.ru>
parents:
141
diff
changeset
|
102 Content-Length: 10 |
2644bad81b0b
Tests: add test for preread body and extra data problem.
Maxim Dounin <mdounin@mdounin.ru>
parents:
141
diff
changeset
|
103 |
2644bad81b0b
Tests: add test for preread body and extra data problem.
Maxim Dounin <mdounin@mdounin.ru>
parents:
141
diff
changeset
|
104 EOF |
2644bad81b0b
Tests: add test for preread body and extra data problem.
Maxim Dounin <mdounin@mdounin.ru>
parents:
141
diff
changeset
|
105 |
2644bad81b0b
Tests: add test for preread body and extra data problem.
Maxim Dounin <mdounin@mdounin.ru>
parents:
141
diff
changeset
|
106 like($r, qr/201 Created.*(Content-Length|\x0d\0a0\x0d\x0a)/ms, |
2644bad81b0b
Tests: add test for preread body and extra data problem.
Maxim Dounin <mdounin@mdounin.ru>
parents:
141
diff
changeset
|
107 'put file extra data'); |
2644bad81b0b
Tests: add test for preread body and extra data problem.
Maxim Dounin <mdounin@mdounin.ru>
parents:
141
diff
changeset
|
108 is(-s $t->testdir() . '/file', 10, |
2644bad81b0b
Tests: add test for preread body and extra data problem.
Maxim Dounin <mdounin@mdounin.ru>
parents:
141
diff
changeset
|
109 'put file extra data size'); |
2644bad81b0b
Tests: add test for preread body and extra data problem.
Maxim Dounin <mdounin@mdounin.ru>
parents:
141
diff
changeset
|
110 |
1691
0d8531f744bc
Tests: added Location header escaping tests (ticket #882).
Sergey Kandaurov <pluknet@nginx.com>
parents:
1541
diff
changeset
|
111 TODO: { |
0d8531f744bc
Tests: added Location header escaping tests (ticket #882).
Sergey Kandaurov <pluknet@nginx.com>
parents:
1541
diff
changeset
|
112 local $TODO = 'not yet' unless $t->has_version('1.21.0'); |
0d8531f744bc
Tests: added Location header escaping tests (ticket #882).
Sergey Kandaurov <pluknet@nginx.com>
parents:
1541
diff
changeset
|
113 |
0d8531f744bc
Tests: added Location header escaping tests (ticket #882).
Sergey Kandaurov <pluknet@nginx.com>
parents:
1541
diff
changeset
|
114 $r = http(<<EOF . '0123456789'); |
0d8531f744bc
Tests: added Location header escaping tests (ticket #882).
Sergey Kandaurov <pluknet@nginx.com>
parents:
1541
diff
changeset
|
115 PUT /file%20sp HTTP/1.1 |
0d8531f744bc
Tests: added Location header escaping tests (ticket #882).
Sergey Kandaurov <pluknet@nginx.com>
parents:
1541
diff
changeset
|
116 Host: localhost |
0d8531f744bc
Tests: added Location header escaping tests (ticket #882).
Sergey Kandaurov <pluknet@nginx.com>
parents:
1541
diff
changeset
|
117 Connection: close |
0d8531f744bc
Tests: added Location header escaping tests (ticket #882).
Sergey Kandaurov <pluknet@nginx.com>
parents:
1541
diff
changeset
|
118 Content-Length: 10 |
0d8531f744bc
Tests: added Location header escaping tests (ticket #882).
Sergey Kandaurov <pluknet@nginx.com>
parents:
1541
diff
changeset
|
119 |
0d8531f744bc
Tests: added Location header escaping tests (ticket #882).
Sergey Kandaurov <pluknet@nginx.com>
parents:
1541
diff
changeset
|
120 EOF |
0d8531f744bc
Tests: added Location header escaping tests (ticket #882).
Sergey Kandaurov <pluknet@nginx.com>
parents:
1541
diff
changeset
|
121 |
0d8531f744bc
Tests: added Location header escaping tests (ticket #882).
Sergey Kandaurov <pluknet@nginx.com>
parents:
1541
diff
changeset
|
122 like($r, qr!Location: /file%20sp\x0d?$!ms, 'put file escaped'); |
0d8531f744bc
Tests: added Location header escaping tests (ticket #882).
Sergey Kandaurov <pluknet@nginx.com>
parents:
1541
diff
changeset
|
123 |
0d8531f744bc
Tests: added Location header escaping tests (ticket #882).
Sergey Kandaurov <pluknet@nginx.com>
parents:
1541
diff
changeset
|
124 } |
0d8531f744bc
Tests: added Location header escaping tests (ticket #882).
Sergey Kandaurov <pluknet@nginx.com>
parents:
1541
diff
changeset
|
125 |
141
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
126 # 201 replies contain body, response should indicate it's empty |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
127 |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
128 $r = http(<<EOF); |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
129 MKCOL /test/ HTTP/1.1 |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
130 Host: localhost |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
131 Connection: close |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
132 |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
133 EOF |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
134 |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
135 like($r, qr/201 Created.*(Content-Length|\x0d\0a0\x0d\x0a)/ms, 'mkcol'); |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
136 |
1541
b9de5364dfc9
Tests: unbreak dav tests on Perl < 5.12.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1538
diff
changeset
|
137 SKIP: { |
b9de5364dfc9
Tests: unbreak dav tests on Perl < 5.12.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1538
diff
changeset
|
138 skip 'perl too old', 1 if !$^V or $^V lt v5.12.0; |
b9de5364dfc9
Tests: unbreak dav tests on Perl < 5.12.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1538
diff
changeset
|
139 |
1536
0ce1c9516764
Tests: dav.t MKCOL test for trailing slash in Location (if any).
Sergey Kandaurov <pluknet@nginx.com>
parents:
1535
diff
changeset
|
140 like($r, qr!(?(?{ $r =~ /Location/ })Location: /test/)!, 'mkcol location'); |
0ce1c9516764
Tests: dav.t MKCOL test for trailing slash in Location (if any).
Sergey Kandaurov <pluknet@nginx.com>
parents:
1535
diff
changeset
|
141 |
0ce1c9516764
Tests: dav.t MKCOL test for trailing slash in Location (if any).
Sergey Kandaurov <pluknet@nginx.com>
parents:
1535
diff
changeset
|
142 } |
0ce1c9516764
Tests: dav.t MKCOL test for trailing slash in Location (if any).
Sergey Kandaurov <pluknet@nginx.com>
parents:
1535
diff
changeset
|
143 |
141
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
144 $r = http(<<EOF); |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
145 COPY /test/ HTTP/1.1 |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
146 Host: localhost |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
147 Destination: /test-moved/ |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
148 Connection: close |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
149 |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
150 EOF |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
151 |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
152 like($r, qr/201 Created.*(Content-Length|\x0d\0a0\x0d\x0a)/ms, 'copy dir'); |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
153 |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
154 $r = http(<<EOF); |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
155 MOVE /test/ HTTP/1.1 |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
156 Host: localhost |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
157 Destination: /test-moved/ |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
158 Connection: close |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
159 |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
160 EOF |
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
161 |
367
0726521e42f3
Tests: added tests for escaped and unsafe URIs.
Sergey Kandaurov <pluknet@nginx.com>
parents:
249
diff
changeset
|
162 like($r, qr/201 Created.*(Content-Length|\x0d\0a0\x0d\x0a)/ms, 'move dir'); |
0726521e42f3
Tests: added tests for escaped and unsafe URIs.
Sergey Kandaurov <pluknet@nginx.com>
parents:
249
diff
changeset
|
163 |
0726521e42f3
Tests: added tests for escaped and unsafe URIs.
Sergey Kandaurov <pluknet@nginx.com>
parents:
249
diff
changeset
|
164 $r = http(<<EOF); |
0726521e42f3
Tests: added tests for escaped and unsafe URIs.
Sergey Kandaurov <pluknet@nginx.com>
parents:
249
diff
changeset
|
165 COPY /file HTTP/1.1 |
0726521e42f3
Tests: added tests for escaped and unsafe URIs.
Sergey Kandaurov <pluknet@nginx.com>
parents:
249
diff
changeset
|
166 Host: localhost |
0726521e42f3
Tests: added tests for escaped and unsafe URIs.
Sergey Kandaurov <pluknet@nginx.com>
parents:
249
diff
changeset
|
167 Destination: /file-moved%20escape |
0726521e42f3
Tests: added tests for escaped and unsafe URIs.
Sergey Kandaurov <pluknet@nginx.com>
parents:
249
diff
changeset
|
168 Connection: close |
0726521e42f3
Tests: added tests for escaped and unsafe URIs.
Sergey Kandaurov <pluknet@nginx.com>
parents:
249
diff
changeset
|
169 |
0726521e42f3
Tests: added tests for escaped and unsafe URIs.
Sergey Kandaurov <pluknet@nginx.com>
parents:
249
diff
changeset
|
170 EOF |
0726521e42f3
Tests: added tests for escaped and unsafe URIs.
Sergey Kandaurov <pluknet@nginx.com>
parents:
249
diff
changeset
|
171 |
0726521e42f3
Tests: added tests for escaped and unsafe URIs.
Sergey Kandaurov <pluknet@nginx.com>
parents:
249
diff
changeset
|
172 like($r, qr/204 No Content/, 'copy file escaped'); |
0726521e42f3
Tests: added tests for escaped and unsafe URIs.
Sergey Kandaurov <pluknet@nginx.com>
parents:
249
diff
changeset
|
173 is(-s $t->testdir() . '/file-moved escape', 10, 'file copied unescaped'); |
0726521e42f3
Tests: added tests for escaped and unsafe URIs.
Sergey Kandaurov <pluknet@nginx.com>
parents:
249
diff
changeset
|
174 |
1360
6efe4dbf713b
Tests: added dav copy test with existing destination file.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1150
diff
changeset
|
175 $t->write_file('file.exist', join '', (1 .. 42)); |
6efe4dbf713b
Tests: added dav copy test with existing destination file.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1150
diff
changeset
|
176 |
6efe4dbf713b
Tests: added dav copy test with existing destination file.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1150
diff
changeset
|
177 $r = http(<<EOF); |
6efe4dbf713b
Tests: added dav copy test with existing destination file.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1150
diff
changeset
|
178 COPY /file HTTP/1.1 |
6efe4dbf713b
Tests: added dav copy test with existing destination file.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1150
diff
changeset
|
179 Host: localhost |
6efe4dbf713b
Tests: added dav copy test with existing destination file.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1150
diff
changeset
|
180 Destination: /file.exist |
6efe4dbf713b
Tests: added dav copy test with existing destination file.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1150
diff
changeset
|
181 Connection: close |
6efe4dbf713b
Tests: added dav copy test with existing destination file.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1150
diff
changeset
|
182 |
6efe4dbf713b
Tests: added dav copy test with existing destination file.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1150
diff
changeset
|
183 EOF |
6efe4dbf713b
Tests: added dav copy test with existing destination file.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1150
diff
changeset
|
184 |
6efe4dbf713b
Tests: added dav copy test with existing destination file.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1150
diff
changeset
|
185 like($r, qr/204 No Content/, 'copy file overwrite'); |
6efe4dbf713b
Tests: added dav copy test with existing destination file.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1150
diff
changeset
|
186 is(-s $t->testdir() . '/file.exist', 10, 'target file truncated'); |
6efe4dbf713b
Tests: added dav copy test with existing destination file.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1150
diff
changeset
|
187 |
1150
ccf134a800ae
Tests: added Location tests with alias for dav and static modules.
Sergey Kandaurov <pluknet@nginx.com>
parents:
974
diff
changeset
|
188 $r = http(<<EOF . '0123456789'); |
ccf134a800ae
Tests: added Location tests with alias for dav and static modules.
Sergey Kandaurov <pluknet@nginx.com>
parents:
974
diff
changeset
|
189 PUT /i/alias HTTP/1.1 |
ccf134a800ae
Tests: added Location tests with alias for dav and static modules.
Sergey Kandaurov <pluknet@nginx.com>
parents:
974
diff
changeset
|
190 Host: localhost |
ccf134a800ae
Tests: added Location tests with alias for dav and static modules.
Sergey Kandaurov <pluknet@nginx.com>
parents:
974
diff
changeset
|
191 Connection: close |
ccf134a800ae
Tests: added Location tests with alias for dav and static modules.
Sergey Kandaurov <pluknet@nginx.com>
parents:
974
diff
changeset
|
192 Content-Length: 10 |
ccf134a800ae
Tests: added Location tests with alias for dav and static modules.
Sergey Kandaurov <pluknet@nginx.com>
parents:
974
diff
changeset
|
193 |
ccf134a800ae
Tests: added Location tests with alias for dav and static modules.
Sergey Kandaurov <pluknet@nginx.com>
parents:
974
diff
changeset
|
194 EOF |
ccf134a800ae
Tests: added Location tests with alias for dav and static modules.
Sergey Kandaurov <pluknet@nginx.com>
parents:
974
diff
changeset
|
195 |
ccf134a800ae
Tests: added Location tests with alias for dav and static modules.
Sergey Kandaurov <pluknet@nginx.com>
parents:
974
diff
changeset
|
196 like($r, qr/201 Created.*(Content-Length|\x0d\0a0\x0d\x0a)/ms, 'put alias'); |
1536
0ce1c9516764
Tests: dav.t MKCOL test for trailing slash in Location (if any).
Sergey Kandaurov <pluknet@nginx.com>
parents:
1535
diff
changeset
|
197 like($r, qr!Location: /i/alias\x0d?$!ms, 'location alias'); |
1150
ccf134a800ae
Tests: added Location tests with alias for dav and static modules.
Sergey Kandaurov <pluknet@nginx.com>
parents:
974
diff
changeset
|
198 is(-s $t->testdir() . '/alias', 10, 'put alias size'); |
ccf134a800ae
Tests: added Location tests with alias for dav and static modules.
Sergey Kandaurov <pluknet@nginx.com>
parents:
974
diff
changeset
|
199 |
1538
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
200 # request methods with unsupported request body |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
201 |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
202 $r = http(<<EOF . '0123456789'); |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
203 MKCOL /test/ HTTP/1.1 |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
204 Host: localhost |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
205 Connection: close |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
206 Content-Length: 10 |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
207 |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
208 EOF |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
209 |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
210 like($r, qr/415 Unsupported/, 'mkcol body'); |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
211 |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
212 $r = http(<<EOF . '0123456789'); |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
213 COPY /file HTTP/1.1 |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
214 Host: localhost |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
215 Destination: /file.exist |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
216 Connection: close |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
217 Content-Length: 10 |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
218 |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
219 EOF |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
220 |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
221 like($r, qr/415 Unsupported/, 'copy body'); |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
222 |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
223 $r = http(<<EOF . '0123456789'); |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
224 DELETE /file HTTP/1.1 |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
225 Host: localhost |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
226 Connection: close |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
227 Content-Length: 10 |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
228 |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
229 EOF |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
230 |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
231 like($r, qr/415 Unsupported/, 'delete body'); |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
232 |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
233 $r = http(<<EOF); |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
234 MKCOL /test/ HTTP/1.1 |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
235 Host: localhost |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
236 Connection: close |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
237 Transfer-Encoding: chunked |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
238 |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
239 a |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
240 0123456789 |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
241 0 |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
242 |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
243 EOF |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
244 |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
245 like($r, qr/415 Unsupported/, 'mkcol body chunked'); |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
246 |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
247 $r = http(<<EOF); |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
248 COPY /file HTTP/1.1 |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
249 Host: localhost |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
250 Destination: /file.exist |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
251 Connection: close |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
252 Transfer-Encoding: chunked |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
253 |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
254 a |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
255 0123456789 |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
256 0 |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
257 |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
258 EOF |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
259 |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
260 like($r, qr/415 Unsupported/, 'copy body chunked'); |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
261 |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
262 $r = http(<<EOF); |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
263 DELETE /file HTTP/1.1 |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
264 Host: localhost |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
265 Connection: close |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
266 Transfer-Encoding: chunked |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
267 |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
268 a |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
269 0123456789 |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
270 0 |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
271 |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
272 EOF |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
273 |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
274 like($r, qr/415 Unsupported/, 'delete body chunked'); |
c49e5ca1d840
Tests: dav tests with unsupported request body.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1536
diff
changeset
|
275 |
141
1e1975cd25ef
Tests: error_page and return related tests, dav tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
276 ############################################################################### |