Update webpagetool.php

This commit is contained in:
Namhyeon Go 2020-07-16 15:10:23 +09:00 committed by GitHub
parent 718a1cfa00
commit 4be3e6b4fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -638,7 +638,7 @@ if(!is_fn("get_web_page")) {
"status" => $status, "status" => $status,
"resno" => $resno, "resno" => $resno,
"errno" => $errno, "errno" => $errno,
"id" => get_web_identifier($url, $method, $data, $headers), "id" => get_web_identifier($url, $method, $data),
"pid" => $pid, "pid" => $pid,
"md5" => get_hashed_text($content, "md5"), "md5" => get_hashed_text($content, "md5"),
"sha1" => get_hashed_text($content, "sha1"), "sha1" => get_hashed_text($content, "sha1"),
@ -719,8 +719,16 @@ if(!is_fn("get_web_cache")) {
} }
} }
$_method = implode(".", $_new_methods); $_method = implode(".", $_new_methods);
$_data = $data;
if(count($headers) > 0) {
$_data = array(
"headers" => $headers,
"data" => $data
);
}
$response = get_web_page($url, $_method, $data, $proxy, $ua, $ct_out, $t_out); $response = get_web_page($url, $_method, $_data, $proxy, $ua, $ct_out, $t_out);
$content = $response['content']; $content = $response['content'];
if($cache_enabled) { if($cache_enabled) {
$gz_content = gzdeflate($content); $gz_content = gzdeflate($content);