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.
The default HTTP Request Header value is 8190 bytes.
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.
The Content-Length header indicates the size of the message body, in bytes, sent to the recipient.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With