Mercurial > hg > nginx-tests
comparison rewrite.t @ 1379:14bfd6643bbb
Tests: updated rewrite.t for the return r->err_status change.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Fri, 21 Sep 2018 17:33:41 +0300 |
parents | 882267679006 |
children | 144c6ce732e4 |
comparison
equal
deleted
inserted
replaced
1378:ba7e2e60f8b6 | 1379:14bfd6643bbb |
---|---|
156 like(http_get('/return204'), qr!204 No Content!, 'return 204'); | 156 like(http_get('/return204'), qr!204 No Content!, 'return 204'); |
157 like(http_get('/return200'), qr!200 OK!, 'return 200'); | 157 like(http_get('/return200'), qr!200 OK!, 'return 200'); |
158 like(http_get('/return306'), qr!HTTP/1.1 306 !, 'return 306'); | 158 like(http_get('/return306'), qr!HTTP/1.1 306 !, 'return 306'); |
159 like(http_get('/return405'), qr!HTTP/1.1 405.*body!ms, 'return 405'); | 159 like(http_get('/return405'), qr!HTTP/1.1 405.*body!ms, 'return 405'); |
160 | 160 |
161 like(http_get('/error404return405'), qr!HTTP/1.1 404!, 'error 404 return 405'); | 161 # this used to result in 404, but was changed in 1.15.4 |
162 # to respond with 405 instead, much like a real error would do | |
163 | |
164 TODO: { | |
165 local $TODO = 'not yet' unless $t->has_version('1.15.4'); | |
166 | |
167 like(http_get('/error404return405'), qr!HTTP/1.1 405!, 'error 404 return 405'); | |
168 | |
169 } | |
162 | 170 |
163 # status code should be 405, and entity body is expected (vs. normal 204 | 171 # status code should be 405, and entity body is expected (vs. normal 204 |
164 # replies which doesn't expect to have body); use HTTP/1.1 for test | 172 # replies which doesn't expect to have body); use HTTP/1.1 for test |
165 # to make problem clear | 173 # to make problem clear |
166 | 174 |