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
1 answer

Python: suggestions to improve a chunk-by-chunk code to read several millions of points

I wrote a code to read *.las file in Python. *las file are special ascii file where each line is x,y,z value of points. My function read N. number of points and check if they are inside a polygon with points_inside_poly. I have the following…
Gianni Spear
  • 7,033
  • 22
  • 82
  • 131
3
votes
1 answer

Why does Comet need chunked-encoding response?

I read some articles about Comet tech. All of them mentioned that the long-life HTTP response should be Transfer-Encoding: chunked . I'm wondering why it should be chunked-encoded. If the response is not chunked-encoded, the client javascript can…
Morgan Cheng
  • 73,950
  • 66
  • 171
  • 230
3
votes
1 answer

HttpWebRequest, Redirects, chunked encoding error on live site, but works i IIS Express locally

I have some code that creates a HTTP POST WebRequest with C# and posts some data to a https site. That site then redirects to a new URL and returns some data. This works just fine on my local machine running IIS Express, but on my production server …
Johan Nordberg
  • 3,621
  • 4
  • 33
  • 58
3
votes
1 answer

How to View source page using Wireshark?

Is there a possibility that a website's source page can be captured and viewed using Wireshark ? I do not need the header packets, what I am looking for is the full source page of any site that I open while running the Wireshark.
ChaCha
  • 77
  • 6
2
votes
3 answers

Ruby chunked encoding client

I'm trying to make little ruby script which receives streamed data with a HTTP Chunked Transfer encoding. So I'm using ruby at the client end of this. I can find lots of questions and info about ruby (and rails) serving streams, but not much about…
Harry Wood
  • 2,220
  • 2
  • 24
  • 46
2
votes
1 answer

how to handle a chunked response from a server?

I'm on the last major hurdle of writing a basic proxy server in C. I've got my server successfully receiving requests from the browser, then successfully sending them to the host, wherever they are. And I'm successfully receiving responses from the…
temporary_user_name
  • 35,956
  • 47
  • 141
  • 220
2
votes
2 answers

Concatenating 'audio/x-wav' buffer and serving with 'Transfer-Encoding': 'chunked'

This question is a followup to a previous question, that was resolved thanks to @thejh. I'm trying to convert text to audio and serve the data to the client as 'chunked' data. So far my headers look like so: res.writeHead(200, { 'Content-Type':…
Christopher
  • 1,358
  • 17
  • 32
2
votes
0 answers

Run specific code chunk when clicking on actionbutton

I'm trying to create a flexdashboard in R Markdown which runs a certain code chunk when clicking on an actionbutton. I.e. at the start of the dashboard, a questionnaire with radiobuttons appears, whereas when clicking on the button "Submit Answers",…
2
votes
1 answer

Disable chunking per request

I have a web service backed by a Java Servlet. The service is used by an older version of Flash. We discovered through some pain that in this version of Flash, URLLoader won't work with chunked responses. Any chunked response is never received from…
Jeffrey Blattman
  • 22,176
  • 9
  • 79
  • 134
2
votes
3 answers

Python urllib2 decode chunked encoding

I have the following code to open and read URLs: html_data = urllib2.urlopen(req).read() and I believe this is the most standard way to read data from HTTP. However, when the response have chunked tranfer-encoding, the response starts with the…
dragoon
  • 5,601
  • 5
  • 37
  • 55
2
votes
1 answer

Are the chunk sizes in an HTTP response with "Transfer-Encoding: chunked", significant to protocols that sit on top of HTTP?

Does anything carried inside HTTP care about chunk sizes? Some sort of RPC protocol perhaps? EDIT: Here's the Wikipedia sample response Date: Mon, 30 Mar 2009 22:22:21 GMT HTTP/1.1 200 OK Content-Type: text/plain Transfer-Encoding:…
sigjuice
  • 28,661
  • 12
  • 68
  • 93
2
votes
2 answers

How do I get chunked footers from a response on a connection that uses ThreadSafeClientConnManager?

I'm using a connection created by ThreadSafeClientConnManager (Apache httpcomponents 4.1.1). The response is chunked (which I expect), as is determined by response.getEntity().isChunked() However, there is no way to get the footers/trailers (which…
Brian
  • 3,457
  • 4
  • 31
  • 41
2
votes
0 answers

Force chunk transfer enconding in NGINX for proxied responses

I've got an upstream that sends back responses in "applicaion/json" format. NGINX is used as a reverse proxy in my project. However, I have a hard requirement that client applications only accept the chunked encoding response. And hence somehow I…
minex
  • 329
  • 1
  • 5
2
votes
2 answers

libcurl: Detect chunk boundaries of chunk-encoded responses

I am using libcurl, currently the easy api. I am making a request to a web server that responds with HTTP Chunked Encoding. I would like to know if there is a way to know when a chunk from the server has finished. I was looking for some type of…
Bill Prin
  • 2,498
  • 1
  • 20
  • 27
2
votes
1 answer

What size does the server have to give to each response chunk?

If I wanted to configure my personal server so that the response for a certain request is set according to the chunk rules: what size should each of the server response chunk have? For example, let's say that the chunked response is a long HTML page…
Alberto Ursino
  • 366
  • 3
  • 18