[PATCH-REQUEST] : SPDY handling for 304 response
Valentin V. Bartenev
vbart at nginx.com
Thu Dec 25 14:34:13 UTC 2014
On Thursday 25 December 2014 09:34:16 Shrirang Ballal wrote:
> 304 handling for non-spdy requests is exactly same as that of 204 handling
> (Reference : ngx_http_header_filter_module.c::ngx_http_header_filter()).
> SPDY requests too should be handled same way.
[..]
Well, they are not handled the same way.
A quote from the function you mentioned:
if (status >= NGX_HTTP_OK
&& status < NGX_HTTP_LAST_2XX)
{
/* 2XX */
if (status == NGX_HTTP_NO_CONTENT) {
r->header_only = 1;
ngx_str_null(&r->headers_out.content_type);
r->headers_out.last_modified_time = -1;
r->headers_out.last_modified = NULL;
r->headers_out.content_length = NULL;
r->headers_out.content_length_n = -1;
}
status -= NGX_HTTP_OK;
status_line = &ngx_http_status_lines[status];
len += ngx_http_status_lines[status].len;
} else if (status >= NGX_HTTP_MOVED_PERMANENTLY
&& status < NGX_HTTP_LAST_3XX)
{
/* 3XX */
if (status == NGX_HTTP_NOT_MODIFIED) {
r->header_only = 1;
}
status = status - NGX_HTTP_MOVED_PERMANENTLY + NGX_HTTP_OFF_3XX;
status_line = &ngx_http_status_lines[status];
len += ngx_http_status_lines[status].len;
}
wbr, Valentin V. Bartenev
More information about the nginx-devel
mailing list