Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 319655

Summary: POST after HEAD
Product: [RT] Jetty Reporter: Greg Wilkins <gregw>
Component: serverAssignee: Greg Wilkins <gregw>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3 CC: dan, jetty-inbox
Version: 7.1.5   
Target Milestone: 7.1.x   
Hardware: All   
OS: All   
Whiteboard:

Description Greg Wilkins CLA 2010-07-12 22:16:44 EDT
From John Tamplin on list:

I am trying to upgrade the version of Jetty used by GWT to 7.1.5, and I am seeing
some weird failures.

Basically, after sending a HEAD request and getting the response, in the
following POST the browser only gets the headers and no body.  Wireshark never
sees the complete packet, just the header through the double CRNLs.  With 7.0.2,
the complete response is sent in a single packet.  Adding to the weirdness, if
the request goes through the corporate proxy, it works as well, though there are
intervening ACK/FIN and RST/ACK packets, which I assume means the proxy closes
the connection between requests negating the value of connection keep-alive.  If
I comment out the HEAD tests, the exact same POST is sent properly.

Comparing to 7.0.2, I found that AbstractConnector.configure used to always call
setSoTimeout, while 7.1.5 doesn't.  I tried swapping out SelectChannelConnector
for BlockingChannelConnector, which among other things means it always calls
setSoTimeout.  The POST still failed, but it failed fast enough that other tests
succeeded rather than hanging until the entire test run times out.

I don't know if this is a bug in Jetty or in how we are using it, but I thought
before I dig deeper into the async IO code that changed I would ask if this
sounds familiar to anyone.
Comment 1 Greg Wilkins CLA 2010-07-12 22:17:03 EDT
Sounds like HEAD status might not be cleared?
Comment 2 Greg Wilkins CLA 2010-07-13 22:46:39 EDT
The head status was not being cleared on a connection.
Fixed in r2115
Comment 3 Michael Gorovoy CLA 2010-07-29 07:55:29 EDT
*** Bug 320688 has been marked as a duplicate of this bug. ***