Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:31725 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 3495 invoked by uid 1010); 20 Aug 2007 04:17:55 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 3480 invoked from network); 20 Aug 2007 04:17:55 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Aug 2007 04:17:55 -0000 Authentication-Results: pb1.pair.com header.from=abaker@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=abaker@php.net; spf=unknown; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 204.127.192.82 as permitted sender) X-PHP-List-Original-Sender: abaker@php.net X-Host-Fingerprint: 204.127.192.82 rwcrmhc12.comcast.net NetCache Data OnTap 5.x Received: from [204.127.192.82] ([204.127.192.82:35564] helo=rwcrmhc12.comcast.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 60/50-00582-0F519C64 for ; Mon, 20 Aug 2007 00:17:53 -0400 Received: from [192.168.0.22] (c-69-142-19-57.hsd1.nj.comcast.net[69.142.19.57]) by comcast.net (rwcrmhc12) with SMTP id <20070820041748m1200dis4ee>; Mon, 20 Aug 2007 04:17:49 +0000 To: "Brian A. Seklecki" Cc: internals@lists.php.net In-Reply-To: <20070818140645.W1800@arbitor.digitalfreaks.org> References: <20070818140645.W1800@arbitor.digitalfreaks.org> Content-Type: text/plain Date: Mon, 20 Aug 2007 04:50:42 -0400 Message-ID: <1187599842.8762.15.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.6.2 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: [PHP] HTTP 1.1 keep-alive support in ext/soap/php_http.c ? (fwd) From: abaker@php.net (Al Baker) Keep-alive support in SOAP is often problematic as most SOAP frameworks were originally developed under the assumptions that the SOAP HTTP binding would be HTTP 1.0, which is no longer the case. Since RPC SOAP operations are not like document downloading in the strict HTTP sense, frameworks have done different things depending on the situation. For example, gSOAP supports HTTP 1.1 but only sends the HTTP authorization header when it first establishes the connection. This places additional requirements on a SOAP server with a gSOAP/HTTP 1.1 client to recognize that the authorization happened at the connection level and multiple SOAP invocations could be taking place over that connection. I'm not saying gSOAP is correct, I'm just saying that putting connection re-use and keep alives into the mix requires you to deal with interoperability issues at yet another level. My vote would be if you're going to allow HTTP 1.1 keep alives to be sent, we need to give access to the programmer to use or not to use them. Otherwise, I would never send keep alives. In PEAR::SOAP, there is a level of control with this for HTTP bindings since you can get access to curl for setting whatever HTTP configuration you want. For PHP5 SOAP, I would like to eventually see some more control over the SOAP binding, in line with the SOAP 1.2 Messaging Framework specification. Regards, Al On Sat, 2007-08-18 at 14:07 -0400, Brian A. Seklecki wrote: > Shall I submit a bug/patch to uncomment the HTTP 1.1 support? Is it still > broken with proxy servers? > > Thanks, > > l8* > -lava (Brian A. Seklecki - Pittsburgh, PA, USA) > http://www.spiritual-machines.org/ > > > ---------- Forwarded message ---------- > Date: Tue, 14 Aug 2007 19:33:26 -0400 (EDT) > From: Brian A. Seklecki > To: php-general@lists.php.net > Subject: Re: [PHP] HTTP 1.1 keep-alive support in ext/soap/php_http.c ? (fwd) > > > Found it: > > http://cvs.php.net/viewvc.cgi/php-src/ext/soap/php_http.c?annotate=1.109 > > Lines 892->895 and 903->905 bring the violence. > > Rev 1.28 commented it out: > > http://cvs.php.net/viewvc.cgi/php-src/ext/soap/php_http.c?r1=1.27&r2=1.28 > > > The bugs assocaited with it are: > http://bugs.php.net/bug.php?id=33164 > http://bugs.php.net/bug.php?id=30329 > > Please advise on a course of action -- I will open another bug report if > requested. > > http://wiki.apache.org/ws/FrontPage/Axis/AxisCommonsHTTP > > Extract from [WWW] RFC 2616 : HTTP/1.1 - Persistent Connection : > > "* An HTTP/1.1 server MAY assume that a HTTP/1.1 client intends to maintain a > persistent connection unless a Connection header including the connection-token > "close" was sent in the request." > > Then presumably, unless the server explicitly closes the connection by > instructing the client to do so in headers, the client may simply check for the > presence of "HTTP/1.1" and continue to cane the connection/socket. > > Cane one! > > ~BAS > > On Tue, 14 Aug 2007, Brian A. Seklecki wrote: > > > > > Re-send to php-general@ since soap@ is a ghost town. > > > > Per the msg below, still trying to figure out why each client call to any > > server results in a new TCP socket being built and closed (BAD!) > > > > I finally got around to: > > print "Request :\n" . $soapClient->__getLastRequestHeaders() . "\n"; > > print "Request :\n" . $soapClient->__getLastRequest() . "\n"; > > print "Response:\n" . $soapClient->__getLastResponseHeaders() . "\n"; > > print "Response:\n" . $soapClient->__getLastResponse() . "\n"; > > > > As well as checking tcpdump(8) --- my worst fears are confirmed. > > > > The client headers says: > > Connection: Keep-Alive > > > > The server header response says: > > Response: > > HTTP/1.1 200 OK > > Content-Type: application/soap+xml;charset=utf-8 > > Transfer-Encoding: chunked > > Date: Tue, 14 Aug 2007 22:35:07 GMT > > Server: Apache-Coyote/1.1 > > > > And yet, the PHP client running from the CLI binary executing the same > > function call to the server opens & closes two sockets to accomplish the > > work! > > > > ~BAS > > > > ---------- Forwarded message ---------- > > Date: Wed, 8 Aug 2007 11:51:50 -0400 (EDT) > > From: Brian A. Seklecki > > To: soap@lists.php.net > > Subject: [SOAP] HTTP 1.1 keep-alive support in ext/soap/php_http.c ? > > > > > > All: > > > > Am I correct in reading ext/soap/php_http.c that the SoapClient / SoapServer > > object will not transmit a "Connection: Close" line into the HTTP header > > (either via the Client call itself or by modifying Apache's response?) > > > > E.g., by default PHP SOAP client recycles HTTP connections to the server for > > calls to methods using the same server object / instance? > > > > > > l8* > > -lava (Brian A. Seklecki - Pittsburgh, PA, USA) > > http://www.spiritual-machines.org/ > > > > -- > > PHP Soap Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > l8* > -lava (Brian A. Seklecki - Pittsburgh, PA, USA) > http://www.spiritual-machines.org/ > > "Guilty? Yeah. But he knows it. I mean, you're guilty. > You just don't know it. So who's really in jail?" > ~Maynard James Keenan >