source: mod_gnutls/debian/patches/0001-Test-suite-Ensure-CRLF-line-ends-in-HTTP-headers.patch @ 34fd496

debian/masterdebian/stretch-backports
Last change on this file since 34fd496 was 34fd496, checked in by Daniel Kahn Gillmor <dkg@…>, 3 years ago

import fix for apache CRLF line endings

  • Property mode set to 100644
File size: 1.4 KB
  • test/runtests

    From: Thomas Klute <thomas2.klute@uni-dortmund.de>
    Date: Thu, 22 Dec 2016 22:10:07 +0100
    Subject: Test suite: Ensure CRLF line ends in HTTP headers
    
    Debian Sid updated Apache from 2.4.23 to 2.4.25 yesterday, and 2.4.24
    introduces stricter checks for the request syntax described in RFC
    7230. This breaks test cases where the request input file did not
    contain CRLF line ends. Fix by forcing CRLF line ends when sending
    requests in the runtest script.
    ---
     test/runtests | 6 +++++-
     1 file changed, 5 insertions(+), 1 deletion(-)
    
    diff --git a/test/runtests b/test/runtests
    index 5c8afe8..a253686 100755
    a b sleep_pidfile="$(mktemp mod_gnutls_test-XXXXXX.pid)" 
    207207# failing tests. Sending sleep to the background allows the test
    208208# case to proceed instead of waiting for it to return. The sleep
    209209# process is stopped after gnutls-cli terminates.
    210 if (sed "s/__HOSTNAME__/${TEST_HOST}/" <${t}/input && \
     210#
     211# The line end manipulation in sed guarantees that all header lines
     212# end with CRLF as required by RFC 7230, Section 3.1.1 regardless of
     213# the line ends in the input file.
     214if (sed -r "s/__HOSTNAME__/${TEST_HOST}/;s/\r?$/\r/" <${t}/input && \
    211215           run_with_pidfile "${sleep_pidfile}" sleep "${TEST_QUERY_DELAY}" &) | \
    212216       gnutls-cli -p "${TEST_PORT}" $(cat ${t}/gnutls-cli.args) "${TEST_HOST}" \
    213217       | tee "$output" && test "${PIPESTATUS[1]}" -eq 0;
Note: See TracBrowser for help on using the repository browser.