Mercurial > hg > nginx-vendor-1-0
comparison src/http/ngx_http_header_filter_module.c @ 644:ad25218fd14b NGINX_1_0_12
nginx 1.0.12
*) Feature: the "TLSv1.1" and "TLSv1.2" parameters of the
"ssl_protocols" directive.
*) Feature: the "if" SSI command supports captures in regular
expressions.
*) Bugfix: the "if" SSI command did not work inside the "block" command.
*) Bugfix: in AIO error handling on FreeBSD.
*) Bugfix: in the OpenSSL library initialization.
*) Bugfix: the "worker_cpu_affinity" directive might not work.
*) Bugfix: the "limit_conn_log_level" and "limit_req_log_level"
directives might not work.
*) Bugfix: the "read_ahead" directive might not work combined with
"try_files" and "open_file_cache".
*) Bugfix: the "proxy_cache_use_stale" directive with "error" parameter
did not return answer from cache if there were no live upstreams.
*) Bugfix: a segmentation fault might occur in a worker process if small
time was used in the "inactive" parameter of the "proxy_cache_path"
directive.
*) Bugfix: responses from cache might hang.
*) Bugfix: in error handling while connecting to a backend.
Thanks to Piotr Sikora.
*) Bugfix: in the "epoll" event method.
Thanks to Yichun Zhang.
*) Bugfix: the $sent_http_cache_control variable might contain a wrong
value if the "expires" directive was used.
Thanks to Yichun Zhang.
*) Bugfix: the "limit_rate" directive did not allow to use full
throughput, even if limit value was very high.
*) Bugfix: the "sendfile_max_chunk" directive did not work, if the
"limit_rate" directive was used.
*) Bugfix: nginx could not be built on Solaris; the bug had appeared in
1.0.11.
*) Bugfix: in the ngx_http_scgi_module.
*) Bugfix: in the ngx_http_mp4_module.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 06 Feb 2012 00:00:00 +0400 |
parents | c456a023113c |
children | 09a689c5e494 |
comparison
equal
deleted
inserted
replaced
643:d81e1c257a02 | 644:ad25218fd14b |
---|---|
1 | 1 |
2 /* | 2 /* |
3 * Copyright (C) Igor Sysoev | 3 * Copyright (C) Igor Sysoev |
4 * Copyright (C) Nginx, Inc. | |
4 */ | 5 */ |
5 | 6 |
6 | 7 |
7 #include <ngx_config.h> | 8 #include <ngx_config.h> |
8 #include <ngx_core.h> | 9 #include <ngx_core.h> |
59 ngx_null_string, /* "205 Reset Content" */ | 60 ngx_null_string, /* "205 Reset Content" */ |
60 ngx_string("206 Partial Content"), | 61 ngx_string("206 Partial Content"), |
61 | 62 |
62 /* ngx_null_string, */ /* "207 Multi-Status" */ | 63 /* ngx_null_string, */ /* "207 Multi-Status" */ |
63 | 64 |
64 #define NGX_HTTP_LAST_LEVEL_200 207 | 65 #define NGX_HTTP_LAST_2XX 207 |
65 #define NGX_HTTP_LEVEL_200 (NGX_HTTP_LAST_LEVEL_200 - 200) | 66 #define NGX_HTTP_OFF_3XX (NGX_HTTP_LAST_2XX - 200) |
66 | 67 |
67 /* ngx_null_string, */ /* "300 Multiple Choices" */ | 68 /* ngx_null_string, */ /* "300 Multiple Choices" */ |
68 | 69 |
69 ngx_string("301 Moved Permanently"), | 70 ngx_string("301 Moved Permanently"), |
70 ngx_string("302 Moved Temporarily"), | 71 ngx_string("302 Moved Temporarily"), |
73 | 74 |
74 /* ngx_null_string, */ /* "305 Use Proxy" */ | 75 /* ngx_null_string, */ /* "305 Use Proxy" */ |
75 /* ngx_null_string, */ /* "306 unused" */ | 76 /* ngx_null_string, */ /* "306 unused" */ |
76 /* ngx_null_string, */ /* "307 Temporary Redirect" */ | 77 /* ngx_null_string, */ /* "307 Temporary Redirect" */ |
77 | 78 |
78 #define NGX_HTTP_LAST_LEVEL_300 305 | 79 #define NGX_HTTP_LAST_3XX 305 |
79 #define NGX_HTTP_LEVEL_300 (NGX_HTTP_LAST_LEVEL_300 - 301) | 80 #define NGX_HTTP_OFF_4XX (NGX_HTTP_LAST_3XX - 301 + NGX_HTTP_OFF_3XX) |
80 | 81 |
81 ngx_string("400 Bad Request"), | 82 ngx_string("400 Bad Request"), |
82 ngx_string("401 Unauthorized"), | 83 ngx_string("401 Unauthorized"), |
83 ngx_string("402 Payment Required"), | 84 ngx_string("402 Payment Required"), |
84 ngx_string("403 Forbidden"), | 85 ngx_string("403 Forbidden"), |
106 /* ngx_null_string, */ /* "421 unused" */ | 107 /* ngx_null_string, */ /* "421 unused" */ |
107 /* ngx_null_string, */ /* "422 Unprocessable Entity" */ | 108 /* ngx_null_string, */ /* "422 Unprocessable Entity" */ |
108 /* ngx_null_string, */ /* "423 Locked" */ | 109 /* ngx_null_string, */ /* "423 Locked" */ |
109 /* ngx_null_string, */ /* "424 Failed Dependency" */ | 110 /* ngx_null_string, */ /* "424 Failed Dependency" */ |
110 | 111 |
111 #define NGX_HTTP_LAST_LEVEL_400 417 | 112 #define NGX_HTTP_LAST_4XX 417 |
112 #define NGX_HTTP_LEVEL_400 (NGX_HTTP_LAST_LEVEL_400 - 400) | 113 #define NGX_HTTP_OFF_5XX (NGX_HTTP_LAST_4XX - 400 + NGX_HTTP_OFF_4XX) |
113 | 114 |
114 ngx_string("500 Internal Server Error"), | 115 ngx_string("500 Internal Server Error"), |
115 ngx_string("501 Method Not Implemented"), | 116 ngx_string("501 Method Not Implemented"), |
116 ngx_string("502 Bad Gateway"), | 117 ngx_string("502 Bad Gateway"), |
117 ngx_string("503 Service Temporarily Unavailable"), | 118 ngx_string("503 Service Temporarily Unavailable"), |
122 ngx_string("507 Insufficient Storage"), | 123 ngx_string("507 Insufficient Storage"), |
123 /* ngx_null_string, */ /* "508 unused" */ | 124 /* ngx_null_string, */ /* "508 unused" */ |
124 /* ngx_null_string, */ /* "509 unused" */ | 125 /* ngx_null_string, */ /* "509 unused" */ |
125 /* ngx_null_string, */ /* "510 Not Extended" */ | 126 /* ngx_null_string, */ /* "510 Not Extended" */ |
126 | 127 |
127 #define NGX_HTTP_LAST_LEVEL_500 508 | 128 #define NGX_HTTP_LAST_5XX 508 |
128 | 129 |
129 }; | 130 }; |
130 | 131 |
131 | 132 |
132 ngx_http_header_out_t ngx_http_headers_out[] = { | 133 ngx_http_header_out_t ngx_http_headers_out[] = { |
214 } else { | 215 } else { |
215 | 216 |
216 status = r->headers_out.status; | 217 status = r->headers_out.status; |
217 | 218 |
218 if (status >= NGX_HTTP_OK | 219 if (status >= NGX_HTTP_OK |
219 && status < NGX_HTTP_LAST_LEVEL_200) | 220 && status < NGX_HTTP_LAST_2XX) |
220 { | 221 { |
221 /* 2XX */ | 222 /* 2XX */ |
222 | 223 |
223 if (status == NGX_HTTP_NO_CONTENT) { | 224 if (status == NGX_HTTP_NO_CONTENT) { |
224 r->header_only = 1; | 225 r->header_only = 1; |
232 status -= NGX_HTTP_OK; | 233 status -= NGX_HTTP_OK; |
233 status_line = &ngx_http_status_lines[status]; | 234 status_line = &ngx_http_status_lines[status]; |
234 len += ngx_http_status_lines[status].len; | 235 len += ngx_http_status_lines[status].len; |
235 | 236 |
236 } else if (status >= NGX_HTTP_MOVED_PERMANENTLY | 237 } else if (status >= NGX_HTTP_MOVED_PERMANENTLY |
237 && status < NGX_HTTP_LAST_LEVEL_300) | 238 && status < NGX_HTTP_LAST_3XX) |
238 { | 239 { |
239 /* 3XX */ | 240 /* 3XX */ |
240 | 241 |
241 if (status == NGX_HTTP_NOT_MODIFIED) { | 242 if (status == NGX_HTTP_NOT_MODIFIED) { |
242 r->header_only = 1; | 243 r->header_only = 1; |
243 } | 244 } |
244 | 245 |
245 status = status - NGX_HTTP_MOVED_PERMANENTLY + NGX_HTTP_LEVEL_200; | 246 status = status - NGX_HTTP_MOVED_PERMANENTLY + NGX_HTTP_OFF_3XX; |
246 status_line = &ngx_http_status_lines[status]; | 247 status_line = &ngx_http_status_lines[status]; |
247 len += ngx_http_status_lines[status].len; | 248 len += ngx_http_status_lines[status].len; |
248 | 249 |
249 } else if (status >= NGX_HTTP_BAD_REQUEST | 250 } else if (status >= NGX_HTTP_BAD_REQUEST |
250 && status < NGX_HTTP_LAST_LEVEL_400) | 251 && status < NGX_HTTP_LAST_4XX) |
251 { | 252 { |
252 /* 4XX */ | 253 /* 4XX */ |
253 status = status - NGX_HTTP_BAD_REQUEST | 254 status = status - NGX_HTTP_BAD_REQUEST |
254 + NGX_HTTP_LEVEL_200 | 255 + NGX_HTTP_OFF_4XX; |
255 + NGX_HTTP_LEVEL_300; | |
256 | 256 |
257 status_line = &ngx_http_status_lines[status]; | 257 status_line = &ngx_http_status_lines[status]; |
258 len += ngx_http_status_lines[status].len; | 258 len += ngx_http_status_lines[status].len; |
259 | 259 |
260 } else if (status >= NGX_HTTP_INTERNAL_SERVER_ERROR | 260 } else if (status >= NGX_HTTP_INTERNAL_SERVER_ERROR |
261 && status < NGX_HTTP_LAST_LEVEL_500) | 261 && status < NGX_HTTP_LAST_5XX) |
262 { | 262 { |
263 /* 5XX */ | 263 /* 5XX */ |
264 status = status - NGX_HTTP_INTERNAL_SERVER_ERROR | 264 status = status - NGX_HTTP_INTERNAL_SERVER_ERROR |
265 + NGX_HTTP_LEVEL_200 | 265 + NGX_HTTP_OFF_5XX; |
266 + NGX_HTTP_LEVEL_300 | |
267 + NGX_HTTP_LEVEL_400; | |
268 | 266 |
269 status_line = &ngx_http_status_lines[status]; | 267 status_line = &ngx_http_status_lines[status]; |
270 len += ngx_http_status_lines[status].len; | 268 len += ngx_http_status_lines[status].len; |
271 | 269 |
272 } else { | 270 } else { |