Mercurial > hg > nginx-tests
comparison http_header_buffers.t @ 1136:56d5efd16af6
Tests: pool size in header tests fixed for 64-bit platforms.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Tue, 21 Feb 2017 13:29:02 +0300 |
parents | 3f875d5be63f |
children | b9d9c962255f |
comparison
equal
deleted
inserted
replaced
1135:3f875d5be63f | 1136:56d5efd16af6 |
---|---|
35 } | 35 } |
36 | 36 |
37 http { | 37 http { |
38 %%TEST_GLOBALS_HTTP%% | 38 %%TEST_GLOBALS_HTTP%% |
39 | 39 |
40 connection_pool_size 64; | 40 connection_pool_size 128; |
41 client_header_buffer_size 64; | 41 client_header_buffer_size 128; |
42 | 42 |
43 server { | 43 server { |
44 listen 127.0.0.1:8080; | 44 listen 127.0.0.1:8080; |
45 server_name five; | 45 server_name five; |
46 | 46 |
47 large_client_header_buffers 5 128; | 47 large_client_header_buffers 5 256; |
48 | 48 |
49 return 204; | 49 return 204; |
50 } | 50 } |
51 | 51 |
52 server { | 52 server { |
53 listen 127.0.0.1:8080; | 53 listen 127.0.0.1:8080; |
54 server_name ten; | 54 server_name ten; |
55 | 55 |
56 large_client_header_buffers 10 128; | 56 large_client_header_buffers 10 256; |
57 | 57 |
58 return 204; | 58 return 204; |
59 } | 59 } |
60 | 60 |
61 server { | 61 server { |
62 listen 127.0.0.1:8080; | 62 listen 127.0.0.1:8080; |
63 server_name one; | 63 server_name one; |
64 | 64 |
65 large_client_header_buffers 1 128; | 65 large_client_header_buffers 1 256; |
66 | 66 |
67 return 204; | 67 return 204; |
68 } | 68 } |
69 } | 69 } |
70 | 70 |
81 # and then additional buffers are allocated in a virtual server with larger | 81 # and then additional buffers are allocated in a virtual server with larger |
82 # number of buffers configured, hc->busy will be overflowed | 82 # number of buffers configured, hc->busy will be overflowed |
83 | 83 |
84 like(http( | 84 like(http( |
85 "GET / HTTP/1.0" . CRLF . | 85 "GET / HTTP/1.0" . CRLF . |
86 "X-Foo: " . ("1234567890" x 10) . CRLF . | 86 "X-Foo: " . ("1234567890" x 20) . CRLF . |
87 "Host: ten" . CRLF . | 87 "Host: ten" . CRLF . |
88 "X-Foo: " . ("1234567890" x 10) . CRLF . | 88 "X-Foo: " . ("1234567890" x 20) . CRLF . |
89 "X-Foo: " . ("1234567890" x 10) . CRLF . | 89 "X-Foo: " . ("1234567890" x 20) . CRLF . |
90 "X-Foo: " . ("1234567890" x 10) . CRLF . | 90 "X-Foo: " . ("1234567890" x 20) . CRLF . |
91 "X-Foo: " . ("1234567890" x 10) . CRLF . | 91 "X-Foo: " . ("1234567890" x 20) . CRLF . |
92 "X-Foo: " . ("1234567890" x 10) . CRLF . CRLF | 92 "X-Foo: " . ("1234567890" x 20) . CRLF . CRLF |
93 ), qr/204|400/, 'additional buffers in virtual server'); | 93 ), qr/204|400/, 'additional buffers in virtual server'); |
94 | 94 |
95 # for pipelined requests large header buffers are saved to hc->free; | 95 # for pipelined requests large header buffers are saved to hc->free; |
96 # it sized for number of buffers in the current virtual server, but | 96 # it sized for number of buffers in the current virtual server, but |
97 # saves previously allocated buffers, and there may be more buffers if | 97 # saves previously allocated buffers, and there may be more buffers if |
98 # allocatad before the virtual server was selected | 98 # allocatad before the virtual server was selected |
99 | 99 |
100 like(http( | 100 like(http( |
101 "GET / HTTP/1.1" . CRLF . | 101 "GET / HTTP/1.1" . CRLF . |
102 "X-Foo: " . ("1234567890" x 10) . CRLF . | 102 "X-Foo: " . ("1234567890" x 20) . CRLF . |
103 "X-Foo: " . ("1234567890" x 10) . CRLF . | 103 "X-Foo: " . ("1234567890" x 20) . CRLF . |
104 "X-Foo: " . ("1234567890" x 10) . CRLF . | 104 "X-Foo: " . ("1234567890" x 20) . CRLF . |
105 "X-Foo: " . ("1234567890" x 10) . CRLF . | 105 "X-Foo: " . ("1234567890" x 20) . CRLF . |
106 "X-Foo: " . ("1234567890" x 10) . CRLF . | 106 "X-Foo: " . ("1234567890" x 20) . CRLF . |
107 "Host: one" . CRLF . CRLF . | 107 "Host: one" . CRLF . CRLF . |
108 "GET / HTTP/1.1" . CRLF . | 108 "GET / HTTP/1.1" . CRLF . |
109 "Host: one" . CRLF . | 109 "Host: one" . CRLF . |
110 "Connection: close" . CRLF . CRLF | 110 "Connection: close" . CRLF . CRLF |
111 ), qr/204/, 'pipelined with too many buffers'); | 111 ), qr/204/, 'pipelined with too many buffers'); |