Is it possible for a HTTP 1.1 client to set a header value that indicates the responses to requests should not be chunked? Or is the only way to prevent this, is to send a HTTP 1.0 request? I've tried googling around, but all I can find is ways to disable chunked transfers on HTTP 1.1 servers, so I am guessing it is not possible on a client, but I thought I'd ask anyways.
HTTP 1.1 - Can a client request that transfers not be "chunked"?
9.3k views Asked by Matt At
2
There are 2 answers
1
Purvi Patel
On
To get Content-Length in bytes instead of chunked inside the response with HTTP 1.1, you have to set Content-Length header and its size (long or int) based on the file you are expecting inside the response. long will be good so it can take care small as well as big file size. response will be HttpServletResponse. response.addHeader(Content-Length, Long.toString()); Thanks,
Related Questions in HTTP
- Handling both JSON and form values in POST request body with unknown values in Golang
- Why can't I use PUT requests?
- nginx set up reverse proxy from subfolder to a port
- Async Web Server RP2040 returning ERR_CONNECTION_REFUSED?
- Getting `FormatException: Missing extension byte (at offset 6)` exception for accessing `response.body` from a server deployed in Vercel
- Retrieving list of values from MYSQL data base based on input value(LARAVEL 10 )(GET HTTP METHOD)
- Unable to add request headers via CHttpFile - C++/MFC
- Why do we call all http services 'Web Api/Web Service'?
- How to correctly read POST REQUEST body on ESP32?
- on linux gitclone issue remote server error showing fatal error with proxy n port
- Elasticsearch - cascading http inputs from Airflow API
- How to clean the html pages opened in a session?
- UTF-8 is not a valid encoding name
- I dont get the Result i expected when i want to get my Telegram Chatbot id
- NextJS 14 SSE with TransformStream() sending messages in a single response
Related Questions in CHUNKED-ENCODING
- How await all chunks of responses if request is stream (Axios)
- Python Reading URL: ChunkedEncodingError
- How to resolve the"The chunked cookie is incomplete" in ASP.NET application from Chrome and Edge browsers?
- Error handling with Transfer-Encoding chunked http requests with express and axios
- How to get a PHP script to execute while receiving a file?
- Chunks are getting dropped from HTML response in Spring
- Image file is corrupted when downloaded using sockets
- NGINX: How to optionally disable chunked_transfer_encoding?
- HTTP Upload Techniques for 50gb files
- How to handle Transfer-Encoding: chunked type response in angular
- Run specific code chunk when clicking on actionbutton
- how does Chrome DevTools knows content size of an incomplete http response
- Prematurely interrupting HTTP POST chunked transfer if size limit exceeded
- python requests ChunkedEncodingError when receiving and writing some data from a server
- Using chunks in http request
Related Questions in CHUNKED
- Multipart/form-data with chunked data transfer (ICAP protocol)
- WebFlux is unable to decode Chunked requests properly
- Send an HTTP response with trailers using the Java HTTP Server
- Audio streaming from python server to js client
- Quarkus ApiResponse is 200 OK but the body of the response is incomplete
- How to handle Transfer-Encoding: chunked type response in angular
- Chunked data transmission not working properly
- Transfer-encoding chunked in golang proxy
- How can I play chunked video using react-native-video?
- If I send chunked data from my webapp, will the client receive each chunk intact?
- Kotlin: Split Sequence<T> by N items into Sequence<Sequence<T>>?
- Why isn't chunked video files uploading to target directory in Plupload version 2.3.6
- How to get specific chunks from stream node js
- Stream a raw pdf to client is taking to much time
- R - reading large file without loading into memory using chunked - warnings and errors
Related Questions in HTTP-1.1
- HTTP2_PROTOCOL_ERROR and ERR_CONNECTION_CLOSED when updating weblogic version 12 to 14
- Netty Reactive Web Server Connections Stuck in CLOSE_WAIT
- How to disable HTTP/2 forwarding on a puma web server running ruby on rails
- How to force Chrome to use HTTP/1.1 for a particular Website?
- 411 content length required WebAPI WebHook
- HTTP1.1 is timing out on some urls
- Performance comparison of HTTP/2.0 and HTTP/1.1 with less than 50 requests
- How can server with HTTP 1.1 understand client that uses HTTP 2?
- Http1 / Netty Question : Do we see http request and content in the same channel read
- HTTP/1.1 426 Upgrade Required on heroku
- How correctly call an websocket from FE using http1.1
- How to make the web server support http 1.1 persistent connections?
- keep alive, what is the difference between HTTP1.1 and TCP
- How to set APLN protocols before TLS handshake with OpenSSL in Rust?
- How to send a http2 request headers with python socket
Related Questions in HTTP-CHUNKED
- HTTP Request Header Transfer-Encoding: chunked not getting set even when Body is a ReadableStream
- NGINX: How to optionally disable chunked_transfer_encoding?
- Http chunk encoding miss end of chunked encoding("0\r\n") or tailer("\r\n") on IIS 7.5
- how does Chrome DevTools knows content size of an incomplete http response
- Read from a compressing GZipStream
- Chunk transfer vs grpc streaming
- Chunked Transfer Encoding, Content-Length, and Byte Serving
- How do I read chunked HTTP responses on jmeter?
- Chunked transfer encoding doesn't work with any browsers except Firefox
- Is http stream actually implemented by http chunk?
- How To Stream Chunked Response With Spring Boot @RestController
- C# Retrieve an HTTP POST chunked response by chunk?
- Does Fetch's Response.body chunks correspond to HTTP chunks?
- URLSession didReceiveData isn't called in chunked request
- File download in chunks in http-context response C#
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?
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)
In HTTP (starting with HTTP/1.1), recipients MUST support chunked encoding. See http://greenbytes.de/tech/webdav/draft-ietf-httpbis-p1-messaging-26.html#rfc.section.4.1.p.4.