Index: trunk/phase3/includes/HttpFunctions.php |
— | — | @@ -82,11 +82,16 @@ |
83 | 83 | ob_end_clean(); |
84 | 84 | |
85 | 85 | # Don't return the text of error messages, return false on error |
86 | | - if ( curl_getinfo( $c, CURLINFO_HTTP_CODE ) != 200 ) { |
| 86 | + $retcode = curl_getinfo( $c, CURLINFO_HTTP_CODE ); |
| 87 | + if ( $retcode != 200 ) { |
| 88 | + wfDebug( __METHOD__ . ": HTTP return code $retcode\n" ); |
87 | 89 | $text = false; |
88 | 90 | } |
89 | 91 | # Don't return truncated output |
90 | | - if ( curl_errno( $c ) != CURLE_OK ) { |
| 92 | + $errno = curl_errno( $c ); |
| 93 | + if ( $errno != CURLE_OK ) { |
| 94 | + $errstr = curl_error( $c ); |
| 95 | + wfDebug( __METHOD__ . ": CURL error code $errno: $errstr\n" ); |
91 | 96 | $text = false; |
92 | 97 | } |
93 | 98 | curl_close( $c ); |