On Mon, Dec 21, 2009 at 4:41 PM, Nick Kew <[email protected]> wrote: > Paul Querna wrote: >> >> On Mon, Dec 21, 2009 at 2:39 AM, "Plüm, Rüdiger, VF-Group" >> <[email protected]> wrote: >>> >>> Please reconsider and fix. > > Done, thanks. > >> I am also slightly concerned about changing the behavoir of >> ap_rgetline_core in regards to embedded NULL bytes, since this is not >> just used by HTTP protocol handlers, it appears it could easily be >> used by other protocols... at a minimum I think there should be a >> comment in the header docs about this behavior change? > > From protocol.c > /* Get a line of protocol input, including any continuation lines > * caused by MIME folding (or broken clients) if fold != 0, and place it > * in the buffer s, of size n bytes, without the ending newline. > > From http_protocol.h > /** > * Get the next line of input for the request > > Are you saying it might be used in a protocol with RFC822-family > line-based headers but where NULL is allowed? Any examples? > > I agree with your point that I should have commented it. > I'll do that if you're not going to veto the patch.
I'm happy enough with a comment in the header file mentioning the embedded NULL byte behavior, which is kinda 'weird' because it passes back a length size_t -- hence why I think it should be documented in the interface documentation.
