Req #24505 [Opn->Nab]: http_request() function
| From: | tyrael@php.net | Date: | Fri, 27 Mar 2015 14:27:09 +0000 |
| Subject: | Req #24505 [Opn->Nab]: http_request() function | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-191643@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=24505&edit=1
ID: 24505
Updated by: tyrael@php.net
Reported by: firewolf at pochtampt dot ru
Summary: http_request() function
-Status: Open
+Status: Not a bug
Type: Feature/Change Request
Package: HTTP related
Operating System: *
PHP Version: *
Block user comment: N
Private report: N
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[2005-12-05 14:45:36] wez@php.net
I'm not going to have time to implement this myself.
------------------------------------------------------------------------
[2005-03-07 04:19:23] 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.
------------------------------------------------------------------------
[2003-07-05 03:22:06] 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.
------------------------------------------------------------------------
[2003-07-05 00:23:11] 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:
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=24505&edit=1