Mercurial > hg > nginx-tests
comparison body_chunked.t @ 1693:5ac6efbe5552
Tests: removed TODO and try_run() checks for legacy versions.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Tue, 01 Jun 2021 16:40:18 +0300 |
parents | 27237569776f |
children | 6c03c329ed95 |
comparison
equal
deleted
inserted
replaced
1692:f6795e2e6a4b | 1693:5ac6efbe5552 |
---|---|
133 like(http_get_body('/discard', '0123456789' x 128, '0123456789' x 512, | 133 like(http_get_body('/discard', '0123456789' x 128, '0123456789' x 512, |
134 '0123456789', 'foobar'), qr/(TEST.*){4}/ms, | 134 '0123456789', 'foobar'), qr/(TEST.*){4}/ms, |
135 'chunked body discard 2'); | 135 'chunked body discard 2'); |
136 | 136 |
137 # invalid chunks | 137 # invalid chunks |
138 | |
139 TODO: { | |
140 local $TODO = 'not yet' unless $t->has_version('1.17.4'); | |
141 | 138 |
142 like( | 139 like( |
143 http( | 140 http( |
144 'GET / HTTP/1.1' . CRLF | 141 'GET / HTTP/1.1' . CRLF |
145 . 'Host: localhost' . CRLF | 142 . 'Host: localhost' . CRLF |
163 . '0' . CRLF . CRLF | 160 . '0' . CRLF . CRLF |
164 ), | 161 ), |
165 qr/400 Bad/, 'runaway chunk discard' | 162 qr/400 Bad/, 'runaway chunk discard' |
166 ); | 163 ); |
167 | 164 |
168 } | |
169 | |
170 # proxy_next_upstream | 165 # proxy_next_upstream |
171 | 166 |
172 like(http_get_body('/next', '0123456789'), | 167 like(http_get_body('/next', '0123456789'), |
173 qr/X-Body: 0123456789\x0d?$/ms, 'body chunked next upstream'); | 168 qr/X-Body: 0123456789\x0d?$/ms, 'body chunked next upstream'); |
174 | 169 |
175 # invalid Transfer-Encoding | 170 # invalid Transfer-Encoding |
176 | 171 |
177 TODO: { | |
178 local $TODO = 'not yet' unless $t->has_version('1.17.9'); | |
179 | |
180 like(http_transfer_encoding('identity'), qr/501 Not Implemented/, | 172 like(http_transfer_encoding('identity'), qr/501 Not Implemented/, |
181 'transfer encoding identity'); | 173 'transfer encoding identity'); |
182 | 174 |
183 like(http_transfer_encoding("chunked\nTransfer-Encoding: chunked"), | 175 like(http_transfer_encoding("chunked\nTransfer-Encoding: chunked"), |
184 qr/400 Bad/, 'transfer encoding repeat'); | 176 qr/400 Bad/, 'transfer encoding repeat'); |
185 | |
186 } | |
187 | 177 |
188 like(http_transfer_encoding('chunked, identity'), qr/501 Not Implemented/, | 178 like(http_transfer_encoding('chunked, identity'), qr/501 Not Implemented/, |
189 'transfer encoding list'); | 179 'transfer encoding list'); |
190 | 180 |
191 ############################################################################### | 181 ############################################################################### |