You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Frank Jas <fr...@pacweb.com> on 1998/11/14 04:39:22 UTC
general/3401: no shutdown() of client socket in ap_bclose()
>Number: 3401
>Category: general
>Synopsis: no shutdown() of client socket in ap_bclose()
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: apache
>State: open
>Class: sw-bug
>Submitter-Id: apache
>Arrival-Date: Fri Nov 13 19:40:01 PST 1998
>Last-Modified:
>Originator: frank.jas@pacweb.com
>Organization:
apache
>Release: 1.3.3
>Environment:
NeXT, netbsd, with NO_LINGCLOSE
>Description:
Wouldn't it be better to shutdown() the socket before close()ing it?
As it stands the client may not get a FIN, and hence not realize no
more data was coming. On many OSes a close() of a socket doesn't automatically terminate the connection. If no Content-Length header
was generated in the reply (if it ever is), then the browser may sit
for a while.
>How-To-Repeat:
>Fix:
Check for B_SOCKET flag and call shutdown(fd, 1 or 2) before calling
ap_pclosef () in main/buff.c:1421. I'm not sure whether that should be done
with alarms blocked or not. May instead want to write ap_pclosesocket()
for the UNIX side which is basically ap_pclosef() with a shutdown().
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, ]
[you need to include <ap...@Apache.Org> in the Cc line ]
[and leave the subject line UNCHANGED. This is not done]
[automatically because of the potential for mail loops. ]
[If you do not include this Cc, your reply may be ig- ]
[nored unless you are responding to an explicit request ]
[from a developer. ]
[Reply only with text; DO NOT SEND ATTACHMENTS! ]