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

Bug 340265

Summary: Handle client half close
Product: [RT] Jetty Reporter: Greg Wilkins <gregw>
Component: serverAssignee: Simone Bordet <simone.bordet>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jetty-inbox
Version: 7.3.1   
Target Milestone: 7.2.x   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
work in progress
none
Work in progress
none
Work in progress none

Description Greg Wilkins CLA 2011-03-16 23:06:58 EDT
If a client does shutdownOutput after sending a request, we should not immediately close but allow the request to be handled and a response sent
Comment 1 Greg Wilkins CLA 2011-03-17 02:41:20 EDT
Created attachment 191379 [details]
work in progress

This is the work in progress.

The "fill" values returned from parse methods has been changed to a progress value: -1 EOF, 0 no progress, >0 progress

The ChannelEndPoint fill will shutdownInput on reading -1 and it is the connections job to do the actual close.

however there are test failures that need to be worked out, so this is only work in progress.
Comment 2 Greg Wilkins CLA 2011-03-21 10:24:16 EDT
Created attachment 191614 [details]
Work in progress

Only 1 test in jetty-server failing now
Comment 3 Greg Wilkins CLA 2011-03-22 08:06:04 EDT
Created attachment 191667 [details]
Work in progress

More tests fixed.

Still a problem with closing SSL connections
Comment 4 Greg Wilkins CLA 2011-03-22 08:08:05 EDT
Simone, If you get time, can you have a look at the latest patch.

The closing of SSL endpoints is still not right. The Perf tests are failing because if Connection:close is specified the connection is closed before all the content is read.  Looking with wireshark, I can see that all the content is sent.
Comment 5 Greg Wilkins CLA 2011-03-24 01:31:33 EDT
This has been fixed, however the code to handle the half close has been duplicated in several Connection#handle methods.  It is desirable to factor that out into common code at sometime in the future.