Questions tagged [content-length]

Entity-header field indicates the size of the entity-body.

The Content-Length entity-header field indicates the size of the entity-body, in decimal number of OCTETs, sent to the recipient or, in the case of the HEAD method, the size of the entity-body that would have been sent had the request been a GET.

374 questions
0
votes
1 answer

gstreamer get length of media from console

I want to retrieve the time length of a MP3 file with gstreamer with a command on the console. But I don't know how. I tried the following command gst-launch filesrc location=$myMediaFile ! decodebin2 ! fakesink but I got the following…
0
votes
1 answer

How to set content-length while returning user defined objects

I have Jersey rest services running on tomcat. I'm returning a Response object for a rest call, but the entity of the payload is a list of objects of a class that i defined. How can i set the content-length in the response header for this List …
Some guy
  • 1,210
  • 1
  • 17
  • 39
0
votes
3 answers

Getting length of float

I am trying to get the length of a float, but it is saying the length is 8. I want to know how many digits there are. why is it saying that there are only 8 digits? #include int main() { double n = 72382.413651; int len; len…
kyle k
  • 5,134
  • 10
  • 31
  • 45
0
votes
1 answer

HTTP Request to IceCast and Response

There's an HTTP request to the IceCast 2.3.2-kh29 server MP3 stream http://*:*/.mp3 and response (some data are **ed): GET /*.mp3 HTTP/1.1 Host: ***:* User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:22.0) Gecko/20100101 Firefox/22.0 Accept:…
Tramway11
  • 419
  • 3
  • 9
  • 20
0
votes
1 answer

nodejs gm content-length implementation hangs browser

I've written a simple image manipulation service that uses node gm on an image from an http response stream. If I use nodejs' default transfer-encoding: chunked, things work just fine. But, as soon as I try and add the content-length implementation,…
Acorn
  • 897
  • 7
  • 13
0
votes
1 answer

Python - len(somelist) returns different value than method in class

I have a class: class something(object): def __init__(self, name=None, someobjects=[]): self.name = name self.someobjects = someobjects And I'd like to be able to get the number of those objects as a property or a method. e.g.…
d-cubed
  • 1,034
  • 5
  • 30
  • 58
0
votes
1 answer

Connect to a Rails Server via Ruby using the TCPSocket. Getting "Length Required WEBrick::HTTPStatus::LengthRequired"

I am trying to connect to a Rails server but the response i keep getting is Length Required WEBrick::HTTPStatus::LengthRequired I am using TCPSocket to connect to the server. require 'socket' host = 'localhost' port =…
0
votes
2 answers

How do it I set the number of items in a key:value dictionary as the keys value in python

Hello everyone I have an unique question. In a key:value dictionary, how do I get the len of an item list and let the len be the keys value? Such as D = {'Chicago Cubs': 1907, 1908, 'World Series Not Played in 1904': [1904], 'Boston…
Thomas Jones
  • 355
  • 2
  • 11
  • 17
0
votes
1 answer

NSURLResponse Content-Length mismatch size of actual data when running concurrent downloads

I have a UITableView, when a cell is selected, I make a service call to asynchronously download a PDF file from a web service. It works great, until you select multiple cells directly after one-another (individually), then things start going…
0
votes
0 answers

Unable to send base64 > 600kb via php post

I am trying to send images (base64) to my backend via php post. Images smaller than 600kb work just fine but images above 600kb result in an empty post value. These are my php.ini stats post_max_size = 16M upload_max_filesize = 16M memory_limit =…
Christiaan
  • 45
  • 6
0
votes
1 answer

Java Servlet Repsonse Set Content Lenght For CSV

Requirements Downlading a CSV File Code I have a csvFormattedString like String csvFormattedString = "\"Column_One\",\"Column_Two\"\n\"Row_Col1\",\"Row_Col2\"\n"; This CSV String is written to the reponse print writer…
Anand Sunderraman
  • 7,900
  • 31
  • 90
  • 150
0
votes
1 answer

How to deal with an upload changing size after specifying the Content-Length?

I've come across a problem today, I'm uploading a multipart form with http POST using the poster module. Part of the form is a file, which poster streams up - which is great. The problem I'm having is the Content-Length is calculated up front before…
GP89
  • 6,600
  • 4
  • 36
  • 64
0
votes
1 answer

How to read the content of a server response after login ? (HTTP related)

my goal is to login to a vBulletin forum using C++/Winsock. The forum is forums.randi.org For this purpose I've been sniffing the packets and here is the header of the server response to the POST request which supplies the login details: HTTP/1.1…
0
votes
1 answer

Content-Length header is not getting in Android 2.3 above browser

I am having an hybrib application in that in that a simple php page will open which contents some link of files, and from my android wrapper i have implemented the download functionality of file. So for user convenience i am showing the length and…
Piyush Agarwal
  • 25,608
  • 8
  • 98
  • 111
0
votes
2 answers

php get byte length of object, for header

I need to set php header("Content-Length: length"), where length is a byte value. Right now I have arbitrarily set it to 1 megabyte due to the variable size of my post request, but I want to dynamically generate this so that there isn't erroneous…
CQM
  • 42,592
  • 75
  • 224
  • 366
1 2 3
24
25