mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-06-30 13:14:27 +02:00
global-functions: $FetchHuge: use custom user agent string
This commit is contained in:
parent
5323052290
commit
ab6fd88558
1 changed files with 3 additions and 1 deletions
|
@ -395,6 +395,7 @@
|
|||
:local ScriptName [ :tostr $1 ];
|
||||
:local Url [ :tostr $2 ];
|
||||
|
||||
:global FetchUserAgentStr;
|
||||
:global GetRandom20CharAlNum;
|
||||
:global LogPrint;
|
||||
:global MkDir;
|
||||
|
@ -408,7 +409,8 @@
|
|||
:local FileName ("tmpfs/" . $ScriptName . "/" . $0 . "-" . [ $GetRandom20CharAlNum ]);
|
||||
|
||||
:do {
|
||||
/tool/fetch check-certificate=yes-without-crl $Url dst-path=$FileName as-value;
|
||||
/tool/fetch check-certificate=yes-without-crl $Url dst-path=$FileName \
|
||||
http-header-field=({ [ $FetchUserAgentStr $ScriptName ] }) as-value;
|
||||
} on-error={
|
||||
$LogPrint debug $0 ("Failed downloading from: " . $Url);
|
||||
:return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue