comparison src/http/ngx_http_header_filter.c @ 178:a8ff48d26cca

nginx-0.0.1-2003-11-11-00:09:22 import
author Igor Sysoev <igor@sysoev.ru>
date Mon, 10 Nov 2003 21:09:22 +0000
parents 4db54fdbcbe7
children 2d143372a1ee
comparison
equal deleted inserted replaced
177:4db54fdbcbe7 178:a8ff48d26cca
114 #if (NGX_SUPPRESS_WARN) 114 #if (NGX_SUPPRESS_WARN)
115 status = NGX_INVALID_ARRAY_INDEX; 115 status = NGX_INVALID_ARRAY_INDEX;
116 #endif 116 #endif
117 117
118 } else { 118 } else {
119
119 if (r->headers_out.status < NGX_HTTP_MOVED_PERMANENTLY) { 120 if (r->headers_out.status < NGX_HTTP_MOVED_PERMANENTLY) {
120 /* 2XX */ 121 /* 2XX */
121 status = r->headers_out.status - NGX_HTTP_OK; 122 status = r->headers_out.status - NGX_HTTP_OK;
122 123
123 } else if (r->headers_out.status < NGX_HTTP_BAD_REQUEST) { 124 } else if (r->headers_out.status < NGX_HTTP_BAD_REQUEST) {
238 if (!(r->headers_out.date && r->headers_out.date->key.len)) { 239 if (!(r->headers_out.date && r->headers_out.date->key.len)) {
239 h->last = ngx_cpymem(h->last, "Date: ", sizeof("Date: ") - 1); 240 h->last = ngx_cpymem(h->last, "Date: ", sizeof("Date: ") - 1);
240 #if (NGX_HTTP_LOG_ALL_HEADERS_OUT) 241 #if (NGX_HTTP_LOG_ALL_HEADERS_OUT)
241 p = h->last; 242 p = h->last;
242 #endif 243 #endif
243 h->last += ngx_http_get_time(h->last, ngx_time()); 244 h->last = ngx_cpymem(h->last, ngx_cached_http_time.data,
245 ngx_cached_http_time.len);
244 246
245 #if (NGX_HTTP_LOG_ALL_HEADERS_OUT) 247 #if (NGX_HTTP_LOG_ALL_HEADERS_OUT)
246 r->headers_out.date = ngx_palloc(r->pool, sizeof(ngx_table_elt_t)); 248 r->headers_out.date = ngx_palloc(r->pool, sizeof(ngx_table_elt_t));
247 if (r->headers_out.date == NULL) { 249 if (r->headers_out.date == NULL) {
248 return NGX_ERROR; 250 return NGX_ERROR;