httr
httr copied to clipboard
Timeouts greater than 10 s are ignored
With httr 1.4.2:
> httr::GET("https://e4ftl01.cr.usgs.gov/MOTA/MCD19A2.006/2005.01.01", httr::timeout(1))
Error in curl::curl_fetch_memory(url, handle = handle) :
Timeout was reached: [e4ftl01.cr.usgs.gov] Operation timed out after 1001 milliseconds with 0 out of 0 bytes received
> httr::GET("https://e4ftl01.cr.usgs.gov/MOTA/MCD19A2.006/2005.01.01", httr::timeout(9))
Error in curl::curl_fetch_memory(url, handle = handle) :
Timeout was reached: [e4ftl01.cr.usgs.gov] Operation timed out after 9000 milliseconds with 0 out of 0 bytes received
> httr::GET("https://e4ftl01.cr.usgs.gov/MOTA/MCD19A2.006/2005.01.01", httr::timeout(10))
Error in curl::curl_fetch_memory(url, handle = handle) :
Timeout was reached: [e4ftl01.cr.usgs.gov] Operation timed out after 10001 milliseconds with 0 out of 0 bytes received
> httr::GET("https://e4ftl01.cr.usgs.gov/MOTA/MCD19A2.006/2005.01.01", httr::timeout(11))
Error in curl::curl_fetch_memory(url, handle = handle) :
Timeout was reached: [e4ftl01.cr.usgs.gov] Operation timed out after 10001 milliseconds with 0 out of 0 bytes received
> httr::GET("https://e4ftl01.cr.usgs.gov/MOTA/MCD19A2.006/2005.01.01", httr::timeout(12))
Error in curl::curl_fetch_memory(url, handle = handle) :
Timeout was reached: [e4ftl01.cr.usgs.gov] Operation timed out after 10001 milliseconds with 0 out of 0 bytes received
I believe this is a duplicate of #501. Unfortunately, my example is only reproducible so long as this website is so slow.
I think the cause is upstream, where a 10-s timeout is hard-coded: https://github.com/jeroen/curl/blob/395fbcbc13ef7f38167d3837f50c3cad51902068/src/curl.c#L108
I'm having the same problem. There is any workaround to this?