diff options
Diffstat (limited to 'src/http/modules')
-rw-r--r-- | src/http/modules/ngx_http_fastcgi_module.c | 3 | ||||
-rw-r--r-- | src/http/modules/ngx_http_proxy_module.c | 9 | ||||
-rw-r--r-- | src/http/modules/perl/Makefile.PL | 1 | ||||
-rw-r--r-- | src/http/modules/perl/ngx_http_perl_module.c | 2 |
4 files changed, 10 insertions, 5 deletions
diff --git a/src/http/modules/ngx_http_fastcgi_module.c b/src/http/modules/ngx_http_fastcgi_module.c index 978c32542..715b07020 100644 --- a/src/http/modules/ngx_http_fastcgi_module.c +++ b/src/http/modules/ngx_http_fastcgi_module.c @@ -1043,8 +1043,7 @@ ngx_http_fastcgi_process_header(ngx_http_request_t *r) /* there was error while a header line parsing */ ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, - ngx_http_upstream_header_errors[rc - - NGX_HTTP_PARSE_HEADER_ERROR]); + "upstream sent invalid header"); return NGX_HTTP_UPSTREAM_INVALID_HEADER; diff --git a/src/http/modules/ngx_http_proxy_module.c b/src/http/modules/ngx_http_proxy_module.c index e66b48b8b..34e6dd197 100644 --- a/src/http/modules/ngx_http_proxy_module.c +++ b/src/http/modules/ngx_http_proxy_module.c @@ -800,9 +800,11 @@ ngx_http_proxy_process_status_line(ngx_http_request_t *r) ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, "upstream sent no valid HTTP/1.0 header"); +#if 0 if (u->accel) { return NGX_HTTP_UPSTREAM_INVALID_HEADER; } +#endif r->http_version = NGX_HTTP_VERSION_9; p->status = NGX_HTTP_OK; @@ -961,6 +963,10 @@ ngx_http_proxy_parse_status_line(ngx_http_request_t *r, ngx_http_proxy_ctx_t *p) /* HTTP status code */ case sw_status: + if (ch == ' ') { + break; + } + if (ch < '0' || ch > '9') { return NGX_HTTP_PROXY_PARSE_NO_HEADER; } @@ -1111,8 +1117,7 @@ ngx_http_proxy_process_header(ngx_http_request_t *r) /* there was error while a header line parsing */ ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, - ngx_http_upstream_header_errors[rc - - NGX_HTTP_PARSE_HEADER_ERROR]); + "upstream sent invalid header"); return NGX_HTTP_UPSTREAM_INVALID_HEADER; } diff --git a/src/http/modules/perl/Makefile.PL b/src/http/modules/perl/Makefile.PL index 6fa3df744..48f1ebcd2 100644 --- a/src/http/modules/perl/Makefile.PL +++ b/src/http/modules/perl/Makefile.PL @@ -13,6 +13,7 @@ WriteMakefile( AUTHOR => 'Igor Sysoev', CCFLAGS => "$ENV{NGX_PERL_CFLAGS}", + OPTIMIZE => '-O', INC => "-I ../../../../../src/core " . "-I ../../../../../src/event " . diff --git a/src/http/modules/perl/ngx_http_perl_module.c b/src/http/modules/perl/ngx_http_perl_module.c index 069c21646..0a982e6e4 100644 --- a/src/http/modules/perl/ngx_http_perl_module.c +++ b/src/http/modules/perl/ngx_http_perl_module.c @@ -632,7 +632,7 @@ ngx_http_perl_call_handler(pTHX_ ngx_http_request_t *r, SV *sub, "call_sv: %d", status); } else { - line = POPpx; + line = SvPVx(POPs, n_a); rv->len = n_a; rv->data = ngx_palloc(r->pool, n_a); |