#24505 [Asn]: feature request: http_request() function

From: Date: Sat, 29 Nov 2003 14:11:56 +0000
Subject: #24505 [Asn]: feature request: http_request() function
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-51333@lists.php.net to get a copy of this message
ID: 24505 Updated by: wez@php.net -Summary: fopen works incorrect with URL Reported By: firewolf at pochtampt dot ru Status: Assigned Bug Type: Feature/Change Request Operating System: FreeBSD-4.8 PHP Version: 4.3.3RC1 Assigned To: wez New Comment: Change summary Previous Comments: ------------------------------------------------------------------------ [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 http://bugs.php.net/?id=24505&edit=1

« previous php.bugs (#51333) next »