Skip to content

Commit

Permalink
extension: set User-Agent header to 'DokuWiki HTTP Client (Extension …
Browse files Browse the repository at this point in the history
…Manager)'

This solves problems with project hosters which do not start an download immediately
if the User-Agent seems to be a browser, also see #2410.
  • Loading branch information
lpaulsen93 committed Jun 8, 2018
1 parent 6df0bbd commit 105090b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/plugins/extension/helper/extension.php
Expand Up @@ -839,7 +839,8 @@ public function download($url) {
}

// download
if(!$file = io_download($url, $tmp.'/', true, $file, 0)) {
if(!$file = io_download($url, $tmp.'/', true, $file, 0,
'DokuWiki HTTP Client (Extension Manager)')) {
io_rmdir($tmp, true);
throw new Exception(sprintf($this->getLang('error_download'), '<bdi>'.hsc($url).'</bdi>'));
}
Expand Down

0 comments on commit 105090b

Please sign in to comment.