Questions tagged [http-content-length]

The Content-Length header specifies the length (in bytes) of the content, both for requests and responses.

The Content-Length header specifies the length (in bytes) of the content, both for requests and responses. It is especially important when using persistent connections, so the end of one message and the start of the next can be delineated. It is not used for chunked content.

118 questions
0
votes
1 answer

Incorrect Content Length When Running Perl Dancer On Apache

I am just getting started with setting up an app using Perl Dancer on Apache. I used the provided dancer script to setup my initial directory structure, and was able to get things setup to the point of seeing the initial "Perl is Dancing" page.…
Scott
  • 1
0
votes
1 answer

How to calculate Content-length properly in tclhttpd?

My Tcl source files are in utf-8. Tclhttpd would not send national characters properly, so I modified it a bit. However, I also send binary stuff like jpg images and sometimes binary chunks are present in my otherwise utf-8 HTML. I have difficulty…
MKaama
  • 1,732
  • 2
  • 19
  • 28
0
votes
2 answers

ContentLength of page is not available, how to calculate progress value?

i have a problem that the content-length of header is undetermined ie -1 in my case. So can anyone please give me an idea on how to calculate the progress for the progress view, so that i display the progress view as the page loads.. .. thanks in…
Zaraki
  • 3,720
  • 33
  • 39
0
votes
1 answer

Azure file storage putRange operation fails with 416: InvalidHeaderValue (Content-Length)

I'm using the Azure SDK to perform basic operations on an Azure files storage. In order to support larger file uploads I support chunked uploads, so I'm calling: $storage->createFileFromContent(...) on the first chunk and $storage->putFileRange(...)…
Hustensaft
  • 117
  • 3
  • 10
0
votes
1 answer

Get httpwebrequest content-length vb2005

I have a program where users input a complete URL with URL-encoded query string, and it send that to the web. I am using the httpwebrequest in vb2005 I get an error from the websites saying that I should send a content length if the URL is…
Smith
  • 5,765
  • 17
  • 102
  • 161
0
votes
2 answers

Why aren't my JSP pages outputting a content-length?

I have configured CloudFront in front of my web application that uses JSP pages, but it will not cache my page because the Content-Length header is not set. Is there a way that I can get JSP to include the Content-Length, or do I need to do…
0
votes
0 answers

Correct value of content-length for HTTP text payloads

I am currently developing a HTTP server application, and I am struggling with the size of body payloads. According to the spec (and also What's the “Content-Length” field in HTTP header?), the HTTP header Content-Length contains the actual number of…
user826955
  • 3,137
  • 2
  • 30
  • 71
0
votes
1 answer

413 Request entity too large on 5.4MB JSON: how can I increase the setting?

We are sending binary encoded data as the payload of a JSON request to our Netty backend. On smaller payloads (1-2MB) everything is fine, but on larger payloads it fails with a HTTP 413 Request entity too large. We have found two places where this…
oligofren
  • 20,744
  • 16
  • 93
  • 180
0
votes
1 answer

Error Serving WOFF File in PHP - file_get_contents versus readfile

I am trying to serve a WOFF font file in PHP. First I set the Content-Type header: header("Content-Type: application/font-woff"); Then I try the following: This works fine (the file is properly served to the user, and the Content-Length header…
user3163495
  • 2,425
  • 2
  • 26
  • 43
0
votes
0 answers

Unable to get webpage size using C#

enter image description here Experts, I'm using below piece of code to get the document size but I get incorrect length since the browser profiler shows 200 KB size but I get 50 KB. Can someone please help? string URL =…
0
votes
1 answer

Is there a way to pass big json string in get request?

I have a big json string that I need to pass as string in get request but I get 404. example data: var result = {data: [{ firstname: "Name1", surname: "Surname 1", birthdate: new Date(), classname: "Class 1", classid: "1", grade: "1",…
Samra
  • 1,815
  • 4
  • 35
  • 71
0
votes
1 answer

How to do a HTTP DELETE request with Python requests module without "Content-Length: 0"?

I am doing a HTTP DELETE with Python requests module, but I am facing a problem in my application because of the "Content-Length: 0". Is there a way to deal with this? Is possible to remove the "Content-Length: 0"? What do you suggest? The problem…
0
votes
2 answers

Android getContentLength return -1 but in browser returns the file size , how?

I am trying find the file size from an URL using Android but i am getting getContentLength() : -1 , but if i will open the url in any browser then the browser can able to calculate the file size , where as browser is also a client side…
Anshuman Pattnaik
  • 883
  • 3
  • 16
  • 37
0
votes
1 answer

request.getContentLength() return 0 when file size is greater than 2gb

Using a file upload in my project as : But the request.getContentLength() method returns correct value for less…
0
votes
1 answer

which method needs content-length field?

POST or PUT method need content-length in request header field. Does another method(GET, PATCH, DELETE, OPTIONS, CONNECT, TRACE, HEADER) also need content-length? About content-length in Response, specification is described in rfc2616. The…
tamagohan2
  • 445
  • 4
  • 15