comparison src/http/modules/proxy/ngx_http_proxy_handler.c @ 4:4b2dafa26fe2 NGINX_0_1_2

nginx 0.1.2 *) Feature: the --user=USER, --group=GROUP, and --with-ld-opt=OPTIONS options in configure. *) Feature: the server_name directive supports *.domain.tld. *) Bugfix: the portability improvements. *) Bugfix: if configuration file was set in command line, the reconfiguration was impossible; bug appeared in 0.1.1. *) Bugfix: proxy module may get caught in an endless loop when sendfile is not used. *) Bugfix: with sendfile the response was not recoded according to the charset module directives; bug appeared in 0.1.1. *) Bugfix: very seldom bug in the kqueue processing. *) Bugfix: the gzip module compressed the proxied responses that was already compressed.
author Igor Sysoev <http://sysoev.ru>
date Thu, 21 Oct 2004 00:00:00 +0400
parents cc9f381affaa
children 80ba094c6b3e
comparison
equal deleted inserted replaced
3:8beaf7b3241f 4:4b2dafa26fe2
287 offsetof(ngx_http_proxy_headers_in_t, connection) }, 287 offsetof(ngx_http_proxy_headers_in_t, connection) },
288 { ngx_string("Content-Type"), 288 { ngx_string("Content-Type"),
289 offsetof(ngx_http_proxy_headers_in_t, content_type) }, 289 offsetof(ngx_http_proxy_headers_in_t, content_type) },
290 { ngx_string("Content-Length"), 290 { ngx_string("Content-Length"),
291 offsetof(ngx_http_proxy_headers_in_t, content_length) }, 291 offsetof(ngx_http_proxy_headers_in_t, content_length) },
292 { ngx_string("Content-Encoding"),
293 offsetof(ngx_http_proxy_headers_in_t, content_encoding) },
292 { ngx_string("Last-Modified"), 294 { ngx_string("Last-Modified"),
293 offsetof(ngx_http_proxy_headers_in_t, last_modified) }, 295 offsetof(ngx_http_proxy_headers_in_t, last_modified) },
294 { ngx_string("Location"), 296 { ngx_string("Location"),
295 offsetof(ngx_http_proxy_headers_in_t, location) }, 297 offsetof(ngx_http_proxy_headers_in_t, location) },
296 { ngx_string("Accept-Ranges"), 298 { ngx_string("Accept-Ranges"),
398 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, ev->log, 0, 400 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, ev->log, 0,
399 "http proxy check client, write event:%d", ev->write); 401 "http proxy check client, write event:%d", ev->write);
400 402
401 #if (HAVE_KQUEUE) 403 #if (HAVE_KQUEUE)
402 404
403 if (ngx_event_flags & NGX_HAVE_KQUEUE_EVENT) { 405 if (ngx_event_flags & NGX_USE_KQUEUE_EVENT) {
404 406
405 if (!ev->pending_eof) { 407 if (!ev->pending_eof) {
406 return; 408 return;
407 } 409 }
408 410
1308 } 1310 }
1309 1311
1310 1312
1311 static char *ngx_http_proxy_lowat_check(ngx_conf_t *cf, void *post, void *data) 1313 static char *ngx_http_proxy_lowat_check(ngx_conf_t *cf, void *post, void *data)
1312 { 1314 {
1313 #if __FreeBSD__
1314
1315 ssize_t *np = data; 1315 ssize_t *np = data;
1316
1317 #if (NGX_FREEBSD)
1316 1318
1317 if (*np >= ngx_freebsd_net_inet_tcp_sendspace) { 1319 if (*np >= ngx_freebsd_net_inet_tcp_sendspace) {
1318 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, 1320 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
1319 "\"proxy_send_lowat\" must be less than %d " 1321 "\"proxy_send_lowat\" must be less than %d "
1320 "(sysctl net.inet.tcp.sendspace)", 1322 "(sysctl net.inet.tcp.sendspace)",
1321 ngx_freebsd_net_inet_tcp_sendspace); 1323 ngx_freebsd_net_inet_tcp_sendspace);
1322 1324
1323 return NGX_CONF_ERROR; 1325 return NGX_CONF_ERROR;
1324 } 1326 }
1325 1327
1326 1328 #elif !(HAVE_SO_SNDLOWAT)
1327 #else 1329
1328
1329 #if 0
1330 ngx_conf_log_error(NGX_LOG_WARN, cf, 0, 1330 ngx_conf_log_error(NGX_LOG_WARN, cf, 0,
1331 "\"proxy_send_lowat\" is not supported, ignored"); 1331 "\"proxy_send_lowat\" is not supported, ignored");
1332 1332
1333 *np = 0; 1333 *np = 0;
1334
1334 #endif 1335 #endif
1335 1336
1336 #endif
1337
1338 return NGX_CONF_OK; 1337 return NGX_CONF_OK;
1339 } 1338 }