Bug #68069 [NEW]: Overwriting HTTP headers with stream_context_create

From: Date: Mon, 22 Sep 2014 08:27:14 +0000
Subject: Bug #68069 [NEW]: Overwriting HTTP headers with stream_context_create
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-187644@lists.php.net to get a copy of this message
From: stereoshoots at gmail dot com Operating system: FreeBSD PHP version: 5.5.17 Package: SOAP related Bug Type: Bug Bug description:Overwriting HTTP headers with stream_context_create Description: ------------ stream_context_create dont overwrite HTTP headers. I'm trying to overwrite my content-type, but its not being overwrited. Test script: --------------- arrHttpHeaders = array( 'http' => array( 'header' => 'Content-Type: application/soap+xml; charset=utf-8\r\n Warning: Test warning' ) ); $streamContext = stream_context_create($arrHttpHeaders); $arrConfig = array_merge( self::getSoapClientConfiguration(), array( 'local_cert' => self::getAuthCertificatePath(), 'passphrase' => self::getAuthCertificatePassphrase(), 'stream_context' => $streamContext ) ); self::$objSoapClient = new SoapClient( self::getSoapClientWsdlPath(), $arrConfig ); Expected result: ---------------- POST **** HTTP/1.1 Host: **** Connection: Keep-Alive User-Agent: PHP-SOAP/5.5.16 Content-Type: application/soap+xml; charset=utf-8 SOAPAction: *** Content-Length: 234 Warning: Test warning Actual result: -------------- POST **** HTTP/1.1 Host: **** Connection: Keep-Alive User-Agent: PHP-SOAP/5.5.16 Content-Type: text/xml; charset=utf-8 SOAPAction: *** Content-Length: 234 Warning: Test warning -- Edit bug report at https://bugs.php.net/bug.php?id=68069&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=68069&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=68069&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=68069&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=68069&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=68069&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=68069&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=68069&r=needscript Try newer version: https://bugs.php.net/fix.php?id=68069&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=68069&r=support Expected behavior: https://bugs.php.net/fix.php?id=68069&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=68069&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=68069&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=68069&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=68069&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=68069&r=dst IIS Stability: https://bugs.php.net/fix.php?id=68069&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=68069&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=68069&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=68069&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=68069&r=mysqlcfg

« previous php.bugs (#187644) next »