Update webpagetool.php

This commit is contained in:
Namhyeon Go 2020-02-07 16:01:10 +09:00 committed by GitHub
parent 042e6f4226
commit b6f75980d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -133,12 +133,14 @@ if(!check_function_exists("get_web_cmd")) {
$headers['Content-Type'] = "application/json;charset=utf-8";
$headers['Accept'] = "application/json, text/plain, */*";
} else {
$_data = $data;
$headers['Content-Type'] = "text/plain"; // possible: application/octet-stream (RFC2046)
}
// get content size
$headers['Content-Length'] = strlen($_data);
// set headers
foreach($headers as $k=>$v) {
// the same as --header
if(is_array($v)) {