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
568 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#
- How to call a C language function from x86 assembly code?
- What does: "char *argv[]" mean?
- User input sanitization program, which takes a specific amount of arguments and passes the execution to a bash script
- How to crop a BMP image in half using C
- How can I get the difference in minutes between two dates and hours?
- Why will this code compile although it defines two variables with the same name?
- Compiling eBPF program in Docker fails due to missing '__u64' type
- Why can't I use the file pointer after the first read attempt fails?
- #include Header files in C with definition too
- OpenCV2 on CLion
- What is causing the store latency in this program?
- How to refer to the filepath of test data in test sourcecode?
- 9 Digit Addresses in Hexadecimal System in MacOS
- My server TCP doesn't receive messages from the client in C
- Printing the characters obtained from the array s using printf?
Related Questions in TIMEOUT
- MongoDb not connecting C#
- Python Requests: Handling Exceptions and Ensuring Server Response
- Flutter connection to a local api
- SerialPort timeouts in ReadChar() method, WPF, "The operation has timed out."
- test result: Error. Program `sh' timed out (timeout set to 480000ms, elapsed time including timeout handling was 480002ms)
- sql performance in accounting software invoice list
- Scrapy handle closespider timeout in middleware
- Run initialization has timed out after 90.0 sec
- Problem with connection timeout SQL Server
- Connection timeout when trying to reach local web server from within local network
- C# MVC net.7 Application goes in time out
- How to hande nodejs/expressjs gateway timeout by THIRD_PARTY_SERVER?
- Why does the python client socket receiving a reply but still throw the exception in some threadings?
- Timeout error when running webdriverIO project in Docker with MacBook M1 Pro
- mobile devices dont see radio button onchange
Related Questions in WEBRESPONSE
- SSL webrequest, Could not create SSL/TLS secure channel
- Deserialize Json to list and save to database
- .NET won't download full XML response from REST API
- What is the proper way to read multiple Http Responses from a single Http Request (C# / .NET5 )
- HttpWebRequest Capture Response Even If 500 Internal Server Error Details
- System.Net.WebResponse throwing "System.Net.WebException: The operation has timed out" but connection to web server was made
- Why is WebResponse truncating XML?
- HttpClient Response returns scrambled data
- Soap response truncated (SoapUi returns correct response)
- Using statements and reading files
- WebRequest WebResponse Operation has timed out
- Open Toggle App Drawer by default when login in odoo
- System.Net.HttpWebRequest.GetResponse() error "You must write ContentLength bytes to the request stream before calling [Begin]GetResponse."
- how to capture data from a webresponse/streamreader and write it back in console?
- Get scripts communications responses in HtmlUnit
Related Questions in RESPONSESTREAM
- Is it possible to interrupt or stop openai chat completion stream like chatgpt and not waste tokens?
- streaming response from Lambda with InvokeWithResponseStreamCommand
- Can we achieve response streaming using an AWS ALB or NLB
- Zipping several CSV files on server using StreamingResponse in Python
- Rest template read response as stream and pass to spring controller(Get InputStream with rest Template)
- Laravel 5.8 StreamDownload File Attachment Redirecting Instead of Downloading
- C# Grpc Server-side streaming RPC. The client received the first message only with the second one
- How to stream Http response with custom response formatter?
- File download in chunks in http-context response C#
- 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
- Mdf file growing too large inserting binary data
- Why does Resharper give me this Constraint Violation, and how can I appease it?
- 405 (POST not allowed) HttpException when trying to apply HttpResponse.Filter
- Copy file from remote server to client browser via my server without writing the entire file to disk or memory
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 # Hahtags
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