What I'd like to do is add a few items to the log line which contain the
size of the headers, and then the value of the Content-Length header.
This way if the connection is broken for any reason, we can determine if
the client sent all the data they were supposed to.

Logging the Content-Length header is easy, but I can't find a way to get
the size of the headers.
The only way that pops into mind is to look for the first occurrence of
\r\n\r\n and get its offset (and preferably add 4 as to include the size
of the \r\n\r\n in the calculation). But I don't see a way to accomplish
this.

Any ideas?

Thanks

-Patrick

Reply via email to