From: Olaf at XCC dot TMFWeb dot NL
Operating system: Linux, Windows XP, 2003
PHP version: 4.3.4
PHP Bug Type: Performance problem
Bug description: Multiple small packets send for HTTP request
Description:
------------
This code sends two packets, one of 16 bytes and one of 17 bytes.
I guess this is caused by multiple calls to php_stream_write in
http_fopen_wrapper.c: php_stream_url_wrap_http_ex
Preparing the entire request in one buffer and sending it via one call
should produce less packets (and be faster).
Reproduce code:
---------------
<?php
echo strlen(file_get_contents("http://php.net/"));
?>
Expected result:
----------------
One packet of 33 bytes.
Actual result:
--------------
Two packets.
--
Edit bug report at http://bugs.php.net/?id=27814&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=27814&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=27814&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=27814&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=27814&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=27814&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=27814&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=27814&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=27814&r=support
Expected behavior: http://bugs.php.net/fix.php?id=27814&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=27814&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=27814&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=27814&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27814&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=27814&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=27814&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=27814&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=27814&r=float