Skip to content

Commit bb8154a

Browse files
committed
fix curl err process
1 parent 1440a1e commit bb8154a

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

index.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33

4-
$__version__ = '3.2.4';
4+
$__version__ = '3.2.5';
55
$__password__ = '123456';
66
$__hostsdeny__ = array(); // $__hostsdeny__ = array('.youtube.com', '.youku.com');
77
$__content_type__ = 'image/gif';
@@ -216,10 +216,9 @@ function post() {
216216
if ($GLOBALS['__content__']) {
217217
echo_content($GLOBALS['__content__']);
218218
} else if ($errno) {
219-
$content = "";
219+
$content = "HTTP/1.0 502\r\n\r\n" . message_html('502 Urlfetch Error', "PHP Urlfetch Error curl($errno)", curl_error($ch));
220220
if (!headers_sent()) {
221221
header('Content-Type: ' . $__content_type__);
222-
$content = "HTTP/1.0 502\r\n\r\n" . message_html('502 Urlfetch Error', "PHP Urlfetch Error curl($errno)", curl_error($ch));
223222
} else if($errno==CURLE_OPERATION_TIMEOUTED) {
224223
$content = "";
225224
}

0 commit comments

Comments
 (0)