|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-10-21 10:10 UTC] dmitry@php.net
[2004-10-21 11:14 UTC] jacob at internet24 dot de
[2008-11-28 14:36 UTC] dmitry@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 23:00:01 2025 UTC |
Description: ------------ When using SoapClient to do HTTP Soap Requests using a Soap::Lite (0.55) Server in HTTP-Daemon mode, php soap opens a new HTTP connection for each new SOAP operation executed, despite the fact that SOAP::Lite keeps the HTTP connection open as requested by php soap ("Connection: Keep-Alive" set in the Request HTTP headers). The reason for is that php soap closes the persistent socket when it does not receive a "Connection: Keep-Alive" Header in the reply message from SOAP::Lite. Cf.: ext/soap/php_http.c 643 connection = get_http_header_value(http_headers,"Connection: "); 644 if (connection) { 645 if (strncasecmp(connection, "Keep-Alive", sizeof("Keep-Alive")-1) == 0) { 646 http_close = FALSE; 647 } 648 efree(connection); I believe that is an incorrect interpretation of the HTTP/1.1 standard, php soap should only explicitly close the connection, with an HTTP/1.1 server, when it receives a "Connection: Close" in the response, not when there is just no "Connection: Keep-Alive" in the reply headers. Right? Cf.: (http://www.w3.org/Protocols/rfc2616/rfc2616-sec8.html#sec8.1) RFC2616, Section 8.1.2.1 states: "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. If the server chooses to close the connection immediately after sending the response, it SHOULD send a Connection header including the connection-token close. An HTTP/1.1 client MAY expect a connection to remain open, but would decide to keep it open based on whether the response from a server contains a Connection header with the connection-token close. In case the client does not want to maintain a connection for more than that request, it SHOULD send a Connection header including the connection-token close."