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

Python requests: chunked post request

I am trying to send a post request through the request module with headers["Transfer-encoding"] = "chunked", but I am getting back:

Bad Request - Invalid Content Length


HTTP Error 400. There is an invalid content length or chunk…

Neo
  • 448
  • 7
  • 18
2
votes
1 answer

Java: How to download chunked content correctly?

I have to download file which HTTP response is "Transfer-Encoding: Chunked", because of what I can't to «getContentLength» to allocate new bytes buffer for DataInputStream. Can you advice me how to do it correctly? Code example is very…
Clark
  • 2,083
  • 6
  • 32
  • 47
2
votes
0 answers

I am having issue with Rest API response in chrome only. net::ERR_INVALID_CHUNKED_ENCODING 200

I am using angular as frontend and Java Spring MVC in backend. From past few days issue has started in Chrome only. It is throwing net::ERR_INVALID_CHUNKED_ENCODING 200 randomly Weirdly it is throwing error in chrome browser only. Here are the…
2
votes
0 answers

React Native chunking uploads to CDN...sending and receiving file size discrepancy. How to calculate size that the server will receive?

Our React Native app lets the user record a video (3 to 90 seconds) and then our app does a chunked upload to our CDN service (Cloudinary). As part of the chunked upload request each upload needs to include a header that indicates the byte range and…
milesmeow
  • 3,688
  • 5
  • 35
  • 58
2
votes
1 answer

Send a chunked HTTPS response from a Go server

The following the example works very nicely for HTTP: Send a chunked HTTP response from a Go server As soon as I add TLS, I see that the responses are no longer chunked: func main() { http.HandleFunc("/", func(w http.ResponseWriter, r…
Mike Eller
  • 31
  • 4
2
votes
1 answer

How to stream live h.264 (IP camera) video to browser? (bonus: low bandwidth and latency)

I need to stream live h.264-encoded video from an IP camera to the browser, while supporting all common browsers and mobile devices (i.e. Android, Firefox, Chrome, IE, Safari (Mac OS and iOS)), and while keeping bandwidth requirements and latency to…
Ryan Griggs
  • 2,457
  • 2
  • 35
  • 58
2
votes
2 answers

Java Spring Server Side REST Streaming for Large Data

I currently have a program that takes in a query from a user via REST (Spring)and runs it across the database and returns the results via REST. The issue I'm running into is that if the user queries for a large set of data, at a certain point the…
hyperstack
  • 29
  • 1
  • 4
2
votes
1 answer

Printing http chunks and their arrival time

Is there any way to print http chunks and their arrival time ? Using curl or any other visualization tool? any quick way to write this in javascript? I found a tool called chunk scatter http://scatter.cowchimp.com/ but it is not working for https…
Rama Vadakattu
  • 1,266
  • 2
  • 16
  • 24
2
votes
1 answer

uwsgi/nginx configuration for chunked response

I have two endpoints like below: GET on /api/v1/foo POST on /api/v1/foo I need the POST implementation to send back chunked responses using HTTP/1.1 chuked-tranfer encoding however the GET endpoint should send plain JSON My setup is nginx -> uwsgi…
user3490695
  • 139
  • 2
  • 13
2
votes
0 answers

How do I stream a video of initially unknown size to the HTML5 video tag?

I am attempting to write a web service (using C# and WebAPI, thought the actual server technology likely isn't important) that hosts dynamic video files for consumption by a basic HTML5 video element. Here is my situation and my requirements: The…
2
votes
1 answer

How to create a streaming HTTP Server in Crystal?

I want to create a server similar to Twitter Streaming API, so a client could read the response in real-time staying connected. How to do that in Crystal?
Vlad Faust
  • 542
  • 6
  • 18
2
votes
1 answer

Http server in c# supporting chunked Transfer-Encoding

I am looking for a way to create a HttpServer in C# that supports the chunked Transfer-Encoding for multipart-form posts. Reason is that I need to transfer large files (2-10GB) and the client application has to use the chunked transfer-encoding -…
user8609610
  • 41
  • 1
  • 3
2
votes
1 answer

Reading gzipped chunked data HTTP 1.1 in Java

I am trying to get body of an HTTP request with gzipped data + chunked encoding. The code I am using: byte[] d; // *whole* request body ByteArrayOutputStream b = new ByteArrayOutputStream(); int c = 0; int p = 0; int s = 0; for(int i = 0; i <…
carobnodrvo
  • 1,021
  • 1
  • 9
  • 32
2
votes
0 answers

Disable support for chunked encoding

Is there a way to disable chunked encoding support in a browser?
timeitquery
  • 251
  • 1
  • 5
  • 14
2
votes
1 answer

Can you explain chunked encoding?

header("Transfer-Encoding: chunked"); echo"32 12345678901234567890123456789012345678901234567890 0 "; flush();exit; When requested with Firefox, 32 and 0 are missing. Why?
wamp
  • 5,789
  • 17
  • 52
  • 82