php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #37606 error in example
Submitted: 2006-05-26 19:52 UTC Modified: 2006-05-28 20:33 UTC
From: humbads at alum dot mit dot edu Assigned: gavinfo (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: all
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: humbads at alum dot mit dot edu
New email:
PHP Version: OS:

 

 [2006-05-26 19:52 UTC] humbads at alum dot mit dot edu
Description:
------------
In http://us2.php.net/manual/en/wrappers.http.php, the HTTP header for detecting a redirection is incorrect.

Reproduce code:
---------------
The example shows:
/* Were we redirected? */
if (substr(strtolower($response), 0, 18) == 'content-location: ') {



Expected result:
----------------
It should read:
/* Were we redirected? */
if (substr(strtolower($response), 0, 10) == 'location: ') {

Actual result:
--------------
According to the HTTP/1.1 RFC:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

"content-location" is an alternative location of the URI, and does not imply redirection.  "location:" is used to actually redirect the client.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-05-28 20:33 UTC] gavinfo@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.

Correction made.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 20 16:00:02 2025 UTC