Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the average size of an HTTP request/response header?

I am working with an embedded platform that has 16MB of RAM only. And I need to deep packet filter HTTP streams. To prevent a Denial of Service attack on the device I'd like some statistical averages regarding HTTP stream sizes, specifically the HTTP header in particular.

like image 483
unixman83 Avatar asked Mar 18 '11 21:03

unixman83


People also ask

What is the header size of HTTP?

The default HTTP Request Header value is 8190 bytes.

How many bytes are in the HTTP header?

The content-length is the size of the compressed message body, in "octets" (i.e. in units of 8 bits, which happen to be "bytes" for all modern computers). The size of the actual message body can be something else, perhaps 150280 bytes.

What is Content-Length in request header?

The Content-Length header indicates the size of the message body, in bytes, sent to the recipient.

How do I know my response size?

You can Use HTTPRequest and HTTPResponse class method getBodyAsBlob(); to get the response body in blob and then you can check the size. httpRequest. getBodyAsBlob(). size(); httpResponse.


1 Answers

From Google's SPDY research project whitepaper

Uncompressed request and response headers. Request headers today vary in size from ~200 bytes to over 2KB. As applications use more cookies and user agents expand features, typical header sizes of 700-800 bytes is common.

like image 135
typo.pl Avatar answered Sep 20 '22 14:09

typo.pl