Re: bug #94 news

From: Henrik Nordström <hno@dont-contact.us>
Date: Fri, 4 Oct 2002 03:43:08 +0200 (CEST)

On Thu, 3 Oct 2002, Adrian Chadd wrote:

> You're talking about:
>
> (gdb) frame 3
> #3 0x0003b98c in httpSendRequest (httpState=0x787010) at http.c:952
> 952 assert(-1 == cfd || FD_SOCKET == fd_table[cfd].type);

Right.. overlooked a little c there..

> and, yes, cfd has been closed.

which is pretty fine.. and to deal with this all we have to do is to
ensure that we do not rely on the client filedescriptor in http.c. The
only use of the client filedescriptor in http.c is for the Forwarded-For
http header in httpBuildRequestHeader...

Hmm.. the closed case should be dealt with properly. When the client
descriptor is closed the mem_obj->fd SHOULD be set to -1. If it is http.c
will be happy.

> So, it _sounds_ like a possible problem with BOTH persistent
> client/server connections, perhaps?

Perhaps, but looking at the code again I think the persistent connections
question is irrelevant.

More relevant is probably the question on which mem_obj this actually is,
and how the client filedescriptor knows it is referenced by this mem_obj..
A quick grep on the sorce reveals that it most likely does not know at
all... mem_obj->fd is only assigned at one place (in forward.c) and only
used by the suspected code in http.c, and there only to be able to insert
the client address in the forwarded headers..

Regards
Henrik
Received on Thu Oct 03 2002 - 19:43:10 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:16:52 MST