note 79466 added to function.fopen

From: Date: Wed, 28 Nov 2007 19:22:11 +0000
Subject: note 79466 added to function.fopen
Groups: php.notes 
Request: Send a blank email to php-notes+get-132640@lists.php.net to get a copy of this message
fopen appears to choke on some redirects which do not give problems to browsers or wget Example: this redirect Location: /NetPerfMon/NetworkMap.asp?Map=Network Overview&Scale=50 Causes this request: GET /NetPerfMon/NetworkMap.asp?Map=Network Overview&Scale=50 HTTP/1.0 Which is an invalid request due to the space. I don't recall if this is correct behavior according to the RFC or not (I'm 100% sure that fopen shouldn't be sending requests with spaces in but it may be that the Location: redirect shouldn't have spaces either) but the the big two browsers and wget handle it gracefully I'll also add a note that fopen does no cookie handling. The above is part of two redirects. The first redirects to a page which issues cookies, the second redirects to the original page. If there was not a problem with the space above, this would have led to a loop broken only by any redirect limit rules coded into fopen. Handling cookies may be outside the scope of fopen but I think it is worth noting in case anyone else would run into it. PHP 5.2.0 ---- Server IP: 69.147.83.197 Probable Submitter: 209.149.58.143 (proxied: 127.0.0.1) ---- Manual Page -- http://www.php.net/manual/en/function.fopen.php Edit -- https://master.php.net/note/edit/79466 Del: integrated -- https://master.php.net/note/delete/79466/integrated Del: useless -- https://master.php.net/note/delete/79466/useless Del: bad code -- https://master.php.net/note/delete/79466/bad+code Del: spam -- https://master.php.net/note/delete/79466/spam Del: non-english -- https://master.php.net/note/delete/79466/non-english Del: in docs -- https://master.php.net/note/delete/79466/in+docs Del: other reasons-- https://master.php.net/note/delete/79466 Reject -- https://master.php.net/note/reject/79466 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#132640) next »