[nginx] svn commit: r4528 - trunk/src/http/modules
mdounin at mdounin.ru
mdounin at mdounin.ru
Thu Mar 15 11:21:54 UTC 2012
Author: mdounin
Date: 2012-03-15 11:21:54 +0000 (Thu, 15 Mar 2012)
New Revision: 4528
Log:
Uwsgi: merged r->http_version fixes from scgi module.
Fixed incorrect use of r->http_version (r4372). Removed duplicate function
declaration (r4373). Removed error if there is no Status header (r4374).
Modified:
trunk/src/http/modules/ngx_http_uwsgi_module.c
Modified: trunk/src/http/modules/ngx_http_uwsgi_module.c
===================================================================
--- trunk/src/http/modules/ngx_http_uwsgi_module.c 2012-03-15 01:57:09 UTC (rev 4527)
+++ trunk/src/http/modules/ngx_http_uwsgi_module.c 2012-03-15 11:21:54 UTC (rev 4528)
@@ -43,7 +43,6 @@
static ngx_int_t ngx_http_uwsgi_reinit_request(ngx_http_request_t *r);
static ngx_int_t ngx_http_uwsgi_process_status_line(ngx_http_request_t *r);
static ngx_int_t ngx_http_uwsgi_process_header(ngx_http_request_t *r);
-static ngx_int_t ngx_http_uwsgi_process_header(ngx_http_request_t *r);
static void ngx_http_uwsgi_abort_request(ngx_http_request_t *r);
static void ngx_http_uwsgi_finalize_request(ngx_http_request_t *r,
ngx_int_t rc);
@@ -912,10 +911,7 @@
}
if (rc == NGX_ERROR) {
- r->http_version = NGX_HTTP_VERSION_9;
-
u->process_header = ngx_http_uwsgi_process_header;
-
return ngx_http_uwsgi_process_header(r);
}
@@ -1015,12 +1011,12 @@
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
"http uwsgi header done");
- if (r->http_version > NGX_HTTP_VERSION_9) {
+ u = r->upstream;
+
+ if (u->headers_in.status_n) {
return NGX_OK;
}
- u = r->upstream;
-
if (u->headers_in.status) {
status_line = &u->headers_in.status->value;
@@ -1032,20 +1028,15 @@
return NGX_HTTP_UPSTREAM_INVALID_HEADER;
}
- r->http_version = NGX_HTTP_VERSION_10;
u->headers_in.status_n = status;
u->headers_in.status_line = *status_line;
} else if (u->headers_in.location) {
- r->http_version = NGX_HTTP_VERSION_10;
u->headers_in.status_n = 302;
ngx_str_set(&u->headers_in.status_line,
"302 Moved Temporarily");
} else {
- ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
- "upstream sent neither valid HTTP/1.0 header "
- "nor \"Status\" header line");
u->headers_in.status_n = 200;
ngx_str_set(&u->headers_in.status_line, "200 OK");
}
More information about the nginx-devel
mailing list