Re: Bug in HTTP stream context causes problems in SoapClient/get_sdl()

From: Date: Sun, 25 Jan 2009 22:17:10 +0000
Subject: Re: Bug in HTTP stream context causes problems in SoapClient/get_sdl()
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-42837@lists.php.net to get a copy of this message
Hannes Magnusson wrote: > On Sun, Jan 25, 2009 at 22:43, Giovanni Giacobbi <giovanni@giacobbi.net> wrote: >> The problem turned out to be an invalid interpretation of the HTTP/1.1 protocol with >> "Transfer-Encoding: chunked" by the HTTP stream context, which caused get_sdl() to parse a >> WSDL including the chunk tags (hex numbers). >> >> Chunked encoding is used by Apache 2.0 when "Content-Length" is unavailable, the >> data content being sent is large enough, and the protocol is HTTP/1.1. > > PHP streams do not support chunked encoding, and I assume SOAP doesn't > either (although it does reinvent bunch of things, I don't think > chunked encoding was added). I thought the docs were quite explicit on > the subject.. if not, please open a doc bug. Then there is a problem, HTTP/1.1 mandates support for chunked encoding. In Apache's case, the stream should be dechunked before being passed to cgi, fcgid or apache2handler. The appropriate EOF state should be signalled when the chunked stream is exhausted. So how you are seeing the chunk headers is beyond me. Perhaps this hop-by-hop header should be eaten in apache before passing headers to the application?

« previous php.internals (#42837) next »