janhoy commented on a change in pull request #581: URL: https://github.com/apache/solr/pull/581#discussion_r796416108
########## File path: dev-tools/scripts/scriptutil.py ########## @@ -156,7 +156,10 @@ def download(name, urlString, tmpDir, quiet=False, force_clean=True): def attemptDownload(urlString, fileName): - fIn = urllib.request.urlopen(urlString) + raw_request = urllib.request.Request(urlString) + raw_request.add_header('User-Agent', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Firefox/78.0') Review comment: I generate some test releases before the real RC, and this is needed to be able to download artifacts from a plain httpd server like [this](http://cominvent.com/pub/solr-9.0.0-RC1-rev-96bb28303424e40d1db18a9904729521d12926dc/), instead of dist.apache.org. It adds a header to avoid some 406 response, and also pulls the file name from `href` instead of display-part of the <a> tag, since httpd will abbreviate long file names [with dots](http://cominvent.com/pub/solr-9.0.0-RC1-rev-96bb28303424e40d1db18a9904729521d12926dc/solr/). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org