aboutsummaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/nginx.h2
-rw-r--r--src/core/ngx_connection.c10
-rw-r--r--src/core/ngx_inet.c30
-rw-r--r--src/core/ngx_output_chain.c8
4 files changed, 26 insertions, 24 deletions
diff --git a/src/core/nginx.h b/src/core/nginx.h
index 879c25fb8..5a3593d35 100644
--- a/src/core/nginx.h
+++ b/src/core/nginx.h
@@ -8,7 +8,7 @@
#define _NGINX_H_INCLUDED_
-#define NGINX_VER "nginx/0.3.5"
+#define NGINX_VER "nginx/0.3.6"
#define NGINX_VAR "NGINX"
#define NGX_OLDPID_EXT ".oldbin"
diff --git a/src/core/ngx_connection.c b/src/core/ngx_connection.c
index 94f816bff..2e3466954 100644
--- a/src/core/ngx_connection.c
+++ b/src/core/ngx_connection.c
@@ -367,9 +367,8 @@ ngx_configure_listening_socket(ngx_cycle_t *cycle)
== -1)
{
ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_socket_errno,
- "setsockopt(SO_RCVBUF) %V failed, ignored",
- &ls[i].addr_text);
- return;
+ "setsockopt(SO_RCVBUF, %d) %V failed, ignored",
+ ls[i].rcvbuf, &ls[i].addr_text);
}
}
@@ -379,9 +378,8 @@ ngx_configure_listening_socket(ngx_cycle_t *cycle)
== -1)
{
ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_socket_errno,
- "setsockopt(SO_SNDBUF) %V failed, ignored",
- &ls[i].addr_text);
- return;
+ "setsockopt(SO_SNDBUF, %d) %V failed, ignored",
+ ls[i].sndbuf, &ls[i].addr_text);
}
}
diff --git a/src/core/ngx_inet.c b/src/core/ngx_inet.c
index 60a40eca4..4be55fdb5 100644
--- a/src/core/ngx_inet.c
+++ b/src/core/ngx_inet.c
@@ -452,7 +452,23 @@ ngx_inet_parse_host_port(ngx_inet_upstream_t *u)
}
}
- if (u->port_text.data == NULL) {
+ if (u->port_text.data) {
+
+ if (u->port_text.len == 0) {
+ u->port_text.len = &url->data[i] - u->port_text.data;
+
+ if (u->port_text.len == 0) {
+ return "invalid port";
+ }
+ }
+
+ port = ngx_atoi(u->port_text.data, u->port_text.len);
+
+ if (port == NGX_ERROR || port < 1 || port > 65536) {
+ return "invalid port";
+ }
+
+ } else {
port = ngx_atoi(url->data, url->len);
if (port == NGX_ERROR) {
@@ -464,18 +480,6 @@ ngx_inet_parse_host_port(ngx_inet_upstream_t *u)
u->port_text = *url;
u->wildcard = 1;
-
- } else {
- if (u->port_text.len == 0) {
- u->default_port = 1;
- return NULL;
- }
-
- port = ngx_atoi(u->port_text.data, u->port_text.len);
-
- if (port == NGX_ERROR || port < 1 || port > 65536) {
- return "invalid port";
- }
}
u->port = (in_port_t) port;
diff --git a/src/core/ngx_output_chain.c b/src/core/ngx_output_chain.c
index 1e7229114..03d956d5d 100644
--- a/src/core/ngx_output_chain.c
+++ b/src/core/ngx_output_chain.c
@@ -212,12 +212,12 @@ ngx_output_chain(ngx_output_chain_ctx_t *ctx, ngx_chain_t *in)
last = ctx->output_filter(ctx->filter_ctx, out);
- ngx_chain_update_chains(&ctx->free, &ctx->busy, &out, ctx->tag);
- last_out = &out;
-
- if (last == NGX_ERROR) {
+ if (last == NGX_ERROR || last == NGX_DONE) {
return last;
}
+
+ ngx_chain_update_chains(&ctx->free, &ctx->busy, &out, ctx->tag);
+ last_out = &out;
}
}