php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #67665 fetch() throws exception for valid HTTP status code 207
Submitted: 2014-07-22 09:12 UTC Modified: 2017-10-24 07:15 UTC
Votes:3
Avg. Score:4.7 ± 0.5
Reproduced:3 of 3 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: sven at mageflow dot com Assigned:
Status: Open Package: oauth (PECL)
PHP Version: 5.5.14 OS: OSX
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: sven at mageflow dot com
New email:
PHP Version: OS:

 

 [2014-07-22 09:12 UTC] sven at mageflow dot com
Description:
------------
If a REST API returns valid HTTP status code 207 Multi-Status the fetch() method throws an exception:
Invalid auth/bad request (got a 207, expected HTTP/1.1 20X or a redirect)

In fact 207 IS HTTP/1.1 20x series code but fetch() does not recognize it.

Test script:
---------------
It cannot be easily tested because you need an Oauth server / REST API.

Expected result:
----------------
Expected result is that fetch() would not throw an exception if HTTP status code is from 20x series.

Actual result:
--------------
Invalid auth/bad request (got a 207, expected HTTP/1.1 20X or a redirect)


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-07-28 21:52 UTC] jawed@php.net
I'm fine with treating the entire 20X range as "acceptable" HTTP return codes as mentioned by Tjerk. Any objections?
 [2014-07-29 09:50 UTC] datibbaw@php.net
Automatic comment from SVN on behalf of datibbaw
Revision: http://svn.php.net/viewvc/?view=revision&revision=334406
Log: Fixed #67665 - fetch() throws exception for valid HTTP status code 207
 [2014-07-29 09:53 UTC] datibbaw@php.net
-Assigned To: +Assigned To: datibbaw
 [2017-10-24 07:15 UTC] kalle@php.net
-Status: Assigned +Status: Open -Assigned To: datibbaw +Assigned To:
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sun Dec 08 20:01:25 2019 UTC