FS#50368 - [pacman] skips mirrors if using a HTTP anti virus proxy
Attached to Project:
Pacman
Opened by Martin (monojp) - Friday, 12 August 2016, 08:40 GMT
Last edited by Eli Schwartz (eschwartz) - Tuesday, 26 November 2019, 05:27 GMT
Opened by Martin (monojp) - Friday, 12 August 2016, 08:40 GMT
Last edited by Eli Schwartz (eschwartz) - Tuesday, 26 November 2019, 05:27 GMT
|
Details
Summary and Info:
We're using a HTTP anti virus proxy which basically intercepts all connections and scans the server responses for viruses. Because of https://bugs.archlinux.org/task/15369 or https://git.archlinux.org/pacman.git/commit/?id=8807cac we have the problem that pacman skips all mirrors (error: failed retrieving file <file> from <mirror> : Operation too slow. Less than 1 bytes/sec transferred the last 10 seconds) if downloading huge files because the proxy doesn't return anything while scanning so it may take longer than 10 seconds. Steps to Reproduce: # Use a HTTP anti virus proxy # Download big files via pacman which cause the proxy to scan longer than 10 seconds Possible Fixes: # Disable timeout / skipping if there is only one mirror configured # Maybe even better: Make the timeout configurable. This would suit all users I guess and the current behaviour could be the default one |
This task depends upon
Closed by Eli Schwartz (eschwartz)
Tuesday, 26 November 2019, 05:27 GMT
Reason for closing: Implemented
Additional comments about closing: https://git.archlinux.org/pacman.git/com mit/?id=c635f185ba86967cd8de9c31890b57e5 58f65e9b
Tuesday, 26 November 2019, 05:27 GMT
Reason for closing: Implemented
Additional comments about closing: https://git.archlinux.org/pacman.git/com mit/?id=c635f185ba86967cd8de9c31890b57e5 58f65e9b
I had this idea a long time ago... Finally implemented it. Does the attached patch help?
I was able to debug it a little with cURL, a mirror and the virtualbox package, it seems that I get the 200 OK within ~8 seconds but then it takes almost ~35 seconds for the body. I guess pacman lowers the timeout after I get the 200 OK and then falls into the timeout again?
$ curl -v https://mirror.aardvark.it/archlinux/community/os/x86_64/virtualbox-5.1.2-2-x86_64.pkg.tar.xz
* Trying 188.40.42.195...
* Connected to mirror.aardvark.it (188.40.42.195) port 443 (#0)
* ALPN, offering http/1.1
* <SSL INFO>
> GET /archlinux/community/os/x86_64/virtualbox-5.1.2-2-x86_64.pkg.tar.xz HTTP/1.1
> Host: mirror.aardvark.it
> User-Agent: curl/7.50.1
> Accept: */*
>
~ 8 seconds wait time
< HTTP/1.1 200 OK
< ...
~ 35 seconds wait time until the binary data begins getting printed
"--stupid-proxy" flag is a good idea... :D Give me a moment for that.
You have to add command line option '--stupid-proxy' or add 'StupidProxy' to pacman.conf.