www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Sulma <ssu...@docspace.com>
Subject mod_jserv/4917: Server error when servlet returns prior to end of transfer of POSTed data
Date Fri, 27 Aug 1999 20:24:09 GMT

>Number:         4917
>Category:       mod_jserv
>Synopsis:       Server error when servlet returns prior to end of transfer of POSTed data
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    jserv
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Fri Aug 27 13:30:02 PDT 1999
>Originator:     ssulma@docspace.com
>Release:        1.3
Linux <host> 2.2.5-15smp #1 SMP Mon Apr 19 22:43:28 EDT 1999
A servlet receives a large file via a POSTed form.  It examines the headers 
and decides to return an error page.  The page is constructed (and sent back to
mod_jserv) and the servlet returns.

This closes the socket.  MOD_JSERV will never receive the response from the 
servlet because the data is still being received from the client (and it's 
trying to send data through the closed socket, so fails).  Thus a non-helpful 
SERVER ERROR message is generated.  And a 
"(EMERGENCY) ajp11: cannot scan servlet headers" message is logged.
Example URL available upon request, but appears to replicable  
under a variety of conditions.
A couple of possiblities.

Alt1: Check for bytes available to be read in the socket prior to each write 
to the socket and abandon the write if there are?  Not a complete solution.

Alt2: Wait for an OK response from sending headers to the servlet before 
sending the POSTed data.  Any other response is taken as a response header and
the POSTed data is not written.  This of course is a significant design change, 
and requires changes to the JServ classes as well as jserv_ajpv11.c
[In order for any reply to be added to the PR database, you need]
[to include <apbugs@Apache.Org> in the Cc line and make sure the]
[subject line starts with the report component and number, with ]
[or without any 'Re:' prefixes (such as "general/1098:" or      ]
["Re: general/1098:").  If the subject doesn't match this       ]
[pattern, your message will be misfiled and ignored.  The       ]
["apbugs" address is not added to the Cc line of messages from  ]
[the database 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!     ]

View raw message