/[Apache-SVN]
ViewVC logotype

Revision 1804005


Jump to revision: Previous Next
Author: kotkov
Date: Thu Aug 3 15:01:21 2017 UTC (6 years, 10 months ago)
Changed paths: 2
Log Message:
Fix an edge case in the dechunk bucket where it could erroneously report
APR_EOF instead of an error in presence of a truncated response with
CRLF in place of the next chunk length.

* buckets/dechunk_buckets.c
  (wait_for_chunk): Check if we got an empty chunk size line before trying
   to parse it with apr_strtoi64().  Otherwise this function would report 0,
   which we would then incorrectly interpret as the final zero-sized chunk.

* test/test_buckets.c
  (test_response_body_chunked_truncated_with_crlf): New test, modelled
   after what httpd + mod_dav + mod_dav_svn can actually send when
   aborting connection due to an internal error.
  (test_linebuf_crlf_split): Update the expectation in this test, as the
   response in it didn't include the final zero-sized chunk.  That's ill-
   formed per RFC7230 3.3.3 and 4.1.
  (test_buckets): Add new test.


Changed paths

Path Details
Directoryserf/trunk/buckets/dechunk_buckets.c modified , text changed
Directoryserf/trunk/test/test_buckets.c modified , text changed

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26