Update webpagetool.php
This commit is contained in:
parent
613761a505
commit
7d9c3c0841
|
@ -58,8 +58,19 @@ if(!check_function_exists("get_web_cmd")) {
|
||||||
$args[] = "-k"; // allow self-signed certificate (the same as --insecure)
|
$args[] = "-k"; // allow self-signed certificate (the same as --insecure)
|
||||||
foreach($headers as $k=>$v) {
|
foreach($headers as $k=>$v) {
|
||||||
// the same as --header
|
// the same as --header
|
||||||
|
if(is_array($v)) {
|
||||||
|
if($k == "Authentication") {
|
||||||
|
if($v[0] == "Basic") {
|
||||||
|
$args[] = sprintf("-u '%s:%s'", $v[1], $v[2]);
|
||||||
|
} else {
|
||||||
|
$args[] = sprintf("-H '%s: %s'", $k, implode(" ", $v));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
$args[] = sprintf("-H '%s: %s'", make_safe_argument($k), make_safe_argument($v));
|
$args[] = sprintf("-H '%s: %s'", make_safe_argument($k), make_safe_argument($v));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
$args[] = get_web_build_qs($url, $data);
|
$args[] = get_web_build_qs($url, $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user