| Summary: | HttpGenerator produces 'bad chunk char' IOExceptions when unable to fully flush to socket buffer | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [RT] Jetty | Reporter: | James Mace <jmace.sfdc> | ||||||
| Component: | client | Assignee: | Greg Wilkins <gregw> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | major | ||||||||
| Priority: | P3 | CC: | gregw, jetty-inbox | ||||||
| Version: | unspecified | ||||||||
| Target Milestone: | 7.5.x | ||||||||
| Hardware: | All | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
James Mace
Created attachment 206993 [details]
test case exhibiting the problem
Created attachment 206994 [details]
Patch file with proposed changes
Comment on attachment 206994 [details]
Patch file with proposed changes
Patch is for the version of HttpGenerator.java from Jetty 8.0.4.v20111024
James, thanks for this analysis and patch. We are just looking at it in detail at the moment, but will need to change it as we are already in the process of refactoring the HttpGenerator somewhat for 7.6 (which will soon flow through to 8.0) James, Thanks for the thorough analysis, test harness and patch! I've created a new unit test based on your sluggish server test (checked in). For now I have removed the optimisation in the triple buffer flush that copied from the buffer to the header - I think that optimisation violates the contract of that method. Far better to strive to achieve gather writes. I also have not yet looked at detail at the rest of you patch... mostly as I wanted to understand the issue myself (as it was my bad in the first place). I think the 7.6 had partially fixed (or at least changed) the issue, but I did need to add another check for _bypass in prepare buffers. This fix is now committed to master for jetty-7 and it passes your unit test. However, I will now review your full patch and make sure that I understand all your changes and verify that we have them covered in master. thanks again Reviewed patch again and I think we have captured all the goodness with our changes. |