httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@gmail.com>
Subject Re: Re^4: [patch] perchild.c
Date Tue, 03 Aug 2004 11:23:45 GMT
On Tue, 3 Aug 2004 11:45:51 +0900 (JST), Tsuyoshi SASAMOTO
<nazonazo@super.win.ne.jp> wrote:
> >attached patch looks a bit simpler; does it look okay to you?
> 
> Yes, it looks good and smart.
> 
> # I wonder about intention of the original code `if (!body)`;

if we received a message, it will have the '\0' in it (or there is a
bug in the send logic); so I'm not worried about the original check
for if (!body)...

> # in what case could it occur... recvmsg() could fail?

looks like pass_request() is what does the sendmsg(), yet there is an
error path in there -- when apr_brigade_flatten() fails; on this error
path, the connection to the recvmsg() loop would be dropped with no
sendmsg(), so recvmsg() would return a failure

> # If so, rather return value of the recvmsg() should be checked...

another thing I wonder about with regards to this AF_UNIX/SOCK_STREAM
logic: SOCK_STREAM isn't normally message oriented, but no logic on
the receive side to handle a partial read; when will that blow up?

I suspect (but haven't done the testingresearch) that the only thing
we can assume is sent over intact is the file escriptor that is
getting passed, and the receiver should be prepared to continue
reading after calling recvmsg()

--/--

also, why send over the request body on this initial "message"? how
would the request body get filtered?  seems like we should let the
process which is going to handle this request read the request body
through the input filter chain

Mime
View raw message