php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #41413 HTTP proxying bug
Submitted: 2007-05-17 07:09 UTC Modified: 2007-05-17 08:09 UTC
From: vasso dot spam at gmail dot com Assigned:
Status: Not a bug Package: HTTP related
PHP Version: 5.2.2 OS: Windows
Private report: No CVE-ID: None
 [2007-05-17 07:09 UTC] vasso dot spam at gmail dot com
Description:
------------
HTTP proxing (after 5.1.0) works only if request_fulluri is set to true.
And there is no documentation about this.

Reproduce code:
---------------
$context = stream_context_create(
    array('http'=>
        array(
           'proxy' => 'tcp://proxy.domain.com:3128/',
           //'request_fulluri' => true,//Works if uncommented
        )
    )
);
$data = file_get_contents('http://google.com/', false, $context);
var_export($data);


Expected result:
----------------
+

Actual result:
--------------
Warning: file_get_contents(http://google.com/): failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request
 in http_proxy_bug.php on line 10
-

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-05-17 08:09 UTC] vasso dot spam at gmail dot com
I was wrong
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Aug 03 08:01:25 2021 UTC