comparison src/http/ngx_http_header_filter.c @ 143:5526213be452

nginx-0.0.1-2003-10-10-19:10:50 import
author Igor Sysoev <igor@sysoev.ru>
date Fri, 10 Oct 2003 15:10:50 +0000
parents e29909bd9b8a
children ef8c87afcfc5
comparison
equal deleted inserted replaced
142:cb77c084acdb 143:5526213be452
1 1
2 #include <ngx_config.h> 2 #include <ngx_config.h>
3 #include <ngx_core.h> 3 #include <ngx_core.h>
4 #include <ngx_http.h> 4 #include <ngx_http.h>
5 #include <nginx.h> 5 #include <nginx.h>
6
7 /* STUB probably, needed for ngx_freebsd_tcp_nopush_flush */
8 #ifdef __FreeBSD__
9 #include <ngx_freebsd_init.h>
10 #endif
11
12 6
13 7
14 static int ngx_http_header_filter_init(ngx_cycle_t *cycle); 8 static int ngx_http_header_filter_init(ngx_cycle_t *cycle);
15 static int ngx_http_header_filter(ngx_http_request_t *r); 9 static int ngx_http_header_filter(ngx_http_request_t *r);
16 10
98 int len, status, i; 92 int len, status, i;
99 ngx_hunk_t *h; 93 ngx_hunk_t *h;
100 ngx_chain_t *ch; 94 ngx_chain_t *ch;
101 ngx_table_elt_t *header; 95 ngx_table_elt_t *header;
102 96
103 #ifdef __FreeBSD__
104
105 if (r->keepalive) {
106 if (ngx_freebsd_tcp_nopush_flush) {
107 r->connection->tcp_nopush_enabled = 1;
108 }
109
110 } else {
111 r->connection->tcp_nopush_enabled = 1;
112 }
113
114 #else
115
116 r->connection->tcp_nopush_enabled = 1;
117
118 #endif
119
120 if (r->http_version < NGX_HTTP_VERSION_10) { 97 if (r->http_version < NGX_HTTP_VERSION_10) {
121 return NGX_OK; 98 return NGX_OK;
122 } 99 }
123 100
124 if (r->method == NGX_HTTP_HEAD) { 101 if (r->method == NGX_HTTP_HEAD) {