]> git.kaiwu.me - nginx.git/commitdiff
HTTP/2: simplified producing of the Last-Modified header.
authorValentin Bartenev <vbart@nginx.com>
Mon, 26 Oct 2015 14:43:08 +0000 (17:43 +0300)
committerValentin Bartenev <vbart@nginx.com>
Mon, 26 Oct 2015 14:43:08 +0000 (17:43 +0300)
src/http/v2/ngx_http_v2_filter_module.c

index bcffd851c2de70e59949d6c540b5f51022d98d01..461a4d18edb52150032363a22a1f9925c832063b 100644 (file)
@@ -484,9 +484,8 @@ ngx_http_v2_header_filter(ngx_http_request_t *r)
     {
         *b->last++ = ngx_http_v2_inc_indexed(NGX_HTTP_V2_LAST_MODIFIED_INDEX);
 
-        p = b->last;
-        b->last = ngx_http_time(b->last + 1, r->headers_out.last_modified_time);
-        *p = (u_char) (b->last - p - 1);
+        *b->last++ = sizeof("Wed, 31 Dec 1986 18:00:00 GMT") - 1;
+        b->last = ngx_http_time(b->last, r->headers_out.last_modified_time);
     }
 
     if (r->headers_out.location && r->headers_out.location->value.len) {