Questions tagged [chunked-encoding]

Chunked encoding involves transferring the body of a message as a series of chunks, each with its own chunk size header.

This defined process means that an application-generated entity body, or a large entity body, can be sent in convenient segments. The client or server knows the chunked message is complete when the zero length chunk is received.

The body of a chunked message can be followed by an optional trailer that contains supplementary HTTP headers, known as trailing headers. Clients and servers are not required to accept trailers, so the supplementary HTTP headers should only provide non-essential information, unless a server knows that a client accepts trailers.

To use chunked transfer-coding, both the client and server must be using HTTP/1.1. A chunked message cannot be sent to an HTTP/1.0 client. The requirements that apply to chunked transfer-coding and the use of trailing headers are defined in the HTTP/1.1 specification

Source

421 questions
3
votes
0 answers

Get Transfer-Encoding chunked in Response Header by HttpClient

I want to get the value of Location in Response Header by this code HttpGet getRequest = null; CloseableHttpResponse response = null; getRequest = new…
Leo Le
  • 815
  • 3
  • 13
  • 33
3
votes
0 answers

Send a JsArray using Chunked transfer encoding

I have dynamically computed collection of jsObject. val collection: Enumerator[JsObject] = ??? I want to transform my collection to a JsArray and send the JsArray using the chunked transfer encoding. import play.api.libs.iteratee.{Iteratee,…
ulric260
  • 364
  • 4
  • 15
3
votes
2 answers

Chunked Encoding Implementation in .NET (or at least pseudo code)

I wrote a raw TCP client for HTTP/HTTPS requests, however I'm having problems with chunked encoding responses. HTTP/1.1 is requirement therefore I should support it. Raw TCP is a business requirement that I need to keep, therefore I can't switch to…
dr. evil
  • 26,944
  • 33
  • 131
  • 201
3
votes
1 answer

Serving data with "transfer-encoding: chunked" on an ApiController in C#' WebAPI

I need to serve chunked transfer encoding data using an ApiController. Because I do not have access to the HttpContext or the HttpRequest, I'm a bit lost as to where to write to the response and where to flush it. The setup looks like: public class…
Miquel
  • 15,405
  • 8
  • 54
  • 87
3
votes
0 answers

Do browsers really send chunk trailers in their requests?

In RFC 7230, there's chapter 4.4: When a message includes a message body encoded with the chunked transfer coding and the sender desires to send metadata in the form of trailer fields at the end of the message, the sender SHOULD generate a Trailer…
eckes
  • 64,417
  • 29
  • 168
  • 201
3
votes
1 answer

iOS - Is it possible to cache the chunked HTTP response?

I'm getting data from backend using AFNetworking and set request's cachePolicy as NSURLRequestUseProtocolCachePolicy. The response headers contain ETag value and Transfer-Encoding is chunked. In the second time I call the same API, it gets the…
Hai Hw
  • 1,397
  • 1
  • 16
  • 24
3
votes
2 answers

NSURLConnection chunked encoding upload - How?

I need to create a way to upload a bytestream using chunked encoding. I have a byte array that contains an audio file, I would like to send that file to a server using a chunked stream. I've been able to do a chunked upload via a native socket but I…
chews
  • 2,579
  • 2
  • 20
  • 10
3
votes
0 answers

jax-ws endpoint gets blocked writting on socket since Java 8 upgrade

We use JAX-WS implementation with JAXB for webservices, we have recently upgraded to jdk 8, since then we are having an issue when our endpoint is sending the responses. After digging into it, I realized that the endpoint thread gets blocked when…
Sergio
  • 31
  • 2
3
votes
1 answer

HTTP - Multiple Trailer Headers

I am trying to implement HTTP in my server, and am unable to find ANY information about how to handle multiple trailer header fields (with chunked encoding). The standard (https://www.rfc-editor.org/rfc/rfc2616#section-14.40) states: "The Trailer…
brettwhiteman
  • 4,210
  • 2
  • 29
  • 38
3
votes
2 answers

Using both chunked transfer encoding and gzip

I recently started using gzip on my site and it worked like a charm on all browsers except Opera which gives an error saying it can not decompress the content due to damaged data. From what I can gather from testing and googling it might be a…
RadiantHeart
  • 266
  • 1
  • 4
  • 10
3
votes
1 answer

Submit Additional Form Data without setting formData

I am following How-to-submit-additional-form-data and have a working fileupload that is submitting the additional form data, ie. the additional textarea input field, description[], with chunking and multiple file support without setting formData:{ }…
3
votes
2 answers

Why is http-response in chunked transfer-encoding only for some clients

I have an asp.net mvc application running on IIS 7. The problem I'm having is that depending on client the response may be recived (as seen through fiddler) as "chunked transfer-encoding. What I can't understand is why this only happens to some of…
Vinblad
  • 676
  • 1
  • 7
  • 18
3
votes
1 answer

python requests chunked response

I am using the Python Requests package to write a simple rest client. Here is my code - r = requests.get(url, auth=(user, passwd), stream=True, verify=False) print('headers: ') pprint.pprint(r.headers) print('status: ' +…
Quest Monger
  • 8,252
  • 11
  • 37
  • 43
3
votes
3 answers

Python web framework capable of chunked transfer encoding?

I'm developing a web app in Python where one of the use-cases is for a user to: Upload a large file over HTTP POST and Simultaneously download and display a response, which is a processed version of the file of a similar size. The client is…
user1478842
  • 135
  • 4
  • 10
3
votes
1 answer

Does AppEngine BlobStore support Chunked Transfer Encoding for uploads (Status 411: Length required)?

I'm having a really hard time finding documentation on a very basic question about AppEngine: Does the BlobStore support Chunked Transfer Encoding for uploads? I'm using an HttpURLConnection object in Java with setChunkedStreamingMode to upload a…
Markus A.
  • 12,349
  • 8
  • 52
  • 116