comparison http_expect_100_continue.t @ 491:d5bf5942a8b2

Tests: disambiguated parsing of the status code.
author Sergey Kandaurov <pluknet@nginx.com>
date Fri, 07 Nov 2014 13:05:07 +0300
parents 31e2acce8fa4
children 9592b440ab00
comparison
equal deleted inserted replaced
490:65d2d372ee31 491:d5bf5942a8b2
50 50
51 $t->run(); 51 $t->run();
52 52
53 ############################################################################### 53 ###############################################################################
54 54
55 like(http_100_request('/', '1.1'), qr/100/, 'expect 100 continue'); 55 like(http_100_request('/', '1.1'), qr/ 100 /, 'expect 100 continue');
56 56
57 # From RFC 2616, 8.2.3 Use of the 100 (Continue) Status: 57 # From RFC 2616, 8.2.3 Use of the 100 (Continue) Status:
58 # 58 #
59 # - An origin server SHOULD NOT send a 100 (Continue) response if 59 # - An origin server SHOULD NOT send a 100 (Continue) response if
60 # the request message does not include an Expect request-header 60 # the request message does not include an Expect request-header
61 # field with the "100-continue" expectation, and MUST NOT send a 61 # field with the "100-continue" expectation, and MUST NOT send a
62 # 100 (Continue) response if such a request comes from an HTTP/1.0 62 # 100 (Continue) response if such a request comes from an HTTP/1.0
63 # (or earlier) client. 63 # (or earlier) client.
64 64
65 unlike(http_100_request('/', '1.0'), qr/100/, 'no 100 continue via http 1.0'); 65 unlike(http_100_request('/', '1.0'), qr/ 100 /, 'no 100 continue via http 1.0');
66 66
67 ############################################################################### 67 ###############################################################################
68 68
69 sub http_100_request { 69 sub http_100_request {
70 my ($url, $version) = @_; 70 my ($url, $version) = @_;