-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Currently we only count the size of the key and value in the headers.
mod_log_header_size/mod_log_header_size.c
Lines 24 to 31 in 9fb4cf8
| static int gather_header_size(void *b_, const char *key, const char *value) | |
| { | |
| int *b = b_; | |
| (*b) += strlen(key); | |
| (*b) += strlen(value); | |
| return 1; | |
| } |
Typically a line looks like this
Key: Value
It has 4 additional bytes...
- The colon after the key
- The space after the colon
- A CLRF at the end of the line
After the final line there is an additional line with only a CLRF before the body starts. Based on the HTTP spec I don't think this is part of the headers
Request (section 5) and Response (section 6) messages use the generic message format of RFC 822 [9] for transferring entities (the payload of the message). Both types of message consist of a start-line, zero or more header fields (also known as "headers"), an empty line (i.e., a line with nothing preceding the CRLF) indicating the end of the header fields, and possibly a message-body.