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
564 Views Asked by John Sheares At
2
There are 2 best solutions below
0
BalusC
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.
Related Questions in C#
- Passing arguments to main in C using Eclipse
- kernel module does not print packet info
- error C2016 (C requires that a struct or union has at least one member) and structs typedefs
- Drawing with ncurses, sockets and fork
- How to catch delay-import dll errors (missing dll or symbol) in MinGW(-w64)?
- Configured TTL for A record(s) backing CNAME records
- Allocating memory for pointers inside structures in functions
- Finding articulation point of undirected graph by DFS
- C first fgets() is being skipped while the second runs
- C std library don't appear to be linked in object file
- gcc static library compilation
- How to do a case-insensitive string comparison?
- C programming: Create and write 2D array of files as function
- How to read a file then store to array and then print?
- Function timeouts in C and thread
Related Questions in TIMEOUT
- Function timeouts in C and thread
- RubyOnRails multiple database connections errors
- Debugging a 404 error for an existing page
- HttpWebRequest timing out, but no packets leaving client
- Multipart/form-data POST request gets timeout and is never sent using AFNetworking
- How to prevent timeout when running a time consuming PHP
- RequireJS module load timeout when using bundles
- OkHttp/Retrofit default timeout
- jetty replay request on timeout
- BASH - Getting an rsh command to return a value or to timeout
- ShareFile upload with Python 2.7.5 code timesout on FTPS STOR
- This page cannot be displayed error when calling a long stored procedure
- Javascript reruning timeout after being cleared
- Retrieve the data from sql database and don`t encounter timeout exception
- AmazonEc2InstanceDataPropertySource.getProperty() is extremely slow when run outside of Amazon
Related Questions in WEBRESPONSE
- multiple webrequest through a string array
- Open a WebResponse on Browser
- C# WebRequest Forbidden
- StreamReader OutOfMemoryException
- How to post XML document to HTTP with VB.Net
- You must write ContentLength bytes to the request stream before calling [Begin]GetResponse
- c# .NET Fast (realtime) webresponse reading
- Using HttpWebRequest, WebResponse is uncompiled aspx page when uploading file to SharePoint
- How can I scrape an image that doesn't have an extension?
- WebRequest.GetResponse ignores my timeout value?
- HttpWebRequest return a WebResponse with strange numbers
- second time proxy validation failing with webRequest API
- Get scripts communications responses in HtmlUnit
- how to capture data from a webresponse/streamreader and write it back in console?
- c# Webrequest Post and GetResponse
Related Questions in RESPONSESTREAM
- Rest template read response as stream and pass to spring controller(Get InputStream with rest Template)
- Error with WCF REST (POX) Client when 201 Created and No Response Content
- File download in chunks in http-context response C#
- ResponseStream re-read after read timeout
- C# httpwebrequest blank chars in responsestream
- How to read Arabic characters from HttpWebResponse in C#
- JIRA Rest API. Retrieve errormessages returned by API when it fails, using c# or vb.net
- C# Grpc Server-side streaming RPC. The client received the first message only with the second one
- 405 (POST not allowed) HttpException when trying to apply HttpResponse.Filter
- Lengthy lines of code vs readability
- Zipping several CSV files on server using StreamingResponse in Python
- Mdf file growing too large inserting binary data
- How to stream Http response with custom response formatter?
- Copy file from remote server to client browser via my server without writing the entire file to disk or memory
- Can we achieve response streaming using an AWS ALB or NLB
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
No, you can't retry. You need to reissue the request