Bug 50903 - Current keep-alive request processed after connector.stop()
Summary: Current keep-alive request processed after connector.stop()
Alias: None
Product: Tomcat 7
Classification: Unclassified
Component: Connectors (show other bugs)
Version: trunk
Hardware: All All
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
Depends on:
Reported: 2011-03-09 14:34 UTC by Mark Thomas
Modified: 2011-03-15 13:49 UTC (History)
0 users

Basic patch - needs work (5.62 KB, patch)
2011-03-09 14:36 UTC, Mark Thomas
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Thomas 2011-03-09 14:34:53 UTC
When the connector is stopped, if a connection is in a keep-alive state the next request received by that connection will be processed and then the connection will be closed. When the request is received, it should be rejected.

Outstanding questions:
- What return code (if any) should be sent back to the client?
- If the reading of a request starts before the connector is stopped, should that request be allowed to complete or should it be rejected?
Comment 1 Mark Thomas 2011-03-09 14:36:33 UTC
Created attachment 26755 [details]
Basic patch - needs work

This patch provides an idea of how this might be tackled. This will stop and request where the request has not been completely read. This is probably not the ideal approach.
Comment 2 Mark Thomas 2011-03-15 13:49:39 UTC
The basic patch had a number of issues. The final patch was slightly different. The main change is the cut-off point. For a request to continue processing:
- the request line must have been completed for HTTP requests
- the first packet must have been completed for AJP requests