I get the following HTTP response headers in a particular response. All looks okay. However I have noticed that the content-length appears twice...
Content-Length: 2424 ntCoent-Length: 2424
Is there a particular reason why the content-length is returned a second time as ntCoent-Length?
HTTP/1.0 200 OK Date: Wed, 26 May 2010 09:38:19 GMT Server: Apache P3P: CP="NOI DSP COR CURa ADMa TA1a OUR BUS IND UNI COM NAV INT" Accept-Charset: iso-8859-1, unicode-1-1;q=0.8 Expires: Sun, 15 Jul 1990 00:00:00 GMT Pragma: no-cache Cache-Control: no-cache Content-Language: en ntCoent-Length: 2424 Connection: close Content-Type: text/html;charset=iso-8859-1 Content-Length: 2424
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.
To manually pass the Content-Length header, you need to add the Content-Length: [length] and Content-Type: [mime type] headers to your request, which describe the size and type of data in the body of the POST request.
Description. The Content-Length is optional in an HTTP request. For a GET or DELETE the length must be zero. For POST, if Content-Length is specified and it does not match the length of the message-line, the message is either truncated, or padded with nulls to the specified length.
The comments in https://basildoncoder.com/blog/turbocharging-net-webservice-clients.html say the jumbled ntCoent-Length header contains the uncompressed size of the response.
You should see the Content-Length is smaller than ntCoent-Length in cases where Content-Encoding:gzip or similar
FYI, HTTP headers from some clients have characters randomly replaced gives other examples of letter transposition in http headers.
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