Ignore:
Timestamp:
02/03/09 19:41:37 (3 years ago)
Author:
George Potapov <nephrite@…>
Branches:
master-v0.7, nginx-v0.7, nginx-v0.8, upstream_count_limit
Children:
2ac4f5
Parents:
2240a4
git-author:
George Potapov <nephrite@…> (02/03/09 19:41:37)
git-committer:
George Potapov <nephrite@…> (02/03/09 19:41:37)
Message:

vendor drop nginx 0.7.31

File:
1 edited

Legend:

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

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