note 96094 added to function.ob-get-length
| From: | db-removetrapATeluniaDOTch at osu1 dot php dot net | Date: | Mon, 08 Feb 2010 17:38:58 +0000 |
| Subject: | note 96094 added to function.ob-get-length | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-165759@lists.php.net to get a copy of this message | ||
"Transfer-Length" is NOT a rfc2616 Header Field definition.
So please ignore the advice from Anonymous to use it as a substitute for "Content-Length".
Also notice the difference between "Transfer-Encoding" which IS a Header Field definition
and "Transfer-Length" which IS NOT.
What is mentioned in the rfc2616 is in section:
4.4 Message Length
...
3. If a Content-Length header field (section 14.13) is present, its decimal value in OCTETs
represents both the entity-length and the transfer-length. The Content-Length header field MUST NOT
be sent if these two lengths are different (i.e., if a Transfer-Encoding header field is present).
If a message is received with both a Transfer-Encoding header field and a Content-Length header
field,the latter MUST be ignored.
...
What this means is a little contradictory, because the rfc says MUST NOT be sent together and then
it says IF sent together Content-Length MUST be ignored.
So I would take this more as a guideline than a rule to not send them together because if you do
send them together the browser *SHOULD* ignore the Content-Length header anyway.
The most important thing, from a PHP "entity-length/transfer-length" header setting
perspective, is that IF you send a "Transfer-Encoding: chunked;" header make sure your
chunks are correctly encoded so that a chunk length can be determined.
Please see Wikipedia for a nice simple overview and as a starting point of chunked transfer
encoding: http://en.wikipedia.org/wiki/Chunked_transfer_encoding
----
Server IP: 62.2.182.223
Probable Submitter: 62.12.139.250
----
Manual Page -- http://www.php.net/manual/en/function.ob-get-length.php
Edit -- https://master.php.net/note/edit/96094
Del: integrated -- https://master.php.net/note/delete/96094/integrated
Del: useless -- https://master.php.net/note/delete/96094/useless
Del: bad code -- https://master.php.net/note/delete/96094/bad+code
Del: spam -- https://master.php.net/note/delete/96094/spam
Del: non-english -- https://master.php.net/note/delete/96094/non-english
Del: in docs -- https://master.php.net/note/delete/96094/in+docs
Del: other reasons-- https://master.php.net/note/delete/96094
Reject -- https://master.php.net/note/reject/96094
Search -- https://master.php.net/manage/user-notes.php