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:4
Avg. Score:4.2 ± 0.8
Reproduced:4 of 4 (100.0%)
Same Version:1 (25.0%)
Same OS:1 (25.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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
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-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 01:01:28 2024 UTC