comparison src/http/ngx_http_header_filter.c @ 290:87e73f067470

nginx-0.0.2-2004-03-16-10:10:12 import
author Igor Sysoev <igor@sysoev.ru>
date Tue, 16 Mar 2004 07:10:12 +0000
parents 70e1c7d2b83d
children 5cfd65b8b0a7
comparison
equal deleted inserted replaced
289:0750faf8d7e3 290:87e73f067470
90 90
91 91
92 92
93 static int ngx_http_header_filter(ngx_http_request_t *r) 93 static int ngx_http_header_filter(ngx_http_request_t *r)
94 { 94 {
95 int len, status, i; 95 u_char *p;
96 char *p; 96 size_t len;
97 ngx_uint_t status, i;
97 ngx_hunk_t *h; 98 ngx_hunk_t *h;
98 ngx_chain_t *ln; 99 ngx_chain_t *ln;
99 ngx_table_elt_t *header; 100 ngx_table_elt_t *header;
100 101
101 if (r->http_version < NGX_HTTP_VERSION_10) { 102 if (r->http_version < NGX_HTTP_VERSION_10) {
244 *(h->last++) = CR; *(h->last++) = LF; 245 *(h->last++) = CR; *(h->last++) = LF;
245 } 246 }
246 247
247 if (r->headers_out.content_length == NULL) { 248 if (r->headers_out.content_length == NULL) {
248 if (r->headers_out.content_length_n >= 0) { 249 if (r->headers_out.content_length_n >= 0) {
249 h->last += ngx_snprintf(h->last, 250 h->last += ngx_snprintf((char *) h->last,
250 sizeof("Content-Length: ") + NGX_OFF_T_LEN + 2, 251 sizeof("Content-Length: ") + NGX_OFF_T_LEN + 2,
251 "Content-Length: " OFF_T_FMT CRLF, 252 "Content-Length: " OFF_T_FMT CRLF,
252 r->headers_out.content_length_n); 253 r->headers_out.content_length_n);
253 } 254 }
254 } 255 }