r84168 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84167‎ | r84168 | r84169 >
Date:15:14, 17 March 2011
Author:reedy
Status:ok
Tags:
Comment:
* (bug 27924) PhpHttpRequest doesn't return response body if HTTP != 200

Apply Bawolffs patch minus the var_dump()'s
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/HttpFunctions.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/HttpFunctions.php
@@ -785,7 +785,10 @@
786786 return $this->status;
787787 }
788788
789 - if ( $this->status->isOK() ) {
 789+ // If everything went OK, or we recieved some error code
 790+ // get the response body content.
 791+ if ( $this->status->isOK()
 792+ || (int)$this->respStatus >= 300) {
790793 while ( !feof( $fh ) ) {
791794 $buf = fread( $fh, 8192 );
792795
Index: trunk/phase3/RELEASE-NOTES
@@ -115,6 +115,7 @@
116116 * (bug 2581, bug 6834) Added links to thumbnail in several resolutions to the
117117 file description page. The sizes are set by $wgImageLimits.
118118 * (bug 28031) Add pageCount support to ArchivedFile
 119+* (bug 27924) PhpHttpRequest doesn't return response body if HTTP != 200
119120
120121 === Bug fixes in 1.18 ===
121122 * (bug 23119) WikiError class and subclasses are now marked as deprecated

Status & tagging log