|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull Requests |
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Dec 07 15:00:01 2025 UTC |
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