Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 340265 - Handle client half close
Summary: Handle client half close
Status: RESOLVED FIXED
Alias: None
Product: Jetty
Classification: RT
Component: server (show other bugs)
Version: 7.3.1   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 7.2.x   Edit
Assignee: Simone Bordet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-16 23:06 EDT by Greg Wilkins CLA
Modified: 2011-03-24 01:31 EDT (History)
1 user (show)

See Also:


Attachments
work in progress (29.18 KB, patch)
2011-03-17 02:41 EDT, Greg Wilkins CLA
no flags Details | Diff
Work in progress (41.69 KB, patch)
2011-03-21 10:24 EDT, Greg Wilkins CLA
no flags Details | Diff
Work in progress (46.13 KB, patch)
2011-03-22 08:06 EDT, Greg Wilkins CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.