Answer the question
In order to leave comments, you need to log in
How is the Content-Length header value calculated?
I never thought about it, but today I suddenly wondered, what exactly does Content-Length mean? Only the size of the request body, or does it show the size of the entire request, i.e. service headers + body?
PS The documentation says that this is the size of the request body, but it does not say whether the service headers refer to the body!
Answer the question
In order to leave comments, you need to log in
Content-length indicates the size of the Body.
Those. it could very well be size zero even with a bunch of headers and status.
For such simple questions, there is always Google and documentation
https://developer.mozilla.org/en-US/docs/Web/HTTP/...
The answer is hardcoded in the name itself - "Content length"
The documentation says that this is the size of the request body, but it does not say whether service headers refer to the body!
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question