Changeset 4527:9c3a2fc3c460 in nginx


Ignore:
Timestamp:
03/15/12 11:21:54 (8 years ago)
Author:
Maxim Dounin <mdounin@…>
Branch:
default
Phase:
public
Convert:
svn:c3fe7df1-7212-e011-8a91-001109144009/trunk@4528
Message:

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).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/http/modules/ngx_http_uwsgi_module.c

    r4522 r4527  
    4343static ngx_int_t ngx_http_uwsgi_reinit_request(ngx_http_request_t *r);
    4444static ngx_int_t ngx_http_uwsgi_process_status_line(ngx_http_request_t *r);
    45 static ngx_int_t ngx_http_uwsgi_process_header(ngx_http_request_t *r);
    4645static ngx_int_t ngx_http_uwsgi_process_header(ngx_http_request_t *r);
    4746static void ngx_http_uwsgi_abort_request(ngx_http_request_t *r);
     
    913912
    914913    if (rc == NGX_ERROR) {
    915         r->http_version = NGX_HTTP_VERSION_9;
    916 
    917914        u->process_header = ngx_http_uwsgi_process_header;
    918 
    919915        return ngx_http_uwsgi_process_header(r);
    920916    }
     
    10161012                           "http uwsgi header done");
    10171013
    1018             if (r->http_version > NGX_HTTP_VERSION_9) {
     1014            u = r->upstream;
     1015
     1016            if (u->headers_in.status_n) {
    10191017                return NGX_OK;
    10201018            }
    1021 
    1022             u = r->upstream;
    10231019
    10241020            if (u->headers_in.status) {
     
    10331029                }
    10341030
    1035                 r->http_version = NGX_HTTP_VERSION_10;
    10361031                u->headers_in.status_n = status;
    10371032                u->headers_in.status_line = *status_line;
    10381033
    10391034            } else if (u->headers_in.location) {
    1040                 r->http_version = NGX_HTTP_VERSION_10;
    10411035                u->headers_in.status_n = 302;
    10421036                ngx_str_set(&u->headers_in.status_line,
     
    10441038
    10451039            } else {
    1046                 ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
    1047                               "upstream sent neither valid HTTP/1.0 header "
    1048                               "nor \"Status\" header line");
    10491040                u->headers_in.status_n = 200;
    10501041                ngx_str_set(&u->headers_in.status_line, "200 OK");
Note: See TracChangeset for help on using the changeset viewer.