Hi All,
When calling mime_parser_parse you are expected to set 'end' to point to
one byte beyond the end of the buffer (See docs for INKMimeHdrParse and comment
above HTTP.cc:http_parser_parse_req).
If the header buffer ends with a single \r\n AND the 'eof' flag is false,
mime_scanner_get will test the byte beyond the end of the buffer to see if it
equals a whitespace (This is done to see if this is a multi line header).
If it is, it will decide the last header in the buffer has a continuation line
and (since it has already exceeded the length of the buffer), ignore that
header for now (expecting to be called again once more data has arrived).
This can also cause problems for a plugin which calls the parser with a buffer
that isn't terminated with \r\n\r\n but with a \r\n -- I'd expect to always get
INK_PARSE_CONT (Assuming the headers are formatted ok), with all headers in the
buffer being available.
The parsed data will sometimes not contain the last header in the buffer.
Cheers,
Uri Shachar