Ignore:
Timestamp:
02/03/09 19:54:45 (3 years ago)
Author:
George Potapov <nephrite@…>
Branches:
master-v0.6, nginx-v0.6
Children:
209e69, 6c857c, e8c363f79fad03918abb189d5a026fd0cd6d14f4
Parents:
60af37
git-author:
George Potapov <nephrite@…> (02/03/09 19:54:45)
git-committer:
George Potapov <nephrite@…> (02/03/09 19:54:45)
Message:

vendor drop nginx 0.6.35

File:
1 edited

Legend:

Unmodified
Added
Removed
  • server/src/http/ngx_http_request_body.c

    rb57b1b rfeb0c3  
    1717static void ngx_http_read_discarded_request_body_handler(ngx_http_request_t *r); 
    1818static ngx_int_t ngx_http_read_discarded_request_body(ngx_http_request_t *r); 
     19static ngx_int_t ngx_http_test_expect(ngx_http_request_t *r); 
    1920 
    2021 
     
    4142        post_handler(r); 
    4243        return NGX_OK; 
     44    } 
     45 
     46    if (ngx_http_test_expect(r) != NGX_OK) { 
     47        return NGX_HTTP_INTERNAL_SERVER_ERROR; 
    4348    } 
    4449 
     
    435440    } 
    436441 
     442    if (ngx_http_test_expect(r) != NGX_OK) { 
     443        return NGX_HTTP_INTERNAL_SERVER_ERROR; 
     444    } 
     445 
    437446    rev = r->connection->read; 
    438447 
     
    583592    return NGX_AGAIN; 
    584593} 
     594 
     595 
     596static ngx_int_t 
     597ngx_http_test_expect(ngx_http_request_t *r) 
     598{ 
     599    ngx_int_t   n; 
     600    ngx_str_t  *expect; 
     601 
     602    if (r->expect_tested 
     603        || r->headers_in.expect == NULL 
     604        || r->http_version < NGX_HTTP_VERSION_11) 
     605    { 
     606        return NGX_OK; 
     607    } 
     608 
     609    r->expect_tested = 1; 
     610 
     611    expect = &r->headers_in.expect->value; 
     612 
     613    if (expect->len != sizeof("100-continue") - 1 
     614        || ngx_strncasecmp(expect->data, (u_char *) "100-continue", 
     615                           sizeof("100-continue") - 1) 
     616           != 0) 
     617    { 
     618        return NGX_OK; 
     619    } 
     620 
     621    ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, 
     622                   "send 100 Continue"); 
     623 
     624    n = r->connection->send(r->connection, 
     625                            (u_char *) "HTTP/1.1 100 Continue" CRLF CRLF, 
     626                            sizeof("HTTP/1.1 100 Continue" CRLF CRLF) - 1); 
     627 
     628    if (n == sizeof("HTTP/1.1 100 Continue" CRLF CRLF) - 1) { 
     629        return NGX_OK; 
     630    } 
     631 
     632    /* we assume that such small packet should be send successfully */ 
     633 
     634    return NGX_ERROR; 
     635} 
Note: See TracChangeset for help on using the changeset viewer.