Skip to content
  1. Apr 03, 2018
  2. Apr 02, 2018
  3. Apr 01, 2018
  4. Mar 31, 2018
  5. Mar 30, 2018
  6. Mar 29, 2018
  7. Mar 28, 2018
  8. Mar 27, 2018
  9. Mar 26, 2018
  10. Mar 25, 2018
  11. Mar 24, 2018
  12. Mar 23, 2018
  13. Mar 22, 2018
  14. Mar 21, 2018
  15. Mar 20, 2018
    • Christophe Jaillet's avatar
      Use 'ap_request_has_body()' instead of duplicating its implemenation. · 7dca1e0c
      Christophe Jaillet authored
      The logic in 'ap_request_has_body()' is:
          has_body = (!r->header_only
                      && (r->kept_body
                          || apr_table_get(r->headers_in, "Transfer-Encoding")
                          || ( (cls = apr_table_get(r->headers_in, "Content-Length"))
                              && (apr_strtoff(&cl, cls, &estr, 10) == APR_SUCCESS)
                              && (!*estr)
                              && (cl > 0) )
                          )
                      );
      So the test is slighly different from the original code. (but this looks fine to me)
      
      This also has the advantage to avoid a redundant call to 'apr_table_get()' and to improve readability.
      
      While at it, move the test '!r->expecting_100' a few lines above because it is cheap.
      
      git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1827374 13f79535-47bb-0310-9956-ffa450edef68
      7dca1e0c