mirror of
https://github.com/nginx/nginx.git
synced 2025-06-12 21:52:41 +08:00
nginx-0.0.3-2004-05-10-23:53:35 import
This commit is contained in:
parent
5aeeb2dc46
commit
11688f8a53
5
auto/cc
5
auto/cc
@ -241,7 +241,7 @@ case $CC in
|
|||||||
|
|
||||||
|
|
||||||
wcl386)
|
wcl386)
|
||||||
# Open Watcom 1.0
|
# Open Watcom C 1.0
|
||||||
|
|
||||||
# optimization
|
# optimization
|
||||||
|
|
||||||
@ -295,6 +295,9 @@ case $CC in
|
|||||||
# quiet
|
# quiet
|
||||||
CFLAGS="$CFLAGS -zq"
|
CFLAGS="$CFLAGS -zq"
|
||||||
|
|
||||||
|
# Open Watcom C 1.2
|
||||||
|
have=HAVE_C99_VARIADIC_MACROS . auto/have
|
||||||
|
|
||||||
# precompiled headers
|
# precompiled headers
|
||||||
CORE_DEPS="$CORE_DEPS $OBJS\\ngx_config.pch"
|
CORE_DEPS="$CORE_DEPS $OBJS\\ngx_config.pch"
|
||||||
PCH="$OBJS\\ngx_config.pch"
|
PCH="$OBJS\\ngx_config.pch"
|
||||||
|
@ -1202,6 +1202,11 @@ static char *ngx_http_proxy_parse_upstream(ngx_str_t *url,
|
|||||||
if (u->port_text.len > 0) {
|
if (u->port_text.len > 0) {
|
||||||
u->port = ngx_atoi(u->port_text.data, u->port_text.len);
|
u->port = ngx_atoi(u->port_text.data, u->port_text.len);
|
||||||
if (u->port > 0) {
|
if (u->port > 0) {
|
||||||
|
|
||||||
|
if (u->port == 80) {
|
||||||
|
u->default_port = 1;
|
||||||
|
}
|
||||||
|
|
||||||
u->port = htons((u_short) u->port);
|
u->port = htons((u_short) u->port);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -70,7 +70,7 @@ int ngx_http_write_filter(ngx_http_request_t *r, ngx_chain_t *in)
|
|||||||
{
|
{
|
||||||
int last;
|
int last;
|
||||||
off_t size, flush;
|
off_t size, flush;
|
||||||
ngx_chain_t *cl, **ll, *chain;
|
ngx_chain_t *cl, *ln, **ll, *chain;
|
||||||
ngx_http_write_filter_ctx_t *ctx;
|
ngx_http_write_filter_ctx_t *ctx;
|
||||||
ngx_http_write_filter_conf_t *conf;
|
ngx_http_write_filter_conf_t *conf;
|
||||||
|
|
||||||
@ -105,8 +105,8 @@ int ngx_http_write_filter(ngx_http_request_t *r, ngx_chain_t *in)
|
|||||||
|
|
||||||
/* add the new chain to the existent one */
|
/* add the new chain to the existent one */
|
||||||
|
|
||||||
for (/* void */; in; in = in->next) {
|
for (ln = in; ln; ln = ln->next) {
|
||||||
ngx_alloc_link_and_set_hunk(cl, in->hunk, r->pool, NGX_ERROR);
|
ngx_alloc_link_and_set_hunk(cl, ln->hunk, r->pool, NGX_ERROR);
|
||||||
*ll = cl;
|
*ll = cl;
|
||||||
ll = &cl->next;
|
ll = &cl->next;
|
||||||
|
|
||||||
@ -129,11 +129,12 @@ int ngx_http_write_filter(ngx_http_request_t *r, ngx_chain_t *in)
|
|||||||
ngx_http_write_filter_module);
|
ngx_http_write_filter_module);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* avoid the output if there is no last hunk, no flush point and
|
* avoid the output if there is no last hunk, no flush point,
|
||||||
* the size of the hunks is smaller than "postpone_output" directive
|
* there are the incoming hunks and the size of all hunks
|
||||||
|
* is smaller than "postpone_output" directive
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!last && flush == 0 && size < (off_t) conf->postpone_output) {
|
if (!last && flush == 0 && in && size < (off_t) conf->postpone_output) {
|
||||||
return NGX_OK;
|
return NGX_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -142,6 +143,8 @@ int ngx_http_write_filter(ngx_http_request_t *r, ngx_chain_t *in)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (size == 0) {
|
if (size == 0) {
|
||||||
|
ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0,
|
||||||
|
"the http output chain is empty");
|
||||||
return NGX_OK;
|
return NGX_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user