commercialhaskell / commercialhaskell/stack

Add ability to configure timeout duration for downloads

Open
#5,151 0 comments 1 reaction 0 assignees View on GitHub
type: enhancement
Dominant language
Haskell
Stars
4.1k
Forks
850
Avg merge
10h 37m
Merged PRs (30d)
4

Description

Hello,
in my company network I get the following error using stack:

> 2020-01-28 07:12:09.044875: [error] HttpExceptionRequest Request {
host = "s3.amazonaws.com"
port = 443
secure = True
requestHeaders = [("Accept-Encoding",""),("Cache-Control","no-transform"),("User-Agent","Haskell pantry package")]
path = "/hackage.fpcomplete.com/01-index.tar.gz"
queryString = ""
method = "GET"
proxy = Nothing
rawBody = False
redirectCount = 10
responseTimeout = ResponseTimeoutDefault
requestVersion = HTTP/1.1
}
ResponseTimeout

>

The problem is, that the companie's proxy downloads the file and runs virus protection scan before the file can be 'really' downloaded. In that particular case it takes several minutes which is of course too much for the default Timeout. To probe that behaviour I also used wget to download manually:

> wget https://s3.amazonaws.com/hackage.fpcomplete.com/01-index.tar.gz
>
> --2020-01-28 07:13:08-- https://s3.amazonaws.com/hackage.fpcomplete.com/01-index.tar.gz
> Connecting to XXX.XXX.XXX.XXX:8080... connected.
> Proxy request sent, awaiting response... 200 OK
> Length: 86262486 (82M) [application/x-gzip]
> Saving to: '01-index.tar.gz'
>
> 01-index.tar.gz 100%[===============================================================================>] 82,27M 10,6MB/s in 9,9s
>
> 2020-01-28 07:18:43 (8,35 MB/s) - '01-index.tar.gz' saved [86262486/86262486]

The 9,9s download time is just the time to download from proxy after proxy send "200 OK". The overall 5 minutes are fully covered by the proxy without any proxy response.

So is it possible to add an option to configure a timeout for the downloads? Or is there already some option that I missed?

Best regards

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.