comparison src/http/ngx_http_header_filter_module.c @ 2512:2e91aecb9e57

a prelimiary IPv6 support, HTTP listen
author Igor Sysoev <igor@sysoev.ru>
date Sat, 21 Feb 2009 07:02:02 +0000
parents 74477ea8074f
children 339da812982c
comparison
equal deleted inserted replaced
2511:f91c5c964e61 2512:2e91aecb9e57
159 ngx_chain_t out; 159 ngx_chain_t out;
160 ngx_list_part_t *part; 160 ngx_list_part_t *part;
161 ngx_table_elt_t *header; 161 ngx_table_elt_t *header;
162 ngx_http_core_loc_conf_t *clcf; 162 ngx_http_core_loc_conf_t *clcf;
163 ngx_http_core_srv_conf_t *cscf; 163 ngx_http_core_srv_conf_t *cscf;
164 /* AF_INET only */ 164 u_char addr[NGX_SOCKADDR_STRLEN];
165 u_char addr[NGX_INET_ADDRSTRLEN];
166 165
167 r->header_sent = 1; 166 r->header_sent = 1;
168 167
169 if (r != r->main) { 168 if (r != r->main) {
170 return NGX_OK; 169 return NGX_OK;
288 287
289 } else if (r->headers_in.server.len) { 288 } else if (r->headers_in.server.len) {
290 host = r->headers_in.server; 289 host = r->headers_in.server;
291 290
292 } else { 291 } else {
292 host.len = NGX_SOCKADDR_STRLEN;
293 host.data = addr; 293 host.data = addr;
294 294
295 if (ngx_http_server_addr(r, &host) != NGX_OK) { 295 if (ngx_http_server_addr(r, &host) != NGX_OK) {
296 return NGX_ERROR; 296 return NGX_ERROR;
297 } 297 }