From: Noah Sanci Date: Fri, 17 Sep 2021 14:45:39 +0000 (-0400) Subject: debuginfod: Remove checking for unsafe headers X-Git-Tag: elfutils-0.186~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=28db5f16c44fa7bbd24b221b65aa4d133753355c;p=thirdparty%2Felfutils.git debuginfod: Remove checking for unsafe headers Some http response header checks were removed such as checking for Connection and Cache-Control. These headers are not guarenteed to be received and depend on proxy and libmicrohttpd versions. Checking for the existance of Content-Length and DEBUGINFOD-* headers is sufficient since Content-Length is added upon creation of an MHD_Response object and DEBUGINFOD-* are added manually. (source on Content-Length being added: https://www.gnu.org/software/libmicrohttpd/manual/libmicrohttpd.html# microhttpd_002dresponse-headers ) Signed-off-by: Noah Sanci --- diff --git a/tests/ChangeLog b/tests/ChangeLog index c73f2534c..b62bb3507 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,8 @@ +2021-09-17 Noah Sanci + + * run-debuginfod-response-header.sh: removed checking for Connection + and Cache-Control in response headers. + 2021-09-08 Mark Wielaard * run-varlocs-vars.sh: New test. diff --git a/tests/run-debuginfod-response-headers.sh b/tests/run-debuginfod-response-headers.sh index bdb39b4d1..10b2ab498 100755 --- a/tests/run-debuginfod-response-headers.sh +++ b/tests/run-debuginfod-response-headers.sh @@ -74,8 +74,6 @@ env DEBUGINFOD_URLS="http://127.0.0.1:"$PORT1 LD_LIBRARY_PATH=$ldpath ${abs_top_ -vvv executable F/prog > vlog-find$PORT1.1 2>&1 tempfiles vlog-find$PORT1.1 grep 'Content-Length: ' vlog-find$PORT1.1 -grep 'Connection: ' vlog-find$PORT1.1 -grep 'Cache-Control: ' vlog-find$PORT1.1 grep 'X-DEBUGINFOD-FILE: ' vlog-find$PORT1.1 grep 'X-DEBUGINFOD-SIZE: ' vlog-find$PORT1.1 @@ -84,8 +82,6 @@ env DEBUGINFOD_URLS="http://127.0.0.1:"$PORT1 LD_LIBRARY_PATH=$ldpath ${abs_top_ -vvv executable c36708a78618d597dee15d0dc989f093ca5f9120 > vlog-find$PORT1.2 2>&1 tempfiles vlog-find$PORT1.2 grep 'Content-Length: ' vlog-find$PORT1.2 -grep 'Connection: ' vlog-find$PORT1.2 -grep 'Cache-Control: ' vlog-find$PORT1.2 grep 'X-DEBUGINFOD-FILE: ' vlog-find$PORT1.2 grep 'X-DEBUGINFOD-SIZE: ' vlog-find$PORT1.2 grep 'X-DEBUGINFOD-ARCHIVE: ' vlog-find$PORT1.2