note 24702 deleted from function.fopen by alindeman

From: Date: Sat, 17 May 2003 21:05:49 +0000
Subject: note 24702 deleted from function.fopen by alindeman
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-48262@lists.php.net to get a copy of this message
Note Submitter: Note that the WebGetObject class above does not parse HTTP headers correctly: - it should detect headers split in multiple lines (they are continued by starting the next line by an additional space or tab), - it does not handle correctly the slitting between the header name and its value (it requires no space before the colon, and requires one space after it, where HTTP allows no space or additional whitespace): it should split in two parts only lines that contain a ":" character and trim both splitted parts. - it does not parse header values according to the HTTP format regarding blanks, comma and (comments) - it does not support headers that may be repeated (and that should be returned either as an array value for the header name stored in the returned key, or by merging headers with a separating comma), so it looses some headers. Regarding the problem with the "proxying" script, it simply does not work because the HTTP transaction is not complete: it should emit the "Host:" header that most proxies require to specify the proxy host name, even when performing an HTTP/1.0 GET request. This is because most proxies are configured to allow virtual hosts including themselves.

« previous php.notes (#48262) next »