| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             [2012-05-24 19:19 UTC] andrew at pimlott dot net
 
-Summary: OAuth::fetch returns FALSE for empty response
+Summary: OAuth::fetch returns FALSE for empty response body
  [2012-05-24 19:19 UTC] andrew at pimlott dot net
  [2012-05-24 20:56 UTC] jawed@php.net
  [2012-05-24 20:56 UTC] jawed@php.net
  [2012-05-24 21:07 UTC] jawed@php.net
  [2012-05-24 21:08 UTC] jawed@php.net
 
-Status:      Open
+Status:      Closed
-Assigned To:
+Assigned To: jawed
  [2012-05-24 21:08 UTC] jawed@php.net
  [2012-05-26 14:55 UTC] andrew at pimlott dot net
  | 
    |||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 09:00:01 2025 UTC | 
Description: ------------ OAuth::fetch returns FALSE if the response is empty (Content-Length 0). As far as I can tell, there is no reason that should be considered a failure. A simple test you can use on any HTTPS URL with an empty response: I'm guessing this happens because soo->lastresponse.c remains NULL until some content has been appended. Test script: --------------- $oauth = new OAuth('foo', 'bar'); if ($oauth->fetch('https://example.com/empty') === FALSE) { echo("false\n"); } Expected result: ---------------- No output. Actual result: -------------- Prints "false".