Eclipse Jetty® - Web Container & Clients - supports HTTP/2, HTTP/1.1, HTTP/1.0, websocket, servlets, and more
Go to file
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
.github Minor tweaks to dependabot.yml 2020-11-09 14:40:15 -06:00
LICENSE-CONTRIBUTOR add cla-tbecker.txt 2012-07-17 21:37:33 +02:00
advisories Adding reference to patched versions of jetty-http jars 2015-02-25 16:10:06 -07:00
aggregates Correcting compact3 jar contents to only include org.eclipse.jetty 2020-11-04 13:15:51 -06:00
apache-jsp Updating to version 9.4.35-SNAPSHOT 2020-11-02 09:04:51 -06:00
apache-jstl Updating to version 9.4.35-SNAPSHOT 2020-11-02 09:04:51 -06:00
build-resources Updating to version 9.4.35-SNAPSHOT 2020-11-02 09:04:51 -06:00
examples Updating to version 9.4.35-SNAPSHOT 2020-11-02 09:04:51 -06:00
jetty-alpn Updating to version 9.4.35-SNAPSHOT 2020-11-02 09:04:51 -06:00
jetty-annotations Updating to version 9.4.35-SNAPSHOT 2020-11-02 09:04:51 -06:00
jetty-ant Updating to version 9.4.35-SNAPSHOT 2020-11-02 09:04:51 -06:00
jetty-bom Updating to version 9.4.35-SNAPSHOT 2020-11-02 09:04:51 -06:00
jetty-cdi Updating to version 9.4.35-SNAPSHOT 2020-11-02 09:04:51 -06:00
jetty-client Fixes #5633 - Allow to configure HttpClient request authority. 2020-11-11 17:13:00 +01:00
jetty-continuation Updating to version 9.4.35-SNAPSHOT 2020-11-02 09:04:51 -06:00
jetty-deploy fixing badly formatted XML comments 2020-11-09 23:51:35 +11:00
jetty-distribution Merge remote-tracking branch 'origin/release-9.4.34' into jetty-9.4.x 2020-11-04 10:24:21 -06:00
jetty-documentation Fixes broken link to security reports. Resolves #5642 2020-11-11 14:18:50 -06:00
jetty-fcgi Updating to version 9.4.35-SNAPSHOT 2020-11-02 09:04:51 -06:00
jetty-gcloud Merge pull request #5587 from eclipse/dependabot/maven/jetty-9.4.x/org.apache.felix-maven-bundle-plugin-5.1.1 2020-11-09 15:56:06 -06:00
jetty-hazelcast fix derby version and hazelcast version in mod files 2020-11-10 15:59:29 +10:00
jetty-home fixing badly formatted XML comments 2020-11-09 23:51:35 +11:00
jetty-http Issue #5605 unconsumed input on sendError (#5637) 2020-11-18 10:40:05 +01:00
jetty-http-spi Updating to version 9.4.35-SNAPSHOT 2020-11-02 09:04:51 -06:00
jetty-http2 Fixed test that was failing due to TLS 1.3 backport to Java 8. 2020-11-17 13:39:28 +01:00
jetty-infinispan Merge pull request #5570 from eclipse/dependency/jetty-9.4.x/org.infinispan.protostream-protostream-4.3.4.Final 2020-11-04 13:19:52 -06:00
jetty-io Updating to version 9.4.35-SNAPSHOT 2020-11-02 09:04:51 -06:00
jetty-jaas Issue #5486 PropertyFileLoginModule retains PropertyUserStores (#5518) 2020-11-11 18:21:06 +01:00
jetty-jaspi Issue #5605 unconsumed input on sendError (#5637) 2020-11-18 10:40:05 +01:00
jetty-jmh Fix #5575 SEARCH method (#5576) 2020-11-11 17:48:08 +01:00
jetty-jmx Bump openpojo from 0.8.1 to 0.8.13 (#5609) 2020-11-10 14:27:44 +10:00
jetty-jndi Updating to version 9.4.35-SNAPSHOT 2020-11-02 09:04:51 -06:00
jetty-jspc-maven-plugin Updating to version 9.4.35-SNAPSHOT 2020-11-02 09:04:51 -06:00
jetty-maven-plugin Merge pull request #5629 from eclipse/dependabot/maven/jetty-9.4.x/org.apache.maven.shared-maven-artifact-transfer-0.12.0 2020-11-11 10:35:14 -06:00
jetty-memcached Bump xmemcached from 2.4.5 to 2.4.6 2020-11-09 14:20:37 -06:00
jetty-nosql Updating to version 9.4.35-SNAPSHOT 2020-11-02 09:04:51 -06:00
jetty-openid Issue #5605 unconsumed input on sendError (#5637) 2020-11-18 10:40:05 +01:00
jetty-osgi Issue #5539 - Adding jetty-util-ajax missing dep to osgi tests 2020-11-16 09:10:23 -06:00
jetty-plus fixing badly formatted XML comments 2020-11-09 23:51:35 +11:00
jetty-proxy Updating to version 9.4.35-SNAPSHOT 2020-11-02 09:04:51 -06:00
jetty-quickstart Updating to version 9.4.35-SNAPSHOT 2020-11-02 09:04:51 -06:00
jetty-rewrite fixing badly formatted XML comments 2020-11-09 23:51:35 +11:00
jetty-runner Updating to version 9.4.35-SNAPSHOT 2020-11-02 09:04:51 -06:00
jetty-security Issue #5605 unconsumed input on sendError (#5637) 2020-11-18 10:40:05 +01:00
jetty-server Issue #5605 unconsumed input on sendError (#5637) 2020-11-18 10:40:05 +01:00
jetty-servlet Issue #5539 - Adding StatisticsServlet tests in test-distribution 2020-11-16 12:31:28 -06:00
jetty-servlets Updating to version 9.4.35-SNAPSHOT 2020-11-02 09:04:51 -06:00
jetty-spring fixing badly formatted XML comments 2020-11-09 23:51:35 +11:00
jetty-start Updating to version 9.4.35-SNAPSHOT 2020-11-02 09:04:51 -06:00
jetty-unixsocket Merge remote-tracking branch 'origin/release-9.4.34' into jetty-9.4.x 2020-11-04 10:24:21 -06:00
jetty-util Fix #5562 Improve HTTP Field cache allocation (#5565) 2020-11-12 17:05:32 +01:00
jetty-util-ajax Updating to version 9.4.35-SNAPSHOT 2020-11-02 09:04:51 -06:00
jetty-webapp Fixing bad Container Include Jar pattern. 2020-11-16 09:10:23 -06:00
jetty-websocket Updating to version 9.4.35-SNAPSHOT 2020-11-02 09:04:51 -06:00
jetty-xml Updating to version 9.4.35-SNAPSHOT 2020-11-02 09:04:51 -06:00
logos Adding logos 2016-07-08 08:45:26 -07:00
scripts simplify release script to not call goals already triggered by eclipse-release profile 2020-05-31 09:04:59 +10:00
tests Issue #5605 unconsumed input on sendError (#5637) 2020-11-18 10:40:05 +01:00
.gitattributes Updating attributes 2020-09-25 09:48:38 -05:00
.gitignore Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-9.4.x-3550-QueuedThreadPool-cleanup 2019-04-25 06:53:07 +02:00
CONTRIBUTING.md Testing gpg signature setup 2019-09-25 12:42:32 -05:00
Jenkinsfile fail quickly 2020-11-17 16:33:39 +10:00
Jmh_Jenkinsfile a bit more time to run all jmh tests 2019-07-09 12:56:53 +10:00
KEYS.txt add GPG key and developer tag 2020-11-04 17:25:11 +01:00
LICENSE Correcting header text mentioning EPL 2.0, we are not EPL 2.0 yet, we are still EPL 1.0 2019-04-22 09:51:29 -05:00
NOTICE.txt Update Notice (#4395) 2019-12-17 07:40:19 +11:00
README.md Updating http to https 2019-11-05 16:23:49 -06:00
VERSION.txt Updating to version 9.4.35-SNAPSHOT 2020-11-02 09:04:51 -06:00
header-template-doc.txt Merged branch 'jetty-9.2.x' into 'jetty-9.3.x'. 2020-01-07 16:35:05 +01:00
header-template-java.txt Merged branch 'jetty-9.2.x' into 'jetty-9.3.x'. 2020-01-07 16:35:05 +01:00
pom.xml Merge pull request #5571 from lorban/lorban-gpg-and-devtag 2020-11-10 19:54:36 +01:00

README.md

Eclipse Jetty Canonical Repository

This is the canonical repository for the Jetty project, feel free to fork and contribute now!

Submitting a patch or pull request?

Make sure you have an Eclipse Contributor Agreement (ECA) on file.

Project description

Jetty is a lightweight highly scalable java based web server and servlet engine. Our goal is to support web protocols like HTTP, HTTP/2 and WebSocket in a high volume low latency way that provides maximum performance while retaining the ease of use and compatibility with years of servlet development. Jetty is a modern fully async web server that has a long history as a component oriented technology easily embedded into applications while still offering a solid traditional distribution for webapp deployment.

Documentation

Project documentation is available on the Jetty Eclipse website.

Building

To build, use:

  mvn clean install

The Jetty distribution will be built in jetty-distribution/target/distribution.

The first build may take a longer than expected as Maven downloads all the dependencies.

The build tests do a lot of stress testing, and on some machines it is necessary to set the file descriptor limit to greater than 2048 for the tests to all pass successfully.

It is possible to bypass tests by building with mvn clean install -DskipTests.

Professional Services

Expert advice and production support are available through Webtide.com.