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
0
votes
2 answers

How to control chunks in jetty?

I'm writing HTTP webservice that may take quite long to produce results. I use embedded Jetty 8.1.5 and JAX-RS (Apache CXF) I decided to go with some kind of control protocol: when new request comes, I start a long-running job in a separate thread…
relgames
  • 1,356
  • 1
  • 16
  • 34
0
votes
1 answer

Why does my successful streaming response in Webmachine have the status code 500?

The following code is the full source of a webmachine resource. The expected behaviour is that the streaming response should be a 200, and should be a string of specified length, entirely composed of the letter 'a'. This string is indeed returned…
Chris Hagan
  • 2,437
  • 3
  • 17
  • 16
0
votes
0 answers

Apache mod_deflate and chunked transfer

my website is running on Apache 2.2.24 + PHP 5.3.22. Apache is installed with mod_deflate and my .htaccess looks like this: AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css…
Gotenks
  • 367
  • 6
  • 14
0
votes
1 answer

HTTP chunked transfer

I'm writing a client app that connects to a service using the chunked transfer encoding. The service occasionally disconnects and I was told it was because we're sending a zero chunk in the request, so Tomcat closes the connection. I'm using the…
user1309036
  • 61
  • 1
  • 1
  • 4
0
votes
2 answers

Why is chunked transfer encoding not allowed to web applications running in CloudBees run@cloud?

I'm using an application that sends SOAP requests (HTTP POST) to my application running in CloudBees PaaS (run@cloud). The SOAP sender application gets the following error from the server: Transport error: 411 Error: Length Required. This means that…
Kaitsu
  • 4,094
  • 3
  • 30
  • 37
0
votes
1 answer

I am trying to send an HTML part as chunks in an HTTP response using a perl script but I am getting compilation errors

Following is a portion of the script I am using to send HTML page as chunked response. However upon running the script throws compilation errors like : Number found where operator expected at nph-99_1_1_18.pl line 19, near "print "233" (Might be a…
Dcoder
  • 379
  • 2
  • 7
  • 13
0
votes
1 answer

Reading one chunk at a time in Django

Our setup is Nginx, Gunicorn and Django. I'm trying to add functionality that proxies Chunked Transfer Encoding as an HTTP post request http://en.wikipedia.org/wiki/Chunked_transfer_encoding But even though we were able to read the chunked data…
Tal Weiss
  • 8,889
  • 8
  • 54
  • 62
0
votes
1 answer

Chunked encoding issue in web.py

I have my web.py application running. It receives POST request from outside. The request header contains transfer-encoding: chunked. When i try to read the data with web.data() the process starts consuming enormous amount of memory and after couple…
Aashish P
  • 1,894
  • 5
  • 22
  • 36
0
votes
1 answer

Server can't determine the length of this raw HTTP message

I'm attempting to stream chunked POST data using sockets in PHP to a local server for testing. This works fine if I don't chunk the request entity body and provide a Content-Length header. However, when I chunk the transfer as follows the server…
user895378
0
votes
1 answer

HttpWebRequest and Transfer-Encoding

HttpWebRequest is used to download files from ASP.NET site with basic authentication. Everything works fine in many cases, but some proxies make answer chunked and HttpWebRequest.GetResponse() throws an exception if answer with 401 status code is…
gililili
0
votes
1 answer

Read chunked HTTP in .Net

I'm trying to write a VB.net client that reads HTTP chunked data. The chunks contain additional information that I need to use. I've already figured out that I can't use the HTTPWebResponse, since it hides the optional tags. So, the way I understand…
Shahar Mosek
  • 1,922
  • 3
  • 17
  • 27
-1
votes
1 answer

Go chunk upload

Does go support chunk upload? I am going to upload file as one-part multipart upload. As far as I know: type Part represents a single part in a multipart body and func (*Part) Read reads the body of a part, after its headers and before the next part…
Sergii Getman
  • 3,845
  • 5
  • 34
  • 50
-1
votes
1 answer

Can't make: implicit declaration of function ‘http_write_chunked’

I'm trying to compile demo main file (https post with the chunked-encoding data) from github repo using, I have installed libghc-iproute-dev and libnl3. gcc -o main -Imbedtls/include -fPIC -DHAVE_CONFIG_H -D_U_="attribute((unused))" main.c -O2…
Amadeus
  • 63
  • 1
  • 7
-1
votes
1 answer

How to disable/setup transfer-encoding in varnish?

Varnish responds with Transfer-Encoding: chunked for ESIed pages, but this does not work for some proxies(squid). I want to disable transfer-encoding for ESI.
shenyan
  • 408
  • 4
  • 9
-2
votes
1 answer

HTTP 1.1 chunk-size computation algorithm

This is rather a question to satisfy curiosity. How does standard HTTP 1.1 stacks compute chunk-sizes on a HTTP response socket? Is it timeout based, max size based or depends on when the application does a flush on the socket, or an algorithm based…
1 2 3
28
29