php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #24505 http_request() function
Submitted: 2003-07-05 00:23 UTC Modified: 2015-03-27 14:27 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: firewolf at pochtampt dot ru Assigned:
Status: Not a bug Package: HTTP related
PHP Version: * OS: *
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: firewolf at pochtampt dot ru
New email:
PHP Version: OS:

 

 [2003-07-05 00:23 UTC] firewolf at pochtampt dot ru
Description:
------------
function fopen(),
when I open http://somesite/somefile
I can't use reget, because server response:
HTTP/1.0 206 Partial content... and php log error.

Its possible when I make content:

$opts = array('http'=>array('user_agent'                                  => "USER_AGET NAME\r\nRange: bytes=2000-\r\n"));
$context = stream_context_create($opts);
$fl = fopen("$url","r",false,$context);


Reproduce code:
---------------
php-4.3.3RC1/ext/standard/http_fopen_wrapper.c.orig:
...
line 300: 
switch(response_code) {
                                case 200:
                                case 302:
                                case 301:
                                        reqok = 1;
                                        break;
                                case 403:


Expected result:
----------------
php-4.3.3RC1/ext/standard/http_fopen_wrapper.c.orig:
...
line 300: 
switch(response_code) {
                                case 200:
                                case 206:
                                case 302:
                                case 301:
                                        reqok = 1;
                                        break;
                                case 403:



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-07-05 03:22 UTC] wez@php.net
We won't be overloading fopen() to handle partial fetches.
However, we are looking at adding some kind of http_request() function that can include this kind of feature.


 [2005-03-07 04:19 UTC] rwilliams at warren-wilson dot edu
I would like to see this bug amended. I don't see how it 
would require overloading to address the issue but only 
the change in the switch statement as pictured.
 [2005-12-05 14:45 UTC] wez@php.net
I'm not going to have time to implement this myself.
 [2010-11-18 23:11 UTC] jani@php.net
-Summary: feature request: http_request() function +Summary: http_request() function -Package: Feature/Change Request +Package: HTTP related -Operating System: N/A +Operating System: * -PHP Version: N/A +PHP Version: *
 [2015-03-27 14:27 UTC] tyrael@php.net
-Status: Open +Status: Not a bug
 [2015-03-27 14:27 UTC] tyrael@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 01:01:30 2024 UTC