Mercurial > hg > nginx
comparison src/http/v2/ngx_http_v2_filter_module.c @ 6275:39fa0b7e3a67
HTTP/2: simplified producing of the Last-Modified header.
author | Valentin Bartenev <vbart@nginx.com> |
---|---|
date | Mon, 26 Oct 2015 17:43:08 +0300 |
parents | b2de4a56b860 |
children | 0efc16d55adb |
comparison
equal
deleted
inserted
replaced
6274:b2de4a56b860 | 6275:39fa0b7e3a67 |
---|---|
482 if (r->headers_out.last_modified == NULL | 482 if (r->headers_out.last_modified == NULL |
483 && r->headers_out.last_modified_time != -1) | 483 && r->headers_out.last_modified_time != -1) |
484 { | 484 { |
485 *b->last++ = ngx_http_v2_inc_indexed(NGX_HTTP_V2_LAST_MODIFIED_INDEX); | 485 *b->last++ = ngx_http_v2_inc_indexed(NGX_HTTP_V2_LAST_MODIFIED_INDEX); |
486 | 486 |
487 p = b->last; | 487 *b->last++ = sizeof("Wed, 31 Dec 1986 18:00:00 GMT") - 1; |
488 b->last = ngx_http_time(b->last + 1, r->headers_out.last_modified_time); | 488 b->last = ngx_http_time(b->last, r->headers_out.last_modified_time); |
489 *p = (u_char) (b->last - p - 1); | |
490 } | 489 } |
491 | 490 |
492 if (r->headers_out.location && r->headers_out.location->value.len) { | 491 if (r->headers_out.location && r->headers_out.location->value.len) { |
493 *b->last++ = ngx_http_v2_inc_indexed(NGX_HTTP_V2_LOCATION_INDEX); | 492 *b->last++ = ngx_http_v2_inc_indexed(NGX_HTTP_V2_LOCATION_INDEX); |
494 | 493 |