comparison src/http/ngx_http_header_filter_module.c @ 60:df7d3fff122b NGINX_0_1_30

nginx 0.1.30 *) Bugfix: the worker process may got caught in an endless loop if the SSI was used. *) Bugfix: the response encrypted by SSL may not transferred complete. *) Bugfix: if the length of the response part received at once from proxied or FastCGI server was equal to 500, then nginx returns the 500 response code; in proxy mode the bug appeared in 0.1.29 only. *) Bugfix: nginx did not consider the directives with 8 or 9 parameters as invalid. *) Feature: the "return" directive can return the 204 response code. *) Feature: the "ignore_invalid_headers" directive.
author Igor Sysoev <http://sysoev.ru>
date Sat, 14 May 2005 00:00:00 +0400
parents b55cbf18157e
children 818201e5a553
comparison
equal deleted inserted replaced
59:4cb463ba8cce 60:df7d3fff122b
46 46
47 ngx_string("200 OK"), 47 ngx_string("200 OK"),
48 ngx_null_string, /* "201 Created" */ 48 ngx_null_string, /* "201 Created" */
49 ngx_null_string, /* "202 Accepted" */ 49 ngx_null_string, /* "202 Accepted" */
50 ngx_null_string, /* "203 Non-Authoritative Information" */ 50 ngx_null_string, /* "203 Non-Authoritative Information" */
51 ngx_null_string, /* "204 No Content" */ 51 ngx_string("204 No Content"),
52 ngx_null_string, /* "205 Reset Content" */ 52 ngx_null_string, /* "205 Reset Content" */
53 ngx_string("206 Partial Content"), 53 ngx_string("206 Partial Content"),
54 54
55 /* ngx_null_string, */ /* "207 Multi-Status" */ 55 /* ngx_null_string, */ /* "207 Multi-Status" */
56 56
165 r->header_only = 1; 165 r->header_only = 1;
166 } 166 }
167 167
168 if (r->headers_out.last_modified_time != -1) { 168 if (r->headers_out.last_modified_time != -1) {
169 if (r->headers_out.status != NGX_HTTP_OK 169 if (r->headers_out.status != NGX_HTTP_OK
170 && r->headers_out.status != NGX_HTTP_NOT_MODIFIED 170 && r->headers_out.status != NGX_HTTP_PARTIAL_CONTENT
171 && r->headers_out.status != NGX_HTTP_PARTIAL_CONTENT) 171 && r->headers_out.status != NGX_HTTP_NOT_MODIFIED)
172 { 172 {
173 r->headers_out.last_modified_time = -1; 173 r->headers_out.last_modified_time = -1;
174 r->headers_out.last_modified = NULL; 174 r->headers_out.last_modified = NULL;
175 } 175 }
176 } 176 }
190 } else { 190 } else {
191 191
192 if (r->headers_out.status < NGX_HTTP_MOVED_PERMANENTLY) { 192 if (r->headers_out.status < NGX_HTTP_MOVED_PERMANENTLY) {
193 /* 2XX */ 193 /* 2XX */
194 status = r->headers_out.status - NGX_HTTP_OK; 194 status = r->headers_out.status - NGX_HTTP_OK;
195
196 if (r->headers_out.status == NGX_HTTP_NO_CONTENT) {
197 r->header_only = 1;
198 r->headers_out.content_type.len = 0;
199 r->headers_out.content_type.data = NULL;
200 r->headers_out.last_modified_time = -1;
201 r->headers_out.last_modified = NULL;
202 r->headers_out.content_length = NULL;
203 r->headers_out.content_length_n = -1;
204 }
195 205
196 } else if (r->headers_out.status < NGX_HTTP_BAD_REQUEST) { 206 } else if (r->headers_out.status < NGX_HTTP_BAD_REQUEST) {
197 /* 3XX */ 207 /* 3XX */
198 status = r->headers_out.status - NGX_HTTP_MOVED_PERMANENTLY 208 status = r->headers_out.status - NGX_HTTP_MOVED_PERMANENTLY
199 + NGX_HTTP_LEVEL_200; 209 + NGX_HTTP_LEVEL_200;