php-src/ext
Adam Harvey 8983a38d51 Request non-keep-alive connections by default in HTTP 1.1 requests.
As noted in FR #65634, at present we don't send a Connection request header
when the protocol version is set to 1.1, which means that RFC-compliant Web
servers should respond with keep-alive connections. Since there's no way of
reusing the HTTP connection at present, this simply means that PHP will appear
to hang until the remote server hits its connection timeout, which may be quite
some time.

This commit sends a "Connection: close" header by default when HTTP 1.1 (or
later) is requested by the user via the context options. It can be overridden
by specifying a Connection header in the context options. It isn't possible to
disable sending of the Connection header, but given "Connection: keep-alive" is
the same as the default HTTP 1.1 behaviour, I don't see this as a significant
issue — users who want to opt in for that still can.

As a note, although I've removed an efree(protocol_version), this doesn't
result in a memory leak: protocol_version is freed in the out: block at the end
of the function anyway, and there are no returns between the removed efree()
and the later call. Yes, I ran the tests with valgrind to check that. ☺

Implements FR #65634 (HTTP wrapper is very slow with protocol_version 1.1).
2013-09-11 14:11:29 -07:00
..
bcmath Happy New Year 2013-01-01 16:37:09 +08:00
bz2 Merge branch 'PHP-5.5' 2013-08-19 17:51:04 -07:00
calendar Fixed bug #64895 Integer overflow in SndToJewish 2013-05-22 08:30:50 +02:00
com_dotnet HASH_KEY_NON_EXISTANT fix 2013-07-21 20:09:53 -07:00
ctype Happy New Year 2013-01-01 16:37:09 +08:00
curl Allow CURLOPT_FOLLOWLOCATION to be used with open_basedir. 2013-09-10 11:42:42 -07:00
date Merge branch 'PHP-5.5' 2013-08-30 10:46:06 +02:00
dba Reduce (some) compile noise of 'unused variable' and 'may be used uninitialized' warnings. 2013-08-14 20:36:50 -07:00
dom Merge branch 'PHP-5.4' into PHP-5.5 2013-08-21 15:43:19 -07:00
enchant Fix long-standing visual pain point: the misalignment of './configure help' text. 2013-08-06 11:06:09 -07:00
ereg Fix long-standing visual pain point: the misalignment of './configure help' text. 2013-08-06 11:06:09 -07:00
exif unify stdint type usage 2013-08-06 22:49:56 +02:00
fileinfo Merge branch 'PHP-5.5' 2013-08-04 16:07:13 -07:00
filter Fix long-standing visual pain point: the misalignment of './configure help' text. 2013-08-06 11:06:09 -07:00
ftp Remove compile warnings: 2013-08-19 17:48:46 -07:00
gd Merge branch 'PHP-5.5' 2013-09-09 11:56:58 +02:00
gettext Fix long-standing visual pain point: the misalignment of './configure help' text. 2013-08-06 11:06:09 -07:00
gmp Merge branch 'PHP-5.5' 2013-08-14 20:47:00 -07:00
hash Merge branch '2Guploads' 2013-08-09 11:47:25 +02:00
iconv Fix long-standing visual pain point: the misalignment of './configure help' text. 2013-08-06 11:06:09 -07:00
imap Merge branch 'PHP-5.4' into PHP-5.5 2013-08-24 21:40:52 -07:00
interbase Fix long-standing visual pain point: the misalignment of './configure help' text. 2013-08-06 11:06:09 -07:00
intl Merge branch 'PHP-5.4' into PHP-5.5 2013-08-22 09:06:43 -07:00
json HASH_KEY_NON_EXISTANT fix 2013-07-21 20:09:53 -07:00
ldap Fix long-standing visual pain point: the misalignment of './configure help' text. 2013-08-06 11:06:09 -07:00
libxml Merge branch 'PHP-5.5' 2013-08-10 17:56:46 -07:00
mbstring Fix long-standing visual pain point: the misalignment of './configure help' text. 2013-08-06 11:06:09 -07:00
mcrypt Fix long-standing visual pain point: the misalignment of './configure help' text. 2013-08-06 11:06:09 -07:00
mssql Fix long-standing visual pain point: the misalignment of './configure help' text. 2013-08-06 11:06:09 -07:00
mysql fix mysql tests & mark nextRowset problematic tests 2013-08-24 23:56:48 -07:00
mysqli Fix long-standing visual pain point: the misalignment of './configure help' text. 2013-08-06 11:06:09 -07:00
mysqlnd Merge branch '2Guploads' 2013-08-09 11:47:25 +02:00
oci8 Remove obsolete flag 2013-09-06 10:12:16 -07:00
odbc Merge branch 'PHP-5.4' into PHP-5.5 2013-08-18 14:16:24 -07:00
opcache Merge branch 'PHP-5.5' 2013-09-09 10:11:43 +04:00
openssl Merge branch 'PHP-5.5' 2013-08-19 17:58:53 -07:00
pcntl Merge commit 'a03f094' 2013-08-02 16:23:52 -04:00
pcre typo fixes 2013-07-15 00:23:03 -07:00
pdo Merge branch 'PHP-5.5' 2013-08-22 15:34:22 +02:00
pdo_dblib Fixed bug #63258 (seg fault with PDO and dblib using DBSETOPT(H->link, DBQUOTEDIDENT, 1)) 2013-08-04 19:19:37 -07:00
pdo_firebird Fix long-standing visual pain point: the misalignment of './configure help' text. 2013-08-06 11:06:09 -07:00
pdo_mysql fix mysql tests & mark nextRowset problematic tests 2013-08-24 23:56:48 -07:00
pdo_oci Merge branch 'PHP-5.4' into PHP-5.5 2013-08-20 10:34:13 -07:00
pdo_odbc Merge branch 'PHP-5.4' into PHP-5.5 2013-08-20 10:34:13 -07:00
pdo_pgsql Merge branch 'PHP-5.5' 2013-08-21 11:26:41 +02:00
pdo_sqlite Fix long-standing visual pain point: the misalignment of './configure help' text. 2013-08-06 11:06:09 -07:00
pgsql Merge branch 'PHP-5.5' 2013-08-22 15:34:22 +02:00
phar unify stdint type usage 2013-08-06 22:49:56 +02:00
posix non living code related typo fixes 2013-08-04 16:05:36 -07:00
pspell Fix long-standing visual pain point: the misalignment of './configure help' text. 2013-08-06 11:06:09 -07:00
readline Fix long-standing visual pain point: the misalignment of './configure help' text. 2013-08-06 11:06:09 -07:00
recode Fix long-standing visual pain point: the misalignment of './configure help' text. 2013-08-06 11:06:09 -07:00
reflection Merge branch 'PHP-5.4' into PHP-5.5 2013-08-04 16:06:24 -07:00
session Remove ini dependency in test 2013-08-30 11:46:16 +09:00
shmop Merge branch 'pull-request/341' 2013-06-10 14:30:59 -07:00
simplexml Merge branch 'PHP-5.5' 2013-08-14 20:47:00 -07:00
skeleton Slightly modernize ext_skel and sekelton/ 2013-07-17 23:18:13 +02:00
snmp Merge branch 'PHP-5.4' into PHP-5.5 2013-08-14 20:43:25 -07:00
soap Fix long-standing visual pain point: the misalignment of './configure help' text. 2013-08-06 11:06:09 -07:00
sockets Merge branch 'PHP-5.5' 2013-07-18 15:29:17 +02:00
spl Merge branch 'PHP-5.5' 2013-08-14 20:47:00 -07:00
sqlite3 Fix long-standing visual pain point: the misalignment of './configure help' text. 2013-08-06 11:06:09 -07:00
standard Request non-keep-alive connections by default in HTTP 1.1 requests. 2013-09-11 14:11:29 -07:00
sybase_ct Fix long-standing visual pain point: the misalignment of './configure help' text. 2013-08-06 11:06:09 -07:00
sysvmsg Merge branch 'pull-request/341' 2013-06-10 14:30:59 -07:00
sysvsem Merge branch 'pull-request/341' 2013-06-10 14:30:59 -07:00
sysvshm Happy New Year 2013-01-01 16:37:09 +08:00
tidy Fix long-standing visual pain point: the misalignment of './configure help' text. 2013-08-06 11:06:09 -07:00
tokenizer Happy New Year 2013-01-01 16:37:09 +08:00
wddx Fix long-standing visual pain point: the misalignment of './configure help' text. 2013-08-06 11:06:09 -07:00
xml Tabify 2013-08-20 10:46:15 -07:00
xmlreader Fix long-standing visual pain point: the misalignment of './configure help' text. 2013-08-06 11:06:09 -07:00
xmlrpc Merge branch 'PHP-5.4' into PHP-5.5 2013-08-24 21:45:14 -07:00
xmlwriter Fix long-standing visual pain point: the misalignment of './configure help' text. 2013-08-06 11:06:09 -07:00
xsl Merge branch 'PHP-5.4' into PHP-5.5 2013-08-14 20:43:25 -07:00
zip Merge branch 'PHP-5.5' 2013-08-14 20:47:00 -07:00
zlib fix bug #65391 2013-08-09 11:25:54 +02:00
ext_skel Slightly modernize ext_skel and sekelton/ 2013-07-17 23:18:13 +02:00
ext_skel_win32.php