You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Nick Kew <ni...@webthing.com> on 2009/12/22 01:41:01 UTC

Re: svn commit: r892678 - in /httpd/httpd/trunk: CHANGES server/protocol.c

Paul Querna wrote:
> On Mon, Dec 21, 2009 at 2:39 AM, "Plüm, Rüdiger, VF-Group"
> <ru...@vodafone.com> 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.

-- 
Nick Kew

Re: svn commit: r892678 - in /httpd/httpd/trunk: CHANGES server/protocol.c

Posted by Paul Querna <pa...@querna.org>.
On Mon, Dec 21, 2009 at 4:41 PM, Nick Kew <ni...@webthing.com> wrote:
> Paul Querna wrote:
>>
>> On Mon, Dec 21, 2009 at 2:39 AM, "Plüm, Rüdiger, VF-Group"
>> <ru...@vodafone.com> 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.