I am wondering when I read a response stream and a timeout occurs, can I retry the read? Or do I have to make a new request? The server that I am downloading from does not support resuming, so I need to protect against timeouts.
ResponseStream re-read after read timeout
533 Views Asked by John Sheares At
2
There are 2 best solutions below
0
On
How do you know that the server doesn't accept resumes? Is the Accept-Ranges header indeed lacking in the response? If not, you could resume the request using the Range header.
If the server indeed doesn't support it, then best what you can try is to inform the server that you want to keep the connection alive using Connection: keep-alive header in combination with the Keep-Alive header wherein you can specify the timeout.
Hope this helps.
No, you can't retry. You need to reissue the request