#27814 [Asn->Opn]: Multiple small packets send for HTTP request
| From: | sniper@php.net | Date: | Fri, 29 Jul 2005 16:20:46 +0000 |
| Subject: | #27814 [Asn->Opn]: Multiple small packets send for HTTP request | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-82684@lists.php.net to get a copy of this message | ||
ID: 27814
Updated by: sniper@php.net
Reported By: Olaf at XCC dot TMFWeb dot NL
-Status: Assigned
+Status: Open
Bug Type: HTTP related
Operating System: *
PHP Version: 5.1*
Assigned To: wez
Previous Comments:
------------------------------------------------------------------------
[2004-04-19 06:38:09] pollita@php.net
It's too late for the 5.0 branch (which is in final RC stage), but it's
under consideration for the 5.1 branch.
------------------------------------------------------------------------
[2004-04-19 03:02:02] OvdSpek at LIACS dot NL
Will a buffer be added?
------------------------------------------------------------------------
[2004-03-31 17:55:02] wez@php.net
You're correct; there is no write buffering for the http
request.
------------------------------------------------------------------------
[2004-03-31 14:48:37] Olaf at XCC dot TMFWeb dot NL
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 this bug report at http://bugs.php.net/?id=27814&edit=1