jetty.project/tests
Greg Wilkins 14f94f738d
Issue #5605 unconsumed input on sendError (#5637)
* Issue #5605 unconsumed input on sendError

Add Connection:close if content can't be consumed during a sendError. Processed after the request has returned to the container.

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Update from review

 + Add close on all uncommitted requests when content cannot be consumed.

* Update from review

 + fixed comment
 + space comma

* Only consume input in COMPLETE if response is >=200 (ie not an upgrade or similar)

* Updated to be less adventurous

I do not think it was valid to always consumeAll in COMPLETE as this could break upgrades with both 101s and 200s
Instead I have reverted to having this consumeAll logic only:
 + in sendError once control has passed back to the container and we are about to generate an error page.
 + in front of all the sendRedirection that we do without calling the application first.

Extra tests also added

* Updated to be less adventurous

reverted test

* Testcase for odd sendError(400) issue.

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>

* Fix for odd sendError(400) issue.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>

* Testcase for odd sendError(400) issue.

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>

* Always try to consumeAll on all requests

* Refinements after testing in 10

* Refinements after testing in 10

Fixed test

* Fixed comment from review

* Updates from review

+ added redirect methods that consumeAll
+ ensureContentConsumedOrConnectionClose renamed to ensureConsumeAllOrNotPersistent
+ ensureConsumeAllOrNotPersistent now handles HTTP/1.0 and HTTP/1.1 differently

* better consumeAll implementation

* update from review

 + better javadoc
 + filter out keep-alive
 + added more tests

* update from review

 + better javadoc

* update from review

 + fixed form redirection test for http 1.0 and 1.1

* update from review

 + HttpGenerator removes keep-alive if close present
 + Use isRedirection

Co-authored-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
Co-authored-by: Simone Bordet <simone.bordet@gmail.com>
2020-11-18 10:40:05 +01:00
..
test-continuation Updating to version 9.4.35-SNAPSHOT 2020-11-02 09:04:51 -06:00
test-distribution Issue #5539 - Adding StatisticsServlet tests in test-distribution 2020-11-16 12:31:28 -06:00
test-http-client-transport Fixes #5633 - Allow to configure HttpClient request authority. 2020-11-11 17:13:00 +01:00
test-integration Issue #5605 unconsumed input on sendError (#5637) 2020-11-18 10:40:05 +01:00
test-jmx Updating to version 9.4.35-SNAPSHOT 2020-11-02 09:04:51 -06:00
test-loginservice Updating to version 9.4.35-SNAPSHOT 2020-11-02 09:04:51 -06:00
test-quickstart fixing badly formatted XML comments 2020-11-09 23:51:35 +11:00
test-sessions use @Testcontainers to disable test if docker not available (#5678) 2020-11-17 16:20:16 +10:00
test-webapps Bump openwebbeans.version from 2.0.19 to 2.0.20 2020-11-16 14:05:10 +00:00
pom.xml Updating to version 9.4.35-SNAPSHOT 2020-11-02 09:04:51 -06:00