Bug #79575 [NEW]: Content-Length header name is getting corrupted

From: Date: Fri, 08 May 2020 16:59:35 +0000
Subject: Bug #79575 [NEW]: Content-Length header name is getting corrupted
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-226965@lists.php.net to get a copy of this message
From: kevin dot seymour at gmail dot com Operating system: RHEL PHP version: 7.2.30 Package: *Compression related Bug Type: Bug Bug description:Content-Length header name is getting corrupted Description: ------------ When you run the below script you'll see the Content-Length header will come back with the correct value, but that the word Content is jumbled. For example: Cteonnt-Length: 195628. If you change Accept-Encoding to identity (disable compression) the value comes back correctly. This is causing unexpected end of data errors when we use SoapClient to attempt to parse a WSDL as only part of the XML is returned. There is a lot of testing information here: https://stackoverflow.com/questions/61681804/php-file-get-contents-returning-inconsistent-partial-data-for-http-requests Test script: --------------- php << 'EOF' <?php $ctx = stream_context_create(array( 'http' => array( 'header' => "Accept-Encoding: gzip" ) )); $xml = file_get_contents('https://webservices3.autotask.net/atservices/1.6/atws.wsdl', false, $ctx); echo var_dump($http_response_header); ?> EOF Expected result: ---------------- Content-Length should remain with the same header name. Actual result: -------------- Content-Length header field name is corrupted. -- Edit bug report at https://bugs.php.net/bug.php?id=79575&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=79575&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=79575&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=79575&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=79575&r=needscript Try newer version: https://bugs.php.net/fix.php?id=79575&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=79575&r=support Expected behavior: https://bugs.php.net/fix.php?id=79575&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=79575&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=79575&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=79575&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=79575&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=79575&r=dst IIS Stability: https://bugs.php.net/fix.php?id=79575&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=79575&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=79575&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=79575&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=79575&r=mysqlcfg

« previous php.bugs (#226965) next »