php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #46559 incorrect forcing HTTP protocol version
Submitted: 2008-11-12 19:05 UTC Modified: 2008-11-12 20:31 UTC
From: bodik at civ dot zcu dot cz Assigned:
Status: Not a bug Package: HTTP related
PHP Version: 5.2.6 OS: Linux
Private report: No CVE-ID: None
 [2008-11-12 19:05 UTC] bodik at civ dot zcu dot cz
Description:
------------
hi,

I think that #42779 could still not be entirely resolved. On my  server I just found that part of this problem is still present in 5.2.6.

Server still responds with chunked encoding (could in http1.1) on 1.0 request (it must not). I thing it's related with downgrading protocol and it's features. 

on other server with 5.2.0 is responding correctly:
* chunked on 1.1 request
* nonchunked on 1.0 request

I hope I'm submitting theese notes on correct place...

bodik

Reproduce code:
---------------
bodik@bodik:/tmp/cerno$ cat bodik
GET /uredni-deska/ HTTP/1.0
Host: www.mydomain.cz

bodik@bodik:/tmp/cerno$ cat bodik | nc my.hosting.server 80 | head -n20
HTTP/1.1 200 OK
Date: Wed, 12 Nov 2008 18:53:55 GMT
Server: Apache
X-Powered-By: PHP/5.2.6
Set-Cookie: PHPSESSID=jjtbppo2vs39a0pefi417vgv12; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Transfer-Encoding: chunked
Content-Type: text/html

ad00
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

Expected result:
----------------
bodik@bodik:/tmp/cerno$ cat bodik
GET /uredni-deska/ HTTP/1.0
Host: www.mydomain.cz

bodik@bodik:/tmp/cerno$ cat bodik | nc my.server 80 | head -n20
HTTP/1.1 200 OK
Date: Wed, 12 Nov 2008 18:53:55 GMT
Server: Apache
X-Powered-By: PHP/5.2.6
Set-Cookie: PHPSESSID=jjtbppo2vs39a0pefi417vgv12; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Type: text/html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

Actual result:
--------------
result is bad behavior with HTTP/1.0 clients/proxies

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-11-12 19:07 UTC] jani@php.net
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

Feel free to comment to that bug. Do not submit new reports about 
same issue.
 [2008-11-12 20:31 UTC] bodik at civ dot zcu dot cz
But it won't let me add new comment to already closed #42779 ;(((
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 04:01:29 2024 UTC