diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 4a8d9801168..d61a2c061cc 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,5 +1,5 @@ blank_issues_enabled: true contact_links: - name: Jetty Security Reports - url: https://www.eclipse.org/jetty/security_reports.php + url: https://eclipse.dev/jetty/security_reports.php about: Please raise security issues here. diff --git a/.github/ISSUE_TEMPLATE/issue-template.md b/.github/ISSUE_TEMPLATE/issue-template.md index d5128ff18d0..4ea70faa974 100644 --- a/.github/ISSUE_TEMPLATE/issue-template.md +++ b/.github/ISSUE_TEMPLATE/issue-template.md @@ -8,14 +8,14 @@ labels: Bug --- **Jetty version(s)** -_[Jetty 9.x is now at End of Community Support](https://github.com/eclipse/jetty.project/issues/7958)_ + **Java version/vendor** `(use: java -version)` **OS type/version** **Description** -_Do not report security issues here! See [Jetty Security Reports](https://www.eclipse.org/jetty/security_reports.php)._ + **How to reproduce?** diff --git a/.github/ISSUE_TEMPLATE/release-template.md b/.github/ISSUE_TEMPLATE/release-template.md index 9e3f87e1afe..feb328263f6 100644 --- a/.github/ISSUE_TEMPLATE/release-template.md +++ b/.github/ISSUE_TEMPLATE/release-template.md @@ -56,7 +56,7 @@ This release process will produce releases: - [ ] Merge release branches back to main branches and delete release branches. - [ ] Verify release existence in Maven Central by triggering the Jenkins builds of CometD. - [ ] Update Jetty versions on the web sites. - + [ ] Update (or check) [Download](https://www.eclipse.org/jetty/download.php) page is updated. + + [ ] Update (or check) [Download](https://eclipse.dev/jetty/download.php) page is updated. + [ ] Update (or check) documentation page(s) are updated. - [ ] Publish GitHub Releases in the order of oldest (eg: 9) to newest (eg: 11) (to ensure that "latest" in github is truly the latest) - [ ] Prepare release announcement for mailing lists. diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 00000000000..faa735b35e4 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,93 @@ +# Community Code of Conduct + +**Version 2.0 +January 1, 2023** + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as community members, contributors, Committers[^1], and Project Leads (collectively "Contributors") pledge to make participation in our projects and our community a harassment-free and inclusive experience for everyone. + +This Community Code of Conduct ("Code") outlines our behavior expectations as members of our community in all Eclipse Foundation activities, both offline and online. It is not intended to govern scenarios or behaviors outside of the scope of Eclipse Foundation activities. Nor is it intended to replace or supersede the protections offered to all our community members under the law. Please follow both the spirit and letter of this Code and encourage other Contributors to follow these principles into our work. Failure to read or acknowledge this Code does not excuse a Contributor from compliance with the Code. + +## Our Standards + +Examples of behavior that contribute to creating a positive and professional environment include: + +- Using welcoming and inclusive language; +- Actively encouraging all voices; +- Helping others bring their perspectives and listening actively. If you find yourself dominating a discussion, it is especially important to encourage other voices to join in; +- Being respectful of differing viewpoints and experiences; +- Gracefully accepting constructive criticism; +- Focusing on what is best for the community; +- Showing empathy towards other community members; +- Being direct but professional; and +- Leading by example by holding yourself and others accountable + +Examples of unacceptable behavior by Contributors include: + +- The use of sexualized language or imagery; +- Unwelcome sexual attention or advances; +- Trolling, insulting/derogatory comments, and personal or political attacks; +- Public or private harassment, repeated harassment; +- Publishing others' private information, such as a physical or electronic address, without explicit permission; +- Violent threats or language directed against another person; +- Sexist, racist, or otherwise discriminatory jokes and language; +- Posting sexually explicit or violent material; +- Sharing private content, such as emails sent privately or non-publicly, or unlogged forums such as IRC channel history; +- Personal insults, especially those using racist or sexist terms; +- Excessive or unnecessary profanity; +- Advocating for, or encouraging, any of the above behavior; and +- Other conduct which could reasonably be considered inappropriate in a professional setting + +## Our Responsibilities + +With the support of the Eclipse Foundation employees, consultants, officers, and directors (collectively, the "Staff"), Committers, and Project Leads, the Eclipse Foundation Conduct Committee (the "Conduct Committee") is responsible for clarifying the standards of acceptable behavior. The Conduct Committee takes appropriate and fair corrective action in response to any instances of unacceptable behavior. + +## Scope + +This Code applies within all Project, Working Group, and Interest Group spaces and communication channels of the Eclipse Foundation (collectively, "Eclipse spaces"), within any Eclipse-organized event or meeting, and in public spaces when an individual is representing an Eclipse Foundation Project, Working Group, Interest Group, or their communities. Examples of representing a Project or community include posting via an official social media account, personal accounts, or acting as an appointed representative at an online or offline event. Representation of Projects, Working Groups, and Interest Groups may be further defined and clarified by Committers, Project Leads, or the Staff. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the Conduct Committee via conduct@eclipse-foundation.org. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. Without the explicit consent of the reporter, the Conduct Committee is obligated to maintain confidentiality with regard to the reporter of an incident. The Conduct Committee is further obligated to ensure that the respondent is provided with sufficient information about the complaint to reply. If such details cannot be provided while maintaining confidentiality, the Conduct Committee will take the respondent‘s inability to provide a defense into account in its deliberations and decisions. Further details of enforcement guidelines may be posted separately. + +Staff, Committers and Project Leads have the right to report, remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code, or to block temporarily or permanently any Contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. Any such actions will be reported to the Conduct Committee for transparency and record keeping. + +Any Staff (including officers and directors of the Eclipse Foundation), Committers, Project Leads, or Conduct Committee members who are the subject of a complaint to the Conduct Committee will be recused from the process of resolving any such complaint. + +## Responsibility + +The responsibility for administering this Code rests with the Conduct Committee, with oversight by the Executive Director and the Board of Directors. For additional information on the Conduct Committee and its process, please write to . + +## Investigation of Potential Code Violations + +All conflict is not bad as a healthy debate may sometimes be necessary to push us to do our best. It is, however, unacceptable to be disrespectful or offensive, or violate this Code. If you see someone engaging in objectionable behavior violating this Code, we encourage you to address the behavior directly with those involved. If for some reason, you are unable to resolve the matter or feel uncomfortable doing so, or if the behavior is threatening or harassing, please report it following the procedure laid out below. + +Reports should be directed to . It is the Conduct Committee’s role to receive and address reported violations of this Code and to ensure a fair and speedy resolution. + +The Eclipse Foundation takes all reports of potential Code violations seriously and is committed to confidentiality and a full investigation of all allegations. The identity of the reporter will be omitted from the details of the report supplied to the accused. Contributors who are being investigated for a potential Code violation will have an opportunity to be heard prior to any final determination. Those found to have violated the Code can seek reconsideration of the violation and disciplinary action decisions. Every effort will be made to have all matters disposed of within 60 days of the receipt of the complaint. + +## Actions +Contributors who do not follow this Code in good faith may face temporary or permanent repercussions as determined by the Conduct Committee. + +This Code does not address all conduct. It works in conjunction with our [Communication Channel Guidelines](https://www.eclipse.org/org/documents/communication-channel-guidelines/), [Social Media Guidelines](https://www.eclipse.org/org/documents/social_media_guidelines.php), [Bylaws](https://www.eclipse.org/org/documents/eclipse-foundation-be-bylaws-en.pdf), and [Internal Rules](https://www.eclipse.org/org/documents/ef-be-internal-rules.pdf) which set out additional protections for, and obligations of, all contributors. The Foundation has additional policies that provide further guidance on other matters. + +It’s impossible to spell out every possible scenario that might be deemed a violation of this Code. Instead, we rely on one another’s good judgment to uphold a high standard of integrity within all Eclipse Spaces. Sometimes, identifying the right thing to do isn’t an easy call. In such a scenario, raise the issue as early as possible. + +## No Retaliation + +The Eclipse community relies upon and values the help of Contributors who identify potential problems that may need to be addressed within an Eclipse Space. Any retaliation against a Contributor who raises an issue honestly is a violation of this Code. That a Contributor has raised a concern honestly or participated in an investigation, cannot be the basis for any adverse action, including threats, harassment, or discrimination. If you work with someone who has raised a concern or provided information in an investigation, you should continue to treat the person with courtesy and respect. If you believe someone has retaliated against you, report the matter as described by this Code. Honest reporting does not mean that you have to be right when you raise a concern; you just have to believe that the information you are providing is accurate. + +False reporting, especially when intended to retaliate or exclude, is itself a violation of this Code and will not be accepted or tolerated. + +Everyone is encouraged to ask questions about this Code. Your feedback is welcome, and you will get a response within three business days. Write to . + +## Amendments + +The Eclipse Foundation Board of Directors may amend this Code from time to time and may vary the procedures it sets out where appropriate in a particular case. + +### Attribution + +This Code was inspired by the [Contributor Covenant](https://www.contributor-covenant.org/), version 1.4, available [here](https://www.contributor-covenant.org/version/1/4/code-of-conduct/). + +[^1]: Capitalized terms used herein without definition shall have the meanings assigned to them in the Bylaws. \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ef6433b76c8..38f9fb35645 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -14,7 +14,7 @@ Developer resources -------------------- Information regarding source code management, builds, coding standards, and more. -- [https://www.eclipse.org/jetty/documentation/current/advanced-contributing.html](https://www.eclipse.org/jetty/documentation/current/advanced-contributing.html) +- [https://eclipse.dev/jetty/documentation/](https://eclipse.dev/jetty/documentation/) The canonical Jetty git repository is located at [GitHub.](https://github.com/eclipse/jetty.project) Providing you have completed the contributors agreement mentioned below we will endeavor to pull your commit into Jetty proper. diff --git a/NOTICE.txt b/NOTICE.txt index 0d3e49d75d4..49000f73ac3 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -2,7 +2,7 @@ Notices for Eclipse Jetty ========================= This content is produced and maintained by the Eclipse Jetty project. -Project home: https://www.eclipse.org/jetty/ +Project home: https://eclipse.dev/jetty/ Trademarks ---------- diff --git a/README.md b/README.md index 323920584e6..425fd311c70 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ Documentation Project documentation is available on the Jetty Eclipse website. -- [https://www.eclipse.org/jetty/documentation](https://www.eclipse.org/jetty/documentation) +- [https://eclipse.dev/jetty/documentation/](https://eclipse.dev/jetty/documentation/) Building ======== diff --git a/SECURITY.md b/SECURITY.md index e1a5537c733..b94bf5f07ce 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -2,7 +2,7 @@ ## Supported Versions -All [stable versions](https://www.eclipse.org/jetty/download.php) of jetty are actively supported for security issues. [Deprecated versions](https://www.eclipse.org/jetty/download.php) may be supported for serious security issues or on a commercial support basis. +All [stable versions](https://eclipse.dev/jetty/download.php) of jetty are actively supported for security issues. [Deprecated versions](https://eclipse.dev/jetty/download.php) may be supported for serious security issues or on a commercial support basis. ## Reporting a Vulnerability @@ -10,7 +10,7 @@ Do not open a public issue to report a security vulnerability. Please send a me ## Handling a Vulnerability -The [following checklist](https://www.eclipse.org/jetty/security_processes.php) is used to handle security issues: +The [following checklist](https://eclipse.dev/jetty/security_processes.php) is used to handle security issues: - [ ] On receipt of a security report via security@webtide.com or other channels, if it cannot be trivially dismissed (already fixed, known not a problem, etc.), then a Github security advisory is created by project leadership. - [ ] Copy this list as a markdown in the security advisory for tracking the completion of various tasks. diff --git a/apache-jsp/src/main/config/modules/apache-jsp.mod b/apache-jsp/src/main/config/modules/apache-jsp.mod index 00e801cd81f..250476f91dd 100644 --- a/apache-jsp/src/main/config/modules/apache-jsp.mod +++ b/apache-jsp/src/main/config/modules/apache-jsp.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Enables use of the apache implementation of JSP. diff --git a/apache-jstl/src/main/config/modules/apache-jstl.mod b/apache-jstl/src/main/config/modules/apache-jstl.mod index de94202bebe..e013cb939bc 100644 --- a/apache-jstl/src/main/config/modules/apache-jstl.mod +++ b/apache-jstl/src/main/config/modules/apache-jstl.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Enables the apache version of JSTL for all webapps. diff --git a/build-resources/pom.xml b/build-resources/pom.xml index 48e0ccdffc6..5c96418eee7 100644 --- a/build-resources/pom.xml +++ b/build-resources/pom.xml @@ -17,7 +17,7 @@ 3.0.0-M2 3.4.0 3.1.0 - 3.1.0 + 3.1.2 true true diff --git a/demos/demo-async-rest/demo-async-rest-webapp/src/main/config/modules/demo-async-rest.mod b/demos/demo-async-rest/demo-async-rest-webapp/src/main/config/modules/demo-async-rest.mod index 7f98f8d366f..7491518c0ea 100644 --- a/demos/demo-async-rest/demo-async-rest-webapp/src/main/config/modules/demo-async-rest.mod +++ b/demos/demo-async-rest/demo-async-rest-webapp/src/main/config/modules/demo-async-rest.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Demo Async Rest webapp diff --git a/demos/demo-async-rest/demo-async-rest-webapp/src/main/webapp/index.html b/demos/demo-async-rest/demo-async-rest-webapp/src/main/webapp/index.html index 8709d30af63..f68a8e7bf5e 100644 --- a/demos/demo-async-rest/demo-async-rest-webapp/src/main/webapp/index.html +++ b/demos/demo-async-rest/demo-async-rest-webapp/src/main/webapp/index.html @@ -10,8 +10,8 @@ diff --git a/demos/demo-jaas-webapp/src/main/config/modules/demo-jaas.mod b/demos/demo-jaas-webapp/src/main/config/modules/demo-jaas.mod index 8c97d60007c..4323ea43b3e 100644 --- a/demos/demo-jaas-webapp/src/main/config/modules/demo-jaas.mod +++ b/demos/demo-jaas-webapp/src/main/config/modules/demo-jaas.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Demo Spec webapp diff --git a/demos/demo-jaas-webapp/src/main/webapp/index.html b/demos/demo-jaas-webapp/src/main/webapp/index.html index 618ea060a4d..c87f04cfce1 100644 --- a/demos/demo-jaas-webapp/src/main/webapp/index.html +++ b/demos/demo-jaas-webapp/src/main/webapp/index.html @@ -10,8 +10,8 @@ @@ -21,7 +21,7 @@

JAAS Demo

- This is a demo webapp for the Eclipse Jetty HTTP Server and Servlet Container. It was added into your $JETTY_BASE/webapps directory. + This is a demo webapp for the Eclipse Jetty HTTP Server and Servlet Container. It was added into your $JETTY_BASE/webapps directory. It uses a simple login module that stores its configuration in a properties file.

diff --git a/demos/demo-jaas-webapp/src/main/webapp/login.html b/demos/demo-jaas-webapp/src/main/webapp/login.html index 4161619f0b6..3e82c524c08 100644 --- a/demos/demo-jaas-webapp/src/main/webapp/login.html +++ b/demos/demo-jaas-webapp/src/main/webapp/login.html @@ -7,8 +7,8 @@
diff --git a/demos/demo-jetty-webapp/src/main/config/modules/demo-jetty.mod b/demos/demo-jetty-webapp/src/main/config/modules/demo-jetty.mod index 6c07d6f5a22..8970cd282c9 100644 --- a/demos/demo-jetty-webapp/src/main/config/modules/demo-jetty.mod +++ b/demos/demo-jetty-webapp/src/main/config/modules/demo-jetty.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Demo Jetty Webapp diff --git a/demos/demo-jetty-webapp/src/main/config/modules/demo-moved-context.mod b/demos/demo-jetty-webapp/src/main/config/modules/demo-moved-context.mod index d697f8a28df..1bc88f7449d 100644 --- a/demos/demo-jetty-webapp/src/main/config/modules/demo-moved-context.mod +++ b/demos/demo-jetty-webapp/src/main/config/modules/demo-moved-context.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Demonstrate a Moved Context Handler. diff --git a/demos/demo-jetty-webapp/src/main/config/modules/demo-rewrite.mod b/demos/demo-jetty-webapp/src/main/config/modules/demo-rewrite.mod index 8fcf581d4db..e2becc8eb72 100644 --- a/demos/demo-jetty-webapp/src/main/config/modules/demo-rewrite.mod +++ b/demos/demo-jetty-webapp/src/main/config/modules/demo-rewrite.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Demonstrate the rewrite module. diff --git a/demos/demo-jetty-webapp/src/main/webapp/auth.html b/demos/demo-jetty-webapp/src/main/webapp/auth.html index 53260a6bc52..41ce0be6abe 100644 --- a/demos/demo-jetty-webapp/src/main/webapp/auth.html +++ b/demos/demo-jetty-webapp/src/main/webapp/auth.html @@ -10,8 +10,8 @@ diff --git a/demos/demo-jetty-webapp/src/main/webapp/index.html b/demos/demo-jetty-webapp/src/main/webapp/index.html index 048d953cf2e..867aa0ea525 100644 --- a/demos/demo-jetty-webapp/src/main/webapp/index.html +++ b/demos/demo-jetty-webapp/src/main/webapp/index.html @@ -9,8 +9,8 @@ @@ -20,7 +20,7 @@

Eclipse Jetty Demo Webapp

- This is a demo webapp for the Eclipse Jetty HTTP Server and Servlet Container. It was added into your $JETTY_BASE/webapps directory. + This is a demo webapp for the Eclipse Jetty HTTP Server and Servlet Container. It was added into your $JETTY_BASE/webapps directory.

Jetty Tests:

diff --git a/demos/demo-jetty-webapp/src/main/webapp/remote.html b/demos/demo-jetty-webapp/src/main/webapp/remote.html index 89812e4009b..01e10cd5a61 100644 --- a/demos/demo-jetty-webapp/src/main/webapp/remote.html +++ b/demos/demo-jetty-webapp/src/main/webapp/remote.html @@ -9,8 +9,8 @@ diff --git a/demos/demo-jetty-webapp/src/main/webapp/rewrite/info.html b/demos/demo-jetty-webapp/src/main/webapp/rewrite/info.html index cbf2053518a..652ae854d19 100644 --- a/demos/demo-jetty-webapp/src/main/webapp/rewrite/info.html +++ b/demos/demo-jetty-webapp/src/main/webapp/rewrite/info.html @@ -10,8 +10,8 @@ diff --git a/demos/demo-jndi-webapp/src/main/config/modules/demo-jndi.mod b/demos/demo-jndi-webapp/src/main/config/modules/demo-jndi.mod index 197277d328a..7a140f91820 100644 --- a/demos/demo-jndi-webapp/src/main/config/modules/demo-jndi.mod +++ b/demos/demo-jndi-webapp/src/main/config/modules/demo-jndi.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Demo JNDI Resources Webapp diff --git a/demos/demo-jndi-webapp/src/main/webapp/index.html b/demos/demo-jndi-webapp/src/main/webapp/index.html index b50583b49d9..77d4dfed398 100644 --- a/demos/demo-jndi-webapp/src/main/webapp/index.html +++ b/demos/demo-jndi-webapp/src/main/webapp/index.html @@ -9,8 +9,8 @@ @@ -20,7 +20,7 @@

Eclipse Jetty JNDI Demo Webapp

- This is a demo webapp for the Eclipse Jetty HTTP Server and Servlet Container. It was added into your $JETTY_BASE/webapps directory. + This is a demo webapp for the Eclipse Jetty HTTP Server and Servlet Container. It was added into your $JETTY_BASE/webapps directory.

diff --git a/demos/demo-jsp-webapp/src/main/webapp/index.jsp b/demos/demo-jsp-webapp/src/main/webapp/index.jsp index e7ae6e8e2d8..f9cd990602a 100644 --- a/demos/demo-jsp-webapp/src/main/webapp/index.jsp +++ b/demos/demo-jsp-webapp/src/main/webapp/index.jsp @@ -11,8 +11,8 @@

@@ -22,7 +22,7 @@

Eclipse Jetty JSP Demo Webapp

- This is a demo webapp for the Eclipse Jetty HTTP Server and Servlet Container. It was added into your $JETTY_BASE/webapps directory. + This is a demo webapp for the Eclipse Jetty HTTP Server and Servlet Container. It was added into your $JETTY_BASE/webapps directory.

JSP Examples on <%= DateTimeFormatter.ofPattern("d MMMM yyyy").format(LocalDate.now()) %>

diff --git a/demos/demo-mock-resources/src/main/config/modules/demo-mock-resources.mod b/demos/demo-mock-resources/src/main/config/modules/demo-mock-resources.mod index dd8faf6d661..0107bbea2a6 100644 --- a/demos/demo-mock-resources/src/main/config/modules/demo-mock-resources.mod +++ b/demos/demo-mock-resources/src/main/config/modules/demo-mock-resources.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Download and install some Demo Mock Resources diff --git a/demos/demo-proxy-webapp/src/main/config/modules/demo-proxy.mod b/demos/demo-proxy-webapp/src/main/config/modules/demo-proxy.mod index 4f96bd24eed..133964a24f1 100644 --- a/demos/demo-proxy-webapp/src/main/config/modules/demo-proxy.mod +++ b/demos/demo-proxy-webapp/src/main/config/modules/demo-proxy.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Demo Proxy Webapp diff --git a/demos/demo-proxy-webapp/src/main/webapp/WEB-INF/web.xml b/demos/demo-proxy-webapp/src/main/webapp/WEB-INF/web.xml index 419ca72c27f..53410f36a0d 100644 --- a/demos/demo-proxy-webapp/src/main/webapp/WEB-INF/web.xml +++ b/demos/demo-proxy-webapp/src/main/webapp/WEB-INF/web.xml @@ -13,7 +13,7 @@ org.eclipse.jetty.proxy.ProxyServlet$Transparent proxyTo - https://www.eclipse.org/jetty/javadoc/jetty-10/index.html?overview-summary.html + https://eclipse.dev/jetty/javadoc/jetty-10/index.html?overview-summary.html hostHeader diff --git a/demos/demo-spec/demo-spec-webapp/src/main/config/modules/demo-spec.mod b/demos/demo-spec/demo-spec-webapp/src/main/config/modules/demo-spec.mod index 7ffb9d23f8d..eb0c6cb8175 100644 --- a/demos/demo-spec/demo-spec-webapp/src/main/config/modules/demo-spec.mod +++ b/demos/demo-spec/demo-spec-webapp/src/main/config/modules/demo-spec.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Download and deploy the Test Spec webapp demo. diff --git a/demos/demo-spec/demo-spec-webapp/src/main/webapp/index.html b/demos/demo-spec/demo-spec-webapp/src/main/webapp/index.html index bc13b4b5389..ffa24a8976a 100644 --- a/demos/demo-spec/demo-spec-webapp/src/main/webapp/index.html +++ b/demos/demo-spec/demo-spec-webapp/src/main/webapp/index.html @@ -9,8 +9,8 @@ diff --git a/demos/demo-template/src/main/resources/index.html b/demos/demo-template/src/main/resources/index.html index cf08af07220..7ebe375fcd6 100644 --- a/demos/demo-template/src/main/resources/index.html +++ b/demos/demo-template/src/main/resources/index.html @@ -11,8 +11,8 @@ Demo Home Source - Jetty Project Home - Documentation + Jetty Project Home + Documentation Commercial Support
diff --git a/demos/embedded/src/main/resources/demo/webdefault.xml b/demos/embedded/src/main/resources/demo/webdefault.xml index a52ecc2152b..baf76b19b28 100644 --- a/demos/embedded/src/main/resources/demo/webdefault.xml +++ b/demos/embedded/src/main/resources/demo/webdefault.xml @@ -195,7 +195,7 @@ - + diff --git a/documentation/jetty-documentation/pom.xml b/documentation/jetty-documentation/pom.xml index 402520841af..cfb38991b1d 100644 --- a/documentation/jetty-documentation/pom.xml +++ b/documentation/jetty-documentation/pom.xml @@ -72,7 +72,7 @@ ${project.version} ../programming-guide/index.html ../operations-guide/index.html - https://www.eclipse.org/jetty/javadoc/jetty-10 + https://eclipse.dev/jetty/javadoc/jetty-10 diff --git a/documentation/jetty-documentation/src/main/asciidoc/contribution-guide/3-source.adoc b/documentation/jetty-documentation/src/main/asciidoc/contribution-guide/3-source.adoc index c0e195bad39..73bc97f0dcb 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/contribution-guide/3-source.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/contribution-guide/3-source.adoc @@ -26,12 +26,13 @@ The https://github.com/eclipse/jetty.project[Eclipse Jetty project] is located a .Active Eclipse Jetty Branches [cols="4"] |=== -| https://github.com/eclipse/jetty.project/tree/jetty-10.0.x[jetty-11.0.x] | Development | Servlet 5.0 | Java 11+ +| https://github.com/eclipse/jetty.project/tree/jetty-12.0.x[jetty-12.0.x] | Development | Servlet 6.0 | Java 17+ +| https://github.com/eclipse/jetty.project/tree/jetty-11.0.x[jetty-11.0.x] | Development | Servlet 5.0 | Java 11+ | https://github.com/eclipse/jetty.project/tree/jetty-10.0.x[jetty-10.0.x] | Development (default branch) | Servlet 4.0 | Java 11+ -| https://github.com/eclipse/jetty.project/tree/jetty-9.4.x[jetty-9.4.x] | Maintenance | Servlet 3.1 | Java 8 -| https://github.com/eclipse/jetty.project/tree/jetty-9.3.x[jetty-9.3.x] | Maintenance | Servlet 3.0 | Java 8 -| https://github.com/eclipse/jetty.project/tree/jetty-8.1.x[jetty-8.1.x] | Historical | Servlet 2.0 | Java 7 -| https://github.com/eclipse/jetty.project/tree/jetty-7[jetty-7] | Mythical | Servlet 1.0 | Java 6 +| https://github.com/eclipse/jetty.project/tree/jetty-9.4.x[jetty-9.4.x] | End of Community Support | Servlet 3.1 | Java 8 +| https://github.com/eclipse/jetty.project/tree/jetty-9.3.x[jetty-9.3.x] | End of Life | Servlet 3.1 | Java 8 +| jetty-8 | Historical | Servlet 3.1 | Java 6 +| jetty-7 | Mythical | Servlet 2.5 | Java 5 |=== If you are planning on working with a specific issue within Jetty it is important to target the correct branch for a pull request. Pull requests that are targeted at Maintenance Branches are typically merged forward into subsequent branches while historical branches are left alone merge wise. Depending on the nature of an issue a historical branch may have an issue cherrypicked forward, but maintenance releases are merged wholesale forward as a matter of project policy. @@ -52,8 +53,6 @@ Administrative pom.xml file:: https://github.com/eclipse/jetty.parent Build related artifacts that release separately, common assembly descriptors, remote resources, etc.:: https://github.com/eclipse/jetty.toolchain -Files associated with the development of Jetty -- code styles, formatting, iplogs, etc.:: - http://git.eclipse.org/c/jetty/org.eclipse.jetty.admin.git [[cg-contributing-build]] === Maven Build @@ -88,17 +87,15 @@ ____ Jetty uses number of conventions for its source code. The developers of Jetty use a variety of tooling and editors when developing Jetty so standards and conventions are important! -==== Intelli-J +==== IntelliJ IDE -The suggested configuration for Intelli-J when working with Jetty is available here: http://git.eclipse.org/c/jetty/org.eclipse.jetty.admin.git/tree/idea-jetty-codestyle-settings.jar[Intelli-J Codestyle] +The suggested configuration for the IntelliJ IDE when working with Jetty is available in the code tree +`/build-resources/jetty-codestyle-intellij.xml` -==== Eclipse +==== Eclipse IDE -The Eclipse format configuration can be found here: -http://git.eclipse.org/c/jetty/org.eclipse.jetty.admin.git/tree/jetty-eclipse-java-format.xml[Eclipse Java Formatting] - -There are also some templates available for Eclipse here: -http://git.eclipse.org/c/jetty/org.eclipse.jetty.admin.git/tree/jetty-eclipse-codetemplates.xml[Eclipse Code Templates] +The Eclipse IDE format can be found in the code tree +`/build-resources/jetty-codestyle-eclipse-ide.xml` ==== Code Conventions diff --git a/documentation/jetty-documentation/src/main/asciidoc/old_docs/annotations/using-annotations-embedded.adoc b/documentation/jetty-documentation/src/main/asciidoc/old_docs/annotations/using-annotations-embedded.adoc index 5014d539e96..657f5b2cf78 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/old_docs/annotations/using-annotations-embedded.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/old_docs/annotations/using-annotations-embedded.adoc @@ -17,7 +17,7 @@ ==== Setting up the Classpath You will need to place the following Jetty jar files onto the classpath of your application. -You can obtain them from the https://www.eclipse.org/jetty/download.html[Jetty distribution], or the https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-annotations[Maven repository]: +You can obtain them from the https://eclipse.dev/jetty/download.html[Jetty distribution], or the https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-annotations[Maven repository]: .... jetty-plus.jar diff --git a/documentation/jetty-documentation/src/main/asciidoc/old_docs/ant/jetty-ant.adoc b/documentation/jetty-documentation/src/main/asciidoc/old_docs/ant/jetty-ant.adoc index 83febf840f7..9b30e9f6a30 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/old_docs/ant/jetty-ant.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/old_docs/ant/jetty-ant.adoc @@ -32,7 +32,7 @@ Its purpose is to provide almost the same functionality as the Jetty plugin for To set up your project for Ant to run Jetty, you need a Jetty distribution and the jetty-ant Jar: -1. https://www.eclipse.org/jetty/download.html[Download] a Jetty distribution and unpack it in the local filesystem. +1. https://eclipse.dev/jetty/download.php[Download] a Jetty distribution and unpack it in the local filesystem. 2. https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-ant/[Get] the jetty-ant Jar. 3. Make a directory in your project called `jetty-lib/`. 4. Copy all of the Jars in your Jetty distribution's `lib` directory, and all its subdirectories, into your new `jetty-lib` dir. diff --git a/documentation/jetty-documentation/src/main/asciidoc/old_docs/contributing/releasing-jetty.adoc b/documentation/jetty-documentation/src/main/asciidoc/old_docs/contributing/releasing-jetty.adoc index fd3cec0e0ef..8509ef4588f 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/old_docs/contributing/releasing-jetty.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/old_docs/contributing/releasing-jetty.adoc @@ -246,7 +246,7 @@ Make sure you follow the other examples and include the `rel="nofollow"` attribu ____ [NOTE] -There is a separate Jenkins build job that publishes documentation to https://www.eclipse.org/jetty/documentation/current triggered by a push of changed files to the jetty-documentation project. +There is a separate Jenkins build job that publishes documentation to https://eclipse.dev/jetty/documentation/ triggered by a push of changed files to the jetty-documentation project. If you commit your change to the number from step 2, then these builds will use the same release version number. It is preferable if you _don't_ commit that version number change, or better yet, ensure that it is set to the next -SNAPSHOT version number for your jetty major release number. ____ diff --git a/documentation/jetty-documentation/src/main/asciidoc/old_docs/deploying/deployment-architecture.adoc b/documentation/jetty-documentation/src/main/asciidoc/old_docs/deploying/deployment-architecture.adoc index 1830828fef7..6b0a29c18e3 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/old_docs/deploying/deployment-architecture.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/old_docs/deploying/deployment-architecture.adoc @@ -69,7 +69,7 @@ A fifth, non-standard binding, called link:{JDURL}/org/eclipse/jetty/deploy/bind ===== Using GlobalWebappConfigBinding -In addition to the LifeCycle bindings discussed above, there is also the link:https://www.eclipse.org/jetty/javadoc/current/org/eclipse/jetty/deploy/bindings/GlobalWebappConfigBinding.html[`GlobalWebappConfigBinding`] which, when added to the `DeploymentManager` will apply an additional configuration XML file to each webapp that it deploys. +In addition to the LifeCycle bindings discussed above, there is also the `GlobalWebappConfigBinding` which, when added to the `DeploymentManager` will apply an additional configuration XML file to each webapp that it deploys. This can useful when setting server or system classes, or when defining link:#override-web-xml[override descriptors.] This configuration XML file will be _in addition to_ any context XML file that exists for the webapp; it will be applied _after_ any context XML files but _before_ the webapp is started. The format for the XML file is the same as any context XML file and can be used to same parameters for a webapp. diff --git a/documentation/jetty-documentation/src/main/asciidoc/old_docs/frameworks/osgi.adoc b/documentation/jetty-documentation/src/main/asciidoc/old_docs/frameworks/osgi.adoc index c22f0f77da4..ee19f98c8ad 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/old_docs/frameworks/osgi.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/old_docs/frameworks/osgi.adoc @@ -24,7 +24,7 @@ In addition, the infrastructure also supports the OSGi `HttpService` interface. All of the Jetty jars contain manifest entries appropriate to ensure that they can be deployed into an OSGi container as bundles. You will need to install some jetty jars into your OSGi container. -You can always find the Jetty jars either in the Maven Central repository, or you can link:https://www.eclipse.org/jetty/download.html[download] a distribution of Jetty. +You can always find the Jetty jars either in the Maven Central repository, or you can link:https://eclipse.dev/jetty/download.php[download] a distribution of Jetty. Here's the absolute minimal set of Jetty jars: .Minimal Bundles diff --git a/documentation/jetty-documentation/src/main/asciidoc/old_docs/gettingstarted/getting-started/jetty-installing.adoc b/documentation/jetty-documentation/src/main/asciidoc/old_docs/gettingstarted/getting-started/jetty-installing.adoc index d1878f16fc4..3a1ffc34bc4 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/old_docs/gettingstarted/getting-started/jetty-installing.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/old_docs/gettingstarted/getting-started/jetty-installing.adoc @@ -19,7 +19,7 @@ The standalone Jetty distribution is available for download from the Eclipse Foundation: ____ *Jetty* -https://www.eclipse.org/jetty/download.html +https://eclipse.dev/jetty/download.php ____ It is available in both zip and gzip formats; download the one most appropriate for your system. diff --git a/documentation/jetty-documentation/src/main/asciidoc/old_docs/gettingstarted/getting-started/jetty-running.adoc b/documentation/jetty-documentation/src/main/asciidoc/old_docs/gettingstarted/getting-started/jetty-running.adoc index f7cc89df329..c67eb93d231 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/old_docs/gettingstarted/getting-started/jetty-running.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/old_docs/gettingstarted/getting-started/jetty-running.adoc @@ -24,7 +24,7 @@ To start Jetty on the default port of 8080, run the following command: ---- $ java -jar start.jar 2017-09-20 15:45:11.986:INFO::main: Logging initialized @683ms to org.eclipse.jetty.util.log.StdErrLog -2017-09-20 15:45:12.197:WARN:oejs.HomeBaseWarning:main: This instance of Jetty is not running from a separate {jetty.base} directory, this is not recommended. See documentation at https://www.eclipse.org/jetty/documentation/current/startup.html +2017-09-20 15:45:12.197:WARN:oejs.HomeBaseWarning:main: This instance of Jetty is not running from a separate {jetty.base} directory, this is not recommended. See documentation at https://eclipse.dev/jetty/documentation/ 2017-09-20 15:45:12.243:INFO:oejs.Server:main: {VERSION} 2017-09-20 15:45:12.266:INFO:oejdp.ScanningAppProvider:main: Deployment monitor [file:///installs/repository/jetty/webapps/] at interval 1 2017-09-20 15:45:12.298:INFO:oejs.AbstractConnector:main: Started ServerConnector@39c0f4a{HTTP/1.1,[http/1.1]}{0.0.0.0:8080} diff --git a/documentation/jetty-documentation/src/main/asciidoc/old_docs/images/modules-9.3-simplified.dot b/documentation/jetty-documentation/src/main/asciidoc/old_docs/images/modules-9.3-simplified.dot index dfa40ef487b..ba0ed540609 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/old_docs/images/modules-9.3-simplified.dot +++ b/documentation/jetty-documentation/src/main/asciidoc/old_docs/images/modules-9.3-simplified.dot @@ -1,7 +1,7 @@ /* * GraphViz Graph of Jetty Modules * - * Jetty: https://eclipse.org/jetty/ + * Jetty: https://eclipse.dev/jetty/ * GraphViz: http://graphviz.org/ * * To Generate Graph image using graphviz: diff --git a/documentation/jetty-documentation/src/main/asciidoc/old_docs/platforms/chapter.adoc b/documentation/jetty-documentation/src/main/asciidoc/old_docs/platforms/chapter.adoc index 5c0aae9af27..68b0a7b9c4f 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/old_docs/platforms/chapter.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/old_docs/platforms/chapter.adoc @@ -20,7 +20,7 @@ In addition to using Jetty in its distribution form and its multiple embedded fo Many products and open source projects out there distribute Jetty themselves, in both distribution and embedded forms, not to mention different operating systems bundling Jetty in other installable forms. If your platform supports Jetty from a distribution or deployment perspective and want to be included on this list just fork the documentation and submit a pull request, or contact us. -Check out our list of http://www.eclipse.org/jetty/powered[Powered By] page for software that makes use of Jetty, often in novel and exciting ways. +Check out our list of https://eclipse.dev/jetty/powered[Powered By] page for software that makes use of Jetty, often in novel and exciting ways. include::jelastic.adoc[] include::cloudfoundry.adoc[] diff --git a/documentation/jetty-documentation/src/main/asciidoc/old_docs/runner/jetty-runner.adoc b/documentation/jetty-documentation/src/main/asciidoc/old_docs/runner/jetty-runner.adoc index ec5a3a0b7e0..e02f90ef572 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/old_docs/runner/jetty-runner.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/old_docs/runner/jetty-runner.adoc @@ -69,7 +69,7 @@ The default Configuration Classes are: `org.eclipse.jetty.plus.webapp.PlusConfiguration` `org.eclipse.jetty.annotations.AnnotationConfiguration` -You can learn more about implementing specific Configuration Classes link:https://www.eclipse.org/jetty/documentation/current/configuring-webapps.html#webapp-configurations[here.] +You can learn more about implementing specific Configuration Classes link:https://eclipse.dev/jetty/documentation/[in the Jetty documentation.] ==== Deploying Multiple Contexts @@ -249,7 +249,7 @@ Here's an example of configuring a single extra classes dir: ____ [NOTE] When using the `--jar` and/or `--lib` arguments, by default these will *not* be inspected for `META-INF` information such as `META-INF/resources`, `META-INF/web-fragment.xml`, or `META-INF/taglib.tld`. -If you require these jar files inspected you will need to define the link:https://www.eclipse.org/jetty/documentation/current/configuring-webapps.html#webapp-context-attributes[jar pattern in your context xml file]. +If you require these jar files inspected you will need to define the jar pattern in your context xml file. Jetty-Runner automatically provides and appends a suitable pattern for jtsl taglibs (this pattern is different than the one in the standard Jetty distribution). ____ diff --git a/documentation/jetty-documentation/src/main/asciidoc/old_docs/security/jaas-support.adoc b/documentation/jetty-documentation/src/main/asciidoc/old_docs/security/jaas-support.adoc index e53648156eb..a50084ccfa6 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/old_docs/security/jaas-support.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/old_docs/security/jaas-support.adoc @@ -406,4 +406,4 @@ public class FooLoginModule extends AbstractLoginModule An example webapp using JAAS can be found in the Jetty GitHub repository: -* link:{GITBROWSEURL}/tests/test-webapps/test-jaas-webapp[https://github.com/eclipse/jetty.project/tree/jetty-9.4.x/tests/test-webapps/test-jaas-webapp] +* link:{GITBROWSEURL}/tests/test-webapps/test-jaas-webapp[https://github.com/eclipse/jetty.project/tree/jetty-10.0.x/tests/test-webapps/test-jaas-webapp] diff --git a/documentation/jetty-documentation/src/main/asciidoc/old_docs/troubleshooting/security-reports.adoc b/documentation/jetty-documentation/src/main/asciidoc/old_docs/troubleshooting/security-reports.adoc index cbfa1491cad..f801eec6226 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/old_docs/troubleshooting/security-reports.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/old_docs/troubleshooting/security-reports.adoc @@ -16,7 +16,7 @@ ==== List of Security Reports -A current list of Jetty security reports can be viewed on the link:https://www.eclipse.org/jetty/security-reports.html[Project Home Page.] +A current list of Jetty security reports can be viewed on the link:https://eclipse.dev/jetty/security-reports.php[Project Home Page.] ==== Reporting Security Issues diff --git a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/begin/download.adoc b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/begin/download.adoc index 0c4632055e1..2813089b862 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/begin/download.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/begin/download.adoc @@ -14,7 +14,7 @@ [[og-begin-download]] ==== Downloading Jetty -The Eclipse Jetty distribution is available for download from link:https://www.eclipse.org/jetty/download.html[] +The Eclipse Jetty distribution is available for download from link:https://eclipse.dev/jetty/download.php[] The Eclipse Jetty distribution is available in both `zip` and `gzip` formats; download the one most appropriate for your system, typically `zip` for Windows and `gzip` for other operating systems. diff --git a/documentation/jetty-documentation/src/main/asciidoc/programming-guide/client/http/client-http-api.adoc b/documentation/jetty-documentation/src/main/asciidoc/programming-guide/client/http/client-http-api.adoc index 6a2e2412dfc..459b666b866 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/programming-guide/client/http/client-http-api.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/programming-guide/client/http/client-http-api.adoc @@ -48,6 +48,9 @@ include::../../{doc_code}/org/eclipse/jetty/docs/programming/client/http/HTTPCli You first create a request object using `httpClient.newRequest(...)`, and then you customize it using the fluent API style (that is, a chained invocation of methods on the request object). When the request object is customized, you call `request.send()` that produces the `ContentResponse` when the request/response conversation is complete. +IMPORTANT: The `Request` object, despite being mutable, cannot be reused for other requests. +This is true also when trying to send two or more identical requests: you have to create two or more `Request` objects. + Simple `POST` requests also have a shortcut method: [source,java,indent=0] diff --git a/jetty-annotations/src/main/config/modules/annotations.mod b/jetty-annotations/src/main/config/modules/annotations.mod index ec6a976386d..6eff9560159 100644 --- a/jetty-annotations/src/main/config/modules/annotations.mod +++ b/jetty-annotations/src/main/config/modules/annotations.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Enables Annotation scanning for deployed web applications. diff --git a/jetty-cdi/src/main/config/modules/cdi-decorate.mod b/jetty-cdi/src/main/config/modules/cdi-decorate.mod index f222fa0fbaf..00eb26adcba 100644 --- a/jetty-cdi/src/main/config/modules/cdi-decorate.mod +++ b/jetty-cdi/src/main/config/modules/cdi-decorate.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Configures Jetty to use the "CdiDecoratingListener" as the default CDI mode. diff --git a/jetty-cdi/src/main/config/modules/cdi-spi.mod b/jetty-cdi/src/main/config/modules/cdi-spi.mod index c608e93e653..a82b2a98cb3 100644 --- a/jetty-cdi/src/main/config/modules/cdi-spi.mod +++ b/jetty-cdi/src/main/config/modules/cdi-spi.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Configures Jetty to use the "CdiSpiDecorator" as the default CDI mode. diff --git a/jetty-cdi/src/main/config/modules/cdi.mod b/jetty-cdi/src/main/config/modules/cdi.mod index be52496c5b6..26fc9dfe23a 100644 --- a/jetty-cdi/src/main/config/modules/cdi.mod +++ b/jetty-cdi/src/main/config/modules/cdi.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Provides integration of CDI within webapp to Jetty container object lifecycles. diff --git a/jetty-client/src/main/config/modules/client.mod b/jetty-client/src/main/config/modules/client.mod index 5687ff94fd3..1287200826d 100644 --- a/jetty-client/src/main/config/modules/client.mod +++ b/jetty-client/src/main/config/modules/client.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Adds the Jetty HTTP client to the server classpath. diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/ProxyConfiguration.java b/jetty-client/src/main/java/org/eclipse/jetty/client/ProxyConfiguration.java index b80d6265725..ca66deec62e 100644 --- a/jetty-client/src/main/java/org/eclipse/jetty/client/ProxyConfiguration.java +++ b/jetty-client/src/main/java/org/eclipse/jetty/client/ProxyConfiguration.java @@ -41,10 +41,18 @@ public class ProxyConfiguration private final List proxies = new BlockingArrayQueue<>(); /** + *

Returns the list of proxies added to this configuration.

+ *

This method is deprecated because it has historically been + * used to add/remove proxies directly to/from the returned list, + * but this has now been replaced by {@link #addProxy(Proxy)} and + * {@link #removeProxy(Proxy)} instead.

+ *

In the future, this method will return an unmodifiable + * list of proxies just for querying purposes.

+ * * @deprecated use {@link #addProxy(Proxy)} and {@link #removeProxy(Proxy)} instead * @return the forward proxies to use */ - @Deprecated(forRemoval = true) + @Deprecated public List getProxies() { return proxies; diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/api/Request.java b/jetty-client/src/main/java/org/eclipse/jetty/client/api/Request.java index f3457897ee9..e2919eb86b8 100644 --- a/jetty-client/src/main/java/org/eclipse/jetty/client/api/Request.java +++ b/jetty-client/src/main/java/org/eclipse/jetty/client/api/Request.java @@ -43,6 +43,8 @@ import org.eclipse.jetty.util.Fields; *

You can create {@link Request} objects via {@link HttpClient#newRequest(String)} and * you can send them using either {@link #send()} for a blocking semantic, or * {@link #send(Response.CompleteListener)} for an asynchronous semantic.

+ *

{@link Request} objects cannot be reused for other requests, not even for requests + * that have identical URI and headers.

* * @see Response */ diff --git a/jetty-deploy/src/main/config/modules/decorate.mod b/jetty-deploy/src/main/config/modules/decorate.mod index 3315ed0cbd3..942266b5606 100644 --- a/jetty-deploy/src/main/config/modules/decorate.mod +++ b/jetty-deploy/src/main/config/modules/decorate.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Jetty setup to support Decoration of Listeners, Filters and Servlets within a deployed webapp. diff --git a/jetty-deploy/src/main/config/modules/global-webapp-common.mod b/jetty-deploy/src/main/config/modules/global-webapp-common.mod index d28cd1194ad..bd66293a021 100644 --- a/jetty-deploy/src/main/config/modules/global-webapp-common.mod +++ b/jetty-deploy/src/main/config/modules/global-webapp-common.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Enables Deployer to apply common configuration to all webapp deployments. diff --git a/jetty-deploy/src/test/resources/jetty.xml b/jetty-deploy/src/test/resources/jetty.xml index e9a5398ca24..73a091bcc02 100644 --- a/jetty-deploy/src/test/resources/jetty.xml +++ b/jetty-deploy/src/test/resources/jetty.xml @@ -3,7 +3,7 @@ - + diff --git a/jetty-fcgi/fcgi-server/src/main/config/modules/fcgi.mod b/jetty-fcgi/fcgi-server/src/main/config/modules/fcgi.mod index dba696e2634..dac869f3591 100644 --- a/jetty-fcgi/fcgi-server/src/main/config/modules/fcgi.mod +++ b/jetty-fcgi/fcgi-server/src/main/config/modules/fcgi.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Adds the FastCGI implementation to the classpath. @@ -13,4 +13,4 @@ lib/fcgi/*.jar [ini-template] ## For configuration of FastCGI contexts, see -## https://www.eclipse.org/jetty/documentation/current/fastcgi.html +## https://eclipse.dev/jetty/documentation/ diff --git a/jetty-gcloud/jetty-gcloud-session-manager/src/main/config-template/modules/gcloud-datastore.mod b/jetty-gcloud/jetty-gcloud-session-manager/src/main/config-template/modules/gcloud-datastore.mod index 3106d070039..e14b772ff0d 100644 --- a/jetty-gcloud/jetty-gcloud-session-manager/src/main/config-template/modules/gcloud-datastore.mod +++ b/jetty-gcloud/jetty-gcloud-session-manager/src/main/config-template/modules/gcloud-datastore.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Enables GCloud Datastore API and implementation. diff --git a/jetty-gcloud/jetty-gcloud-session-manager/src/main/config-template/modules/gcloud.mod b/jetty-gcloud/jetty-gcloud-session-manager/src/main/config-template/modules/gcloud.mod index ff7e68aee28..2dc51d64d74 100644 --- a/jetty-gcloud/jetty-gcloud-session-manager/src/main/config-template/modules/gcloud.mod +++ b/jetty-gcloud/jetty-gcloud-session-manager/src/main/config-template/modules/gcloud.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Controls GCloud API classpath. diff --git a/jetty-gcloud/jetty-gcloud-session-manager/src/main/config-template/modules/session-store-gcloud.mod b/jetty-gcloud/jetty-gcloud-session-manager/src/main/config-template/modules/session-store-gcloud.mod index 90856809b16..949f6ba1eb2 100644 --- a/jetty-gcloud/jetty-gcloud-session-manager/src/main/config-template/modules/session-store-gcloud.mod +++ b/jetty-gcloud/jetty-gcloud-session-manager/src/main/config-template/modules/session-store-gcloud.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Enables GCloudDatastore session management. diff --git a/jetty-hazelcast/src/main/config/modules/session-store-hazelcast-embedded.mod b/jetty-hazelcast/src/main/config/modules/session-store-hazelcast-embedded.mod index 3e65e85df24..ec33e8c390e 100644 --- a/jetty-hazelcast/src/main/config/modules/session-store-hazelcast-embedded.mod +++ b/jetty-hazelcast/src/main/config/modules/session-store-hazelcast-embedded.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Enables session data store in an embedded Hazelcast Map. diff --git a/jetty-hazelcast/src/main/config/modules/session-store-hazelcast-remote.mod b/jetty-hazelcast/src/main/config/modules/session-store-hazelcast-remote.mod index 7842d1a1dbb..6223f681883 100644 --- a/jetty-hazelcast/src/main/config/modules/session-store-hazelcast-remote.mod +++ b/jetty-hazelcast/src/main/config/modules/session-store-hazelcast-remote.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Enables session data store in a remote Hazelcast Map. diff --git a/jetty-home/src/main/resources/NOTICE.txt b/jetty-home/src/main/resources/NOTICE.txt index 361c3a0915b..ee70c29a02f 100644 --- a/jetty-home/src/main/resources/NOTICE.txt +++ b/jetty-home/src/main/resources/NOTICE.txt @@ -2,7 +2,7 @@ Notices for Eclipse Jetty ========================= This content is produced and maintained by the Eclipse Jetty project. -Project home: https://www.eclipse.org/jetty/ +Project home: https://eclipse.dev/jetty/ Trademarks ---------- diff --git a/jetty-home/src/main/resources/README.adoc b/jetty-home/src/main/resources/README.adoc index a2d0bfee48f..af5739c576d 100644 --- a/jetty-home/src/main/resources/README.adoc +++ b/jetty-home/src/main/resources/README.adoc @@ -1,6 +1,6 @@ === ECLIPSE JETTY -The link:https://www.eclipse.org/jetty/[Eclipse Jetty] Project provides a: +The link:https://eclipse.dev/jetty/[Eclipse Jetty] Project provides a: * Java HTTP & WebSocket Server * Servlet Container @@ -8,7 +8,7 @@ The link:https://www.eclipse.org/jetty/[Eclipse Jetty] Project provides a: Jetty is available under an open source link:LICENSE.txt[LICENSE], and the full source code is available at link:https://github.com/eclipse/jetty.project[GitHub]. -The Jetty documentation is available at link:https://www.eclipse.org/jetty/documentation[]. +The Jetty documentation is available at link:https://eclipse.dev/jetty/documentation/[]. // tag::quick[] ==== Quick Setup @@ -46,7 +46,7 @@ Point your browser at `+http://localhost:8080+` to see the demo web applications The Jetty server can be stopped with `ctrl+c` in the terminal window. // end::quick[] -For more information about how to start Jetty, run this command (or go to the link:https://www.eclipse.org/jetty/documentation[documentation]): +For more information about how to start Jetty, run this command (or go to the link:https://eclipse.dev/jetty/documentation/[documentation]): ---- $ java -jar $JETTY_HOME/start.jar --help diff --git a/jetty-home/src/main/resources/modules/demo-realm.mod b/jetty-home/src/main/resources/modules/demo-realm.mod index 7751bf5206e..81923851854 100644 --- a/jetty-home/src/main/resources/modules/demo-realm.mod +++ b/jetty-home/src/main/resources/modules/demo-realm.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Configure a demo authentication realm. diff --git a/jetty-home/src/main/resources/modules/demo-root.mod b/jetty-home/src/main/resources/modules/demo-root.mod index c1a10cbede1..1428a88cafd 100644 --- a/jetty-home/src/main/resources/modules/demo-root.mod +++ b/jetty-home/src/main/resources/modules/demo-root.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Demo root webapp. diff --git a/jetty-home/src/main/resources/modules/demo.d/root/index.html b/jetty-home/src/main/resources/modules/demo.d/root/index.html index 683baf412f8..28b06d176e8 100644 --- a/jetty-home/src/main/resources/modules/demo.d/root/index.html +++ b/jetty-home/src/main/resources/modules/demo.d/root/index.html @@ -23,7 +23,7 @@ Websocket and HTTP/2 protocols. The project is 100% Open Source and hosted by the - Eclipse Foundation at https://www.eclipse.org/jetty/. + Eclipse Foundation at https://eclipse.dev/jetty/.

@@ -45,10 +45,10 @@

information

    -
  • Jetty Homepage
  • -
  • Jetty Documentation Hub
  • +
  • Jetty Homepage
  • +
  • Jetty Documentation Hub
  • Javadoc (via transparent proxy)
  • -
  • Jetty Powered
  • +
  • Jetty Powered
  • Optional content found only in
    jetty-home-<ver>-with-docs.zip
    • Jetty Documentation
    • @@ -60,7 +60,7 @@

      getting help

        -
      • Mailing lists @ eclipse
      • +
      • Mailing lists @ eclipse
      • Source @ github
      • Developer Advice
      • Custom Development
      • diff --git a/jetty-home/src/main/resources/modules/demo.mod b/jetty-home/src/main/resources/modules/demo.mod index 5d422f5438d..a2a57c37b41 100644 --- a/jetty-home/src/main/resources/modules/demo.mod +++ b/jetty-home/src/main/resources/modules/demo.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] A meta module to enable all demo modules. diff --git a/jetty-home/src/main/resources/modules/hawtio.mod b/jetty-home/src/main/resources/modules/hawtio.mod index b4dd2a8fcd0..f6d44408ea9 100644 --- a/jetty-home/src/main/resources/modules/hawtio.mod +++ b/jetty-home/src/main/resources/modules/hawtio.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Deploys the Hawtio console as a web application. diff --git a/jetty-home/src/main/resources/modules/jamon.mod b/jetty-home/src/main/resources/modules/jamon.mod index 109410a2e8b..36c10f1e681 100644 --- a/jetty-home/src/main/resources/modules/jamon.mod +++ b/jetty-home/src/main/resources/modules/jamon.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Deploys the JAMon web application. diff --git a/jetty-home/src/main/resources/modules/jolokia.mod b/jetty-home/src/main/resources/modules/jolokia.mod index fe428211d01..c4220458ff0 100644 --- a/jetty-home/src/main/resources/modules/jolokia.mod +++ b/jetty-home/src/main/resources/modules/jolokia.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Deploys the Jolokia console as a web application. diff --git a/jetty-home/src/main/resources/modules/jsp.mod b/jetty-home/src/main/resources/modules/jsp.mod index 938697731d4..a9cfe3d02ee 100644 --- a/jetty-home/src/main/resources/modules/jsp.mod +++ b/jetty-home/src/main/resources/modules/jsp.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Enables JSP for all web applications deployed on the server. diff --git a/jetty-home/src/main/resources/modules/jstl.mod b/jetty-home/src/main/resources/modules/jstl.mod index 32ab7cf3275..bcd802ecbf0 100644 --- a/jetty-home/src/main/resources/modules/jstl.mod +++ b/jetty-home/src/main/resources/modules/jstl.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Enables JSTL for all web applications deployed on the server. diff --git a/jetty-home/src/main/resources/modules/logging-jcl-capture.mod b/jetty-home/src/main/resources/modules/logging-jcl-capture.mod index 9b77b4d5c66..5ef75a8d856 100644 --- a/jetty-home/src/main/resources/modules/logging-jcl-capture.mod +++ b/jetty-home/src/main/resources/modules/logging-jcl-capture.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Captures jakarta-commons-logging events and bridges them to SLF4J. diff --git a/jetty-home/src/main/resources/modules/logging-jetty.mod b/jetty-home/src/main/resources/modules/logging-jetty.mod index b0a623c4834..e6aa3e3a631 100644 --- a/jetty-home/src/main/resources/modules/logging-jetty.mod +++ b/jetty-home/src/main/resources/modules/logging-jetty.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Base configuration for the jetty logging mechanism. diff --git a/jetty-home/src/main/resources/modules/logging-jul-capture.mod b/jetty-home/src/main/resources/modules/logging-jul-capture.mod index 3243dc0923b..efd6103d94f 100644 --- a/jetty-home/src/main/resources/modules/logging-jul-capture.mod +++ b/jetty-home/src/main/resources/modules/logging-jul-capture.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Captures java.util.logging events and bridges them to slf4j. diff --git a/jetty-home/src/main/resources/modules/logging-jul.mod b/jetty-home/src/main/resources/modules/logging-jul.mod index 2097219c226..87e950b25ce 100644 --- a/jetty-home/src/main/resources/modules/logging-jul.mod +++ b/jetty-home/src/main/resources/modules/logging-jul.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Configures jetty logging to use Java Util Logging (jul). diff --git a/jetty-home/src/main/resources/modules/logging-log4j1-capture.mod b/jetty-home/src/main/resources/modules/logging-log4j1-capture.mod index 182c365984c..9e1ca062248 100644 --- a/jetty-home/src/main/resources/modules/logging-log4j1-capture.mod +++ b/jetty-home/src/main/resources/modules/logging-log4j1-capture.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Captures Apache log4j events and bridges them to SLF4J. diff --git a/jetty-home/src/main/resources/modules/logging-log4j1.mod b/jetty-home/src/main/resources/modules/logging-log4j1.mod index 848b66b3fb4..653e33eb93c 100644 --- a/jetty-home/src/main/resources/modules/logging-log4j1.mod +++ b/jetty-home/src/main/resources/modules/logging-log4j1.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Configures Jetty logging to use Log4j. diff --git a/jetty-home/src/main/resources/modules/logging-log4j2.mod b/jetty-home/src/main/resources/modules/logging-log4j2.mod index 505095f5a66..2fed6c18a4d 100644 --- a/jetty-home/src/main/resources/modules/logging-log4j2.mod +++ b/jetty-home/src/main/resources/modules/logging-log4j2.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Configures Jetty logging to use log4j version 2. diff --git a/jetty-home/src/main/resources/modules/logging-logback.mod b/jetty-home/src/main/resources/modules/logging-logback.mod index ffba31c4c0b..40538f43ac0 100644 --- a/jetty-home/src/main/resources/modules/logging-logback.mod +++ b/jetty-home/src/main/resources/modules/logging-logback.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Configures Jetty logging to use Logback Logging. diff --git a/jetty-home/src/main/resources/modules/logging-noop.mod b/jetty-home/src/main/resources/modules/logging-noop.mod index 6f146768a94..ef1c7ff6f2c 100644 --- a/jetty-home/src/main/resources/modules/logging-noop.mod +++ b/jetty-home/src/main/resources/modules/logging-noop.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Configures Jetty logging to use SLF4J No-Op Implementation. diff --git a/jetty-home/src/main/resources/modules/logging/slf4j.mod b/jetty-home/src/main/resources/modules/logging/slf4j.mod index 861dd9e3b13..4ebb74a2a87 100644 --- a/jetty-home/src/main/resources/modules/logging/slf4j.mod +++ b/jetty-home/src/main/resources/modules/logging/slf4j.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Configures logging to use SLF4J. diff --git a/jetty-home/src/main/resources/modules/setuid.mod b/jetty-home/src/main/resources/modules/setuid.mod index 4278f82f4eb..977cbb81869 100644 --- a/jetty-home/src/main/resources/modules/setuid.mod +++ b/jetty-home/src/main/resources/modules/setuid.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Enables the UNIX setUID configuration. diff --git a/jetty-home/src/main/resources/modules/stop.mod b/jetty-home/src/main/resources/modules/stop.mod index b9407b6347c..6b18509cd18 100644 --- a/jetty-home/src/main/resources/modules/stop.mod +++ b/jetty-home/src/main/resources/modules/stop.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] This module causes Jetty to stop immediately after starting. diff --git a/jetty-http2/http2-common/src/main/java/org/eclipse/jetty/http2/parser/HeaderParser.java b/jetty-http2/http2-common/src/main/java/org/eclipse/jetty/http2/parser/HeaderParser.java index 407652bbca6..05d0278b458 100644 --- a/jetty-http2/http2-common/src/main/java/org/eclipse/jetty/http2/parser/HeaderParser.java +++ b/jetty-http2/http2-common/src/main/java/org/eclipse/jetty/http2/parser/HeaderParser.java @@ -15,6 +15,7 @@ package org.eclipse.jetty.http2.parser; import java.nio.ByteBuffer; +import org.eclipse.jetty.http2.Flags; import org.eclipse.jetty.http2.frames.Frame; import org.eclipse.jetty.http2.frames.FrameType; @@ -140,11 +141,31 @@ public class HeaderParser return type; } + /** + *

        Returns whether the given header {@link Flags flag} is present.

        + * + * @param bit the flag to test for presence + * @return whether the flag is present + */ public boolean hasFlag(int bit) { return (flags & bit) == bit; } + /** + *

        Returns the raw value of the header flag bits.

        + *

        Use {@link #hasFlag(int)} to test for flag presence. + * This method should be used just to retrieve the raw value + * of all the flag bits.

        + * + * @return the raw value of the headers flag bits + * @see #hasFlag(int) + */ + public int getFlags() + { + return flags; + } + public int getStreamId() { return streamId; diff --git a/jetty-jaas/src/main/config/modules/jaas.mod b/jetty-jaas/src/main/config/modules/jaas.mod index 9816e7b487c..935f7543d16 100644 --- a/jetty-jaas/src/main/config/modules/jaas.mod +++ b/jetty-jaas/src/main/config/modules/jaas.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Enables JAAS for deployed web applications. diff --git a/jetty-jaspi/src/main/config/modules/jaspi-default-auth-config-factory.mod b/jetty-jaspi/src/main/config/modules/jaspi-default-auth-config-factory.mod index 70913c907be..1735ccf4125 100644 --- a/jetty-jaspi/src/main/config/modules/jaspi-default-auth-config-factory.mod +++ b/jetty-jaspi/src/main/config/modules/jaspi-default-auth-config-factory.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Provides a DefaultAuthConfigFactory for jaspi diff --git a/jetty-jaspi/src/main/config/modules/jaspi-demo.mod b/jetty-jaspi/src/main/config/modules/jaspi-demo.mod index b0e7fd303e4..df8c0c790d7 100644 --- a/jetty-jaspi/src/main/config/modules/jaspi-demo.mod +++ b/jetty-jaspi/src/main/config/modules/jaspi-demo.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Enables JASPI basic authentication the /test context path. diff --git a/jetty-jaspi/src/main/config/modules/jaspi.mod b/jetty-jaspi/src/main/config/modules/jaspi.mod index 76b2e81406e..2d98933f4ed 100644 --- a/jetty-jaspi/src/main/config/modules/jaspi.mod +++ b/jetty-jaspi/src/main/config/modules/jaspi.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Enables JASPI authentication for deployed web applications. diff --git a/jetty-jndi/src/main/config/modules/jndi.mod b/jetty-jndi/src/main/config/modules/jndi.mod index efa8d7ff318..a01fd6c48b7 100644 --- a/jetty-jndi/src/main/config/modules/jndi.mod +++ b/jetty-jndi/src/main/config/modules/jndi.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Adds the Jetty JNDI implementation to the classpath. diff --git a/jetty-jspc-maven-plugin/src/main/java/org/eclipse/jetty/jspc/plugin/JspcMojo.java b/jetty-jspc-maven-plugin/src/main/java/org/eclipse/jetty/jspc/plugin/JspcMojo.java index 988109044ed..4cb95b84dd4 100644 --- a/jetty-jspc-maven-plugin/src/main/java/org/eclipse/jetty/jspc/plugin/JspcMojo.java +++ b/jetty-jspc-maven-plugin/src/main/java/org/eclipse/jetty/jspc/plugin/JspcMojo.java @@ -59,9 +59,8 @@ import org.eclipse.jetty.util.resource.Resource; * Note that the same java compiler will be used as for on-the-fly compiled * jsps, which will be the Eclipse java compiler. *

        - * See Usage - * Guide for instructions on using this plugin. + * See Usage Guide for + * instructions on using this plugin. *

        * Runs jspc compiler to produce .java and .class files */ diff --git a/jetty-jspc-maven-plugin/src/site/site.xml b/jetty-jspc-maven-plugin/src/site/site.xml index d37c6e5f9dc..61830c6eb29 100644 --- a/jetty-jspc-maven-plugin/src/site/site.xml +++ b/jetty-jspc-maven-plugin/src/site/site.xml @@ -6,8 +6,8 @@ ${project.name} - https://www.eclipse.org/jetty/images/jetty-logo-80x22.png - https://eclipse.org/jetty/ + https://eclipse.dev/jetty/images/jetty-logo-80x22.png + https://eclipse.dev/jetty/ https://www.eclipse.org/eclipse.org-common/themes/solstice/public/images/logo/eclipse-426x100.png diff --git a/jetty-maven-plugin/src/it/jetty-start-distro-mojo-it/jetty-simple-webapp/src/base/modules/testmod.mod b/jetty-maven-plugin/src/it/jetty-start-distro-mojo-it/jetty-simple-webapp/src/base/modules/testmod.mod index 83d7fc98732..c924c3cf938 100644 --- a/jetty-maven-plugin/src/it/jetty-start-distro-mojo-it/jetty-simple-webapp/src/base/modules/testmod.mod +++ b/jetty-maven-plugin/src/it/jetty-start-distro-mojo-it/jetty-simple-webapp/src/base/modules/testmod.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Enables test setup diff --git a/jetty-maven-plugin/src/it/jetty-start-war-distro-mojo-it/jetty-simple-webapp/src/base/modules/testmod.mod b/jetty-maven-plugin/src/it/jetty-start-war-distro-mojo-it/jetty-simple-webapp/src/base/modules/testmod.mod index f88fe0a7f5d..4ba3cbda79e 100644 --- a/jetty-maven-plugin/src/it/jetty-start-war-distro-mojo-it/jetty-simple-webapp/src/base/modules/testmod.mod +++ b/jetty-maven-plugin/src/it/jetty-start-war-distro-mojo-it/jetty-simple-webapp/src/base/modules/testmod.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Enables test setup diff --git a/jetty-maven-plugin/src/main/resources/maven.mod b/jetty-maven-plugin/src/main/resources/maven.mod index 8cefce820c2..21fd399d164 100644 --- a/jetty-maven-plugin/src/main/resources/maven.mod +++ b/jetty-maven-plugin/src/main/resources/maven.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Enables an un-assembled Maven webapp to run in a Jetty distribution. diff --git a/jetty-maven-plugin/src/site/site.xml b/jetty-maven-plugin/src/site/site.xml index d37c6e5f9dc..61830c6eb29 100644 --- a/jetty-maven-plugin/src/site/site.xml +++ b/jetty-maven-plugin/src/site/site.xml @@ -6,8 +6,8 @@ ${project.name} - https://www.eclipse.org/jetty/images/jetty-logo-80x22.png - https://eclipse.org/jetty/ + https://eclipse.dev/jetty/images/jetty-logo-80x22.png + https://eclipse.dev/jetty/ https://www.eclipse.org/eclipse.org-common/themes/solstice/public/images/logo/eclipse-426x100.png diff --git a/jetty-memcached/jetty-memcached-sessions/src/main/config/modules/sessions/session-data-cache/xmemcached.mod b/jetty-memcached/jetty-memcached-sessions/src/main/config/modules/sessions/session-data-cache/xmemcached.mod index b55223b4c4d..8f12f871e2c 100644 --- a/jetty-memcached/jetty-memcached-sessions/src/main/config/modules/sessions/session-data-cache/xmemcached.mod +++ b/jetty-memcached/jetty-memcached-sessions/src/main/config/modules/sessions/session-data-cache/xmemcached.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Memcache cache for SessionData. diff --git a/jetty-nosql/src/main/config/modules/session-store-mongo.mod b/jetty-nosql/src/main/config/modules/session-store-mongo.mod index 89150dd08b0..1f74348c7e0 100644 --- a/jetty-nosql/src/main/config/modules/session-store-mongo.mod +++ b/jetty-nosql/src/main/config/modules/session-store-mongo.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Enables NoSql session management with a MongoDB driver. diff --git a/jetty-nosql/src/main/config/modules/sessions/mongo/address.mod b/jetty-nosql/src/main/config/modules/sessions/mongo/address.mod index 4ba49715eaf..3467a0f55cb 100644 --- a/jetty-nosql/src/main/config/modules/sessions/mongo/address.mod +++ b/jetty-nosql/src/main/config/modules/sessions/mongo/address.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Server/port connections for Mongo session storage. diff --git a/jetty-nosql/src/main/config/modules/sessions/mongo/uri.mod b/jetty-nosql/src/main/config/modules/sessions/mongo/uri.mod index 220d33c4a8b..2e8732c8401 100644 --- a/jetty-nosql/src/main/config/modules/sessions/mongo/uri.mod +++ b/jetty-nosql/src/main/config/modules/sessions/mongo/uri.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] MongoURI connections for Mongo session storage diff --git a/jetty-openid/src/main/config/modules/openid.mod b/jetty-openid/src/main/config/modules/openid.mod index 4c4cbc18c29..8ddc75891e9 100644 --- a/jetty-openid/src/main/config/modules/openid.mod +++ b/jetty-openid/src/main/config/modules/openid.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Adds OpenId Connect authentication to the server. diff --git a/jetty-osgi/jetty-osgi-boot/jettyhome/etc/jetty.xml b/jetty-osgi/jetty-osgi-boot/jettyhome/etc/jetty.xml index 122a49a2a60..eb89fb21f7e 100644 --- a/jetty-osgi/jetty-osgi-boot/jettyhome/etc/jetty.xml +++ b/jetty-osgi/jetty-osgi-boot/jettyhome/etc/jetty.xml @@ -6,7 +6,7 @@ - + diff --git a/jetty-osgi/pom.xml b/jetty-osgi/pom.xml index 6c0f61f7f98..3bb2c732cf1 100644 --- a/jetty-osgi/pom.xml +++ b/jetty-osgi/pom.xml @@ -12,7 +12,7 @@ pom - 3.18.300 + 3.18.400 3.11.100 1.6.1 1.5.0 diff --git a/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty.xml b/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty.xml index 1d10384859c..32eb6404275 100644 --- a/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty.xml +++ b/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty.xml @@ -6,7 +6,7 @@ - + diff --git a/jetty-p2/pom.xml b/jetty-p2/pom.xml index 509b2bdf7aa..ee8f7a22fbb 100644 --- a/jetty-p2/pom.xml +++ b/jetty-p2/pom.xml @@ -12,7 +12,7 @@ Generates a (maven based) P2 Updatesite pom - 3.0.4 + 4.0.0 diff --git a/jetty-proxy/src/main/config/modules/proxy.mod b/jetty-proxy/src/main/config/modules/proxy.mod index 0ed819cecc9..2ec86960023 100644 --- a/jetty-proxy/src/main/config/modules/proxy.mod +++ b/jetty-proxy/src/main/config/modules/proxy.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Enables the Jetty Proxy service. diff --git a/jetty-proxy/src/test/java/org/eclipse/jetty/proxy/AsyncMiddleManServletTest.java b/jetty-proxy/src/test/java/org/eclipse/jetty/proxy/AsyncMiddleManServletTest.java index ffe2bf51ecc..26451325b25 100644 --- a/jetty-proxy/src/test/java/org/eclipse/jetty/proxy/AsyncMiddleManServletTest.java +++ b/jetty-proxy/src/test/java/org/eclipse/jetty/proxy/AsyncMiddleManServletTest.java @@ -13,6 +13,7 @@ package org.eclipse.jetty.proxy; +import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; @@ -35,11 +36,15 @@ import java.util.List; import java.util.Map; import java.util.Random; import java.util.concurrent.CountDownLatch; +import java.util.concurrent.ThreadLocalRandom; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import java.util.concurrent.atomic.AtomicBoolean; import java.util.zip.GZIPInputStream; import java.util.zip.GZIPOutputStream; +import java.util.zip.ZipEntry; +import java.util.zip.ZipInputStream; +import java.util.zip.ZipOutputStream; import javax.servlet.ServletException; import javax.servlet.ServletInputStream; import javax.servlet.ServletOutputStream; @@ -1551,6 +1556,82 @@ public class AsyncMiddleManServletTest assertTrue(response.getHeaders().contains(PROXIED_HEADER)); } + @Test + public void testDownstreamTransformationZipped() throws Exception + { + byte[] content1 = new byte[1024 * 1024]; + ThreadLocalRandom.current().nextBytes(content1); + byte[] content2 = new byte[512 * 1024]; + ThreadLocalRandom.current().nextBytes(content2); + + startServer(new HttpServlet() + { + @Override + protected void service(HttpServletRequest request, HttpServletResponse response) throws IOException + { + response.setHeader(HttpHeader.CONTENT_ENCODING.asString(), "deflate"); + ZipOutputStream zipOut = new ZipOutputStream(response.getOutputStream()); + zipOut.putNextEntry(new ZipEntry("server-file1.rnd")); + zipOut.write(content1); + zipOut.closeEntry(); + zipOut.putNextEntry(new ZipEntry("server-file2.rnd")); + zipOut.write(content2); + zipOut.closeEntry(); + zipOut.finish(); + } + }); + startProxy(new AsyncMiddleManServlet() + { + @Override + protected ContentTransformer newServerResponseContentTransformer(HttpServletRequest clientRequest, HttpServletResponse proxyResponse, Response serverResponse) + { + return new AfterContentTransformer() + { + @Override + public boolean transform(Source source, Sink sink) throws IOException + { + // Un-zip and re-zip. + + ZipInputStream zipIn = new ZipInputStream(source.getInputStream()); + ZipOutputStream zipOut = new ZipOutputStream(sink.getOutputStream()); + + ZipEntry zipEntry; + while ((zipEntry = zipIn.getNextEntry()) != null) + { + zipOut.putNextEntry(zipEntry); + IO.copy(zipIn, zipOut); + zipOut.closeEntry(); + } + + zipOut.finish(); + + return true; + } + }; + } + }); + startClient(); + + ContentResponse response = client.newRequest("localhost", serverConnector.getLocalPort()) + .timeout(5, TimeUnit.SECONDS) + .send(); + + assertEquals(200, response.getStatus()); + + ZipInputStream zipIn = new ZipInputStream(new ByteArrayInputStream(response.getContent())); + ZipEntry zipEntry1 = zipIn.getNextEntry(); + assertNotNull(zipEntry1); + ByteArrayOutputStream out1 = new ByteArrayOutputStream(); + IO.copy(zipIn, out1); + assertArrayEquals(content1, out1.toByteArray()); + ZipEntry zipEntry2 = zipIn.getNextEntry(); + assertNotNull(zipEntry2); + ByteArrayOutputStream out2 = new ByteArrayOutputStream(); + IO.copy(zipIn, out2); + assertArrayEquals(content2, out2.toByteArray()); + assertNull(zipIn.getNextEntry()); + } + private void sleep(long delay) { try diff --git a/jetty-quickstart/src/main/config/modules/quickstart.mod b/jetty-quickstart/src/main/config/modules/quickstart.mod index 9487d69e384..744cc12b370 100644 --- a/jetty-quickstart/src/main/config/modules/quickstart.mod +++ b/jetty-quickstart/src/main/config/modules/quickstart.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Enables the Jetty Quickstart module for rapid deployment of preconfigured web applications. diff --git a/jetty-rewrite/src/main/config/modules/msie.mod b/jetty-rewrite/src/main/config/modules/msie.mod index e5944100ff7..22b74f731f4 100644 --- a/jetty-rewrite/src/main/config/modules/msie.mod +++ b/jetty-rewrite/src/main/config/modules/msie.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Enables the MSIE rewrite rule for MSIE 5 and 6 known bugs. diff --git a/jetty-rewrite/src/main/config/modules/rewrite-compactpath.mod b/jetty-rewrite/src/main/config/modules/rewrite-compactpath.mod index d5423a042bd..bf189dbd898 100644 --- a/jetty-rewrite/src/main/config/modules/rewrite-compactpath.mod +++ b/jetty-rewrite/src/main/config/modules/rewrite-compactpath.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Add a rule to the rewrite module to compact paths. diff --git a/jetty-rewrite/src/main/config/modules/rewrite-customizer.mod b/jetty-rewrite/src/main/config/modules/rewrite-customizer.mod index 0c2226b909e..45afe1c3639 100644 --- a/jetty-rewrite/src/main/config/modules/rewrite-customizer.mod +++ b/jetty-rewrite/src/main/config/modules/rewrite-customizer.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Enables a rewrite Rules container as a request customizer. diff --git a/jetty-rewrite/src/main/config/modules/rewrite.mod b/jetty-rewrite/src/main/config/modules/rewrite.mod index 47f592ebed5..1b8219d42ba 100644 --- a/jetty-rewrite/src/main/config/modules/rewrite.mod +++ b/jetty-rewrite/src/main/config/modules/rewrite.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Enables the jetty-rewrite handler. diff --git a/jetty-runner/src/main/java/org/eclipse/jetty/runner/Runner.java b/jetty-runner/src/main/java/org/eclipse/jetty/runner/Runner.java index 32f9ebcb2a6..2924ea9c28c 100644 --- a/jetty-runner/src/main/java/org/eclipse/jetty/runner/Runner.java +++ b/jetty-runner/src/main/java/org/eclipse/jetty/runner/Runner.java @@ -579,7 +579,7 @@ public class Runner { System.err.println("WARNING: jetty-runner is deprecated."); System.err.println(" See Jetty Documentation for startup options"); - System.err.println(" https://www.eclipse.org/jetty/documentation/"); + System.err.println(" https://eclipse.dev/jetty/documentation/"); Runner runner = new Runner(); diff --git a/jetty-security/src/main/config/modules/security.mod b/jetty-security/src/main/config/modules/security.mod index 4b87e2643e6..c5fec754774 100644 --- a/jetty-security/src/main/config/modules/security.mod +++ b/jetty-security/src/main/config/modules/security.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Adds servlet standard security handling to the classpath. diff --git a/jetty-server/src/main/config/etc/jetty.xml b/jetty-server/src/main/config/etc/jetty.xml index 0405da0ab45..3e4c4a890d4 100644 --- a/jetty-server/src/main/config/etc/jetty.xml +++ b/jetty-server/src/main/config/etc/jetty.xml @@ -3,7 +3,7 @@ - + diff --git a/jetty-server/src/main/config/modules/acceptratelimit.mod b/jetty-server/src/main/config/modules/acceptratelimit.mod index 45d14fb0171..1e2435f4f9c 100644 --- a/jetty-server/src/main/config/modules/acceptratelimit.mod +++ b/jetty-server/src/main/config/modules/acceptratelimit.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Enables a server-wide accept rate limit. diff --git a/jetty-server/src/main/config/modules/bytebufferpool-logarithmic.mod b/jetty-server/src/main/config/modules/bytebufferpool-logarithmic.mod index a54485b06f2..b468f8b6b95 100644 --- a/jetty-server/src/main/config/modules/bytebufferpool-logarithmic.mod +++ b/jetty-server/src/main/config/modules/bytebufferpool-logarithmic.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Configures the ByteBufferPool used by ServerConnectors whose bucket sizes increase exponentially instead of linearly. diff --git a/jetty-server/src/main/config/modules/connectionlimit.mod b/jetty-server/src/main/config/modules/connectionlimit.mod index 00661868ea5..3c7b32d2041 100644 --- a/jetty-server/src/main/config/modules/connectionlimit.mod +++ b/jetty-server/src/main/config/modules/connectionlimit.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Enables a server-wide connection limit. diff --git a/jetty-server/src/main/config/modules/customrequestlog.mod b/jetty-server/src/main/config/modules/customrequestlog.mod index 7305c6f4e2c..710343ee54e 100644 --- a/jetty-server/src/main/config/modules/customrequestlog.mod +++ b/jetty-server/src/main/config/modules/customrequestlog.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Deprecated name for requestlog using custom request logger. diff --git a/jetty-server/src/main/config/modules/debug.mod b/jetty-server/src/main/config/modules/debug.mod index c92e9fbd42e..eb2887e3f43 100644 --- a/jetty-server/src/main/config/modules/debug.mod +++ b/jetty-server/src/main/config/modules/debug.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Enables the DebugListener. diff --git a/jetty-server/src/main/config/modules/debuglog.mod b/jetty-server/src/main/config/modules/debuglog.mod index ba71d1027a2..1a0a3bb36fd 100644 --- a/jetty-server/src/main/config/modules/debuglog.mod +++ b/jetty-server/src/main/config/modules/debuglog.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Deprecated Debug Log using DebugHandle. diff --git a/jetty-server/src/main/config/modules/ext.mod b/jetty-server/src/main/config/modules/ext.mod index 51891a284ba..6fc42b27cb8 100644 --- a/jetty-server/src/main/config/modules/ext.mod +++ b/jetty-server/src/main/config/modules/ext.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Adds the jar file from $JETTY_HOME/lib/ext and $JETTY_BASE/lib/ext to the server classpath. diff --git a/jetty-server/src/main/config/modules/gzip.mod b/jetty-server/src/main/config/modules/gzip.mod index 4a4320fba6e..8764dccfc42 100644 --- a/jetty-server/src/main/config/modules/gzip.mod +++ b/jetty-server/src/main/config/modules/gzip.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Enables GzipHandler for dynamic gzip compression for the entire server. diff --git a/jetty-server/src/main/config/modules/home-base-warning.mod b/jetty-server/src/main/config/modules/home-base-warning.mod index 0e848406d52..e4ed15823bb 100644 --- a/jetty-server/src/main/config/modules/home-base-warning.mod +++ b/jetty-server/src/main/config/modules/home-base-warning.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Generates a warning that server has been run from $JETTY_HOME rather than from a $JETTY_BASE. diff --git a/jetty-server/src/main/config/modules/https.mod b/jetty-server/src/main/config/modules/https.mod index 943191df309..59ae07ca018 100644 --- a/jetty-server/src/main/config/modules/https.mod +++ b/jetty-server/src/main/config/modules/https.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Adds HTTPS protocol support to the TLS(SSL) Connector. diff --git a/jetty-server/src/main/config/modules/inetaccess.mod b/jetty-server/src/main/config/modules/inetaccess.mod index 70900e4d9a1..8716b1d4e79 100644 --- a/jetty-server/src/main/config/modules/inetaccess.mod +++ b/jetty-server/src/main/config/modules/inetaccess.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Enables the InetAccessHandler. diff --git a/jetty-server/src/main/config/modules/jdbc.mod b/jetty-server/src/main/config/modules/jdbc.mod index 47ee5d24bce..2177507f381 100644 --- a/jetty-server/src/main/config/modules/jdbc.mod +++ b/jetty-server/src/main/config/modules/jdbc.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Enables the java.sql JPMS module. diff --git a/jetty-server/src/main/config/modules/jvm.mod b/jetty-server/src/main/config/modules/jvm.mod index 066d597c476..578f163b578 100644 --- a/jetty-server/src/main/config/modules/jvm.mod +++ b/jetty-server/src/main/config/modules/jvm.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Creates an ini template for setting JVM arguments (eg -Xmx ). diff --git a/jetty-server/src/main/config/modules/lowresources.mod b/jetty-server/src/main/config/modules/lowresources.mod index 72e0b636924..6acebbfdcc5 100644 --- a/jetty-server/src/main/config/modules/lowresources.mod +++ b/jetty-server/src/main/config/modules/lowresources.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Enables a low resource monitor on the server. diff --git a/jetty-server/src/main/config/modules/proxy-protocol-ssl.mod b/jetty-server/src/main/config/modules/proxy-protocol-ssl.mod index 1919f83d53a..8c0611c68c6 100644 --- a/jetty-server/src/main/config/modules/proxy-protocol-ssl.mod +++ b/jetty-server/src/main/config/modules/proxy-protocol-ssl.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Enables the Proxy Protocol on the TLS(SSL) Connector. diff --git a/jetty-server/src/main/config/modules/requestlog.mod b/jetty-server/src/main/config/modules/requestlog.mod index 220c0033a57..841f8aa3baa 100644 --- a/jetty-server/src/main/config/modules/requestlog.mod +++ b/jetty-server/src/main/config/modules/requestlog.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Logs requests using CustomRequestLog and AsyncRequestLogWriter. diff --git a/jetty-server/src/main/config/modules/resources.mod b/jetty-server/src/main/config/modules/resources.mod index 3760f3c9156..c884d0a9e6f 100644 --- a/jetty-server/src/main/config/modules/resources.mod +++ b/jetty-server/src/main/config/modules/resources.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Adds the $JETTY_BASE/resources directory to the server classpath. diff --git a/jetty-server/src/main/config/modules/secure-redirect.mod b/jetty-server/src/main/config/modules/secure-redirect.mod index a0b54bc6e78..80e47924cf3 100644 --- a/jetty-server/src/main/config/modules/secure-redirect.mod +++ b/jetty-server/src/main/config/modules/secure-redirect.mod @@ -1,4 +1,4 @@ -DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Enable SecuredRedirectHandler to redirect all http requests to https on the secure port configured in the server.ini file. diff --git a/jetty-server/src/main/config/modules/session-cache-hash.mod b/jetty-server/src/main/config/modules/session-cache-hash.mod index 8a06cfa241d..cbbedab434b 100644 --- a/jetty-server/src/main/config/modules/session-cache-hash.mod +++ b/jetty-server/src/main/config/modules/session-cache-hash.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Enable first level session cache. diff --git a/jetty-server/src/main/config/modules/session-cache-null.mod b/jetty-server/src/main/config/modules/session-cache-null.mod index a851d17e73b..4e7af393f3b 100644 --- a/jetty-server/src/main/config/modules/session-cache-null.mod +++ b/jetty-server/src/main/config/modules/session-cache-null.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] A SessionCache that does not actually cache sessions. diff --git a/jetty-server/src/main/config/modules/session-store-cache.mod b/jetty-server/src/main/config/modules/session-store-cache.mod index 8baf6256ddb..7485b70aa54 100644 --- a/jetty-server/src/main/config/modules/session-store-cache.mod +++ b/jetty-server/src/main/config/modules/session-store-cache.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Enables caching of SessionData in front of a SessionDataStore. diff --git a/jetty-server/src/main/config/modules/session-store-file.mod b/jetty-server/src/main/config/modules/session-store-file.mod index 7ddb8ade418..e00163a4883 100644 --- a/jetty-server/src/main/config/modules/session-store-file.mod +++ b/jetty-server/src/main/config/modules/session-store-file.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Enables session persistent storage in files. diff --git a/jetty-server/src/main/config/modules/session-store-jdbc.mod b/jetty-server/src/main/config/modules/session-store-jdbc.mod index 2982b7afa22..c60038f0cac 100644 --- a/jetty-server/src/main/config/modules/session-store-jdbc.mod +++ b/jetty-server/src/main/config/modules/session-store-jdbc.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Enables JDBC persistent/distributed session storage. diff --git a/jetty-server/src/main/config/modules/sessions.mod b/jetty-server/src/main/config/modules/sessions.mod index 58d13e122d9..7cff8eeb675 100644 --- a/jetty-server/src/main/config/modules/sessions.mod +++ b/jetty-server/src/main/config/modules/sessions.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Enables session management. diff --git a/jetty-server/src/main/config/modules/sessions/jdbc/datasource.mod b/jetty-server/src/main/config/modules/sessions/jdbc/datasource.mod index 0ae4d1e9868..e60eb16c4ed 100644 --- a/jetty-server/src/main/config/modules/sessions/jdbc/datasource.mod +++ b/jetty-server/src/main/config/modules/sessions/jdbc/datasource.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] JDBC Datasource connections for session storage. diff --git a/jetty-server/src/main/config/modules/sessions/jdbc/driver.mod b/jetty-server/src/main/config/modules/sessions/jdbc/driver.mod index 89f361c09c5..4d4af55f330 100644 --- a/jetty-server/src/main/config/modules/sessions/jdbc/driver.mod +++ b/jetty-server/src/main/config/modules/sessions/jdbc/driver.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] JDBC Driver connections for session storage. diff --git a/jetty-server/src/main/config/modules/stats.mod b/jetty-server/src/main/config/modules/stats.mod index 5caf44fd61d..58bce4e1365 100644 --- a/jetty-server/src/main/config/modules/stats.mod +++ b/jetty-server/src/main/config/modules/stats.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Enables detailed statistics collection for the server. diff --git a/jetty-server/src/main/config/modules/well-known.mod b/jetty-server/src/main/config/modules/well-known.mod index 4db3029b075..1c6b07598ea 100644 --- a/jetty-server/src/main/config/modules/well-known.mod +++ b/jetty-server/src/main/config/modules/well-known.mod @@ -1,4 +1,4 @@ -DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Serve static files from a directory for the "/.well-known" context path. diff --git a/jetty-server/src/main/config/modules/work.mod b/jetty-server/src/main/config/modules/work.mod index 2d93c2bbe5e..0299b7f92f5 100644 --- a/jetty-server/src/main/config/modules/work.mod +++ b/jetty-server/src/main/config/modules/work.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Creates the $JETTY_BASE/work directory as a persistent temp directory. diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/HomeBaseWarning.java b/jetty-server/src/main/java/org/eclipse/jetty/server/HomeBaseWarning.java index 0081b874aa3..681150359b7 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/HomeBaseWarning.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/HomeBaseWarning.java @@ -63,7 +63,7 @@ public class HomeBaseWarning { StringBuilder warn = new StringBuilder(); warn.append("This instance of Jetty is not running from a separate {jetty.base} directory"); - warn.append(", this is not recommended. See documentation at https://www.eclipse.org/jetty/documentation/current/startup.html"); + warn.append(", this is not recommended. See documentation at https://eclipse.dev/jetty/documentation/"); LOG.warn("{}", warn.toString()); } } diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java index 25841db287c..5abb518de9c 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java @@ -84,6 +84,8 @@ public abstract class HttpChannel implements Runnable, HttpOutput.Interceptor private final Request _request; private final Response _response; private final HttpChannel.Listener _combinedListener; + private final Dispatchable _requestDispatcher; + private final Dispatchable _asyncDispatcher; @Deprecated private final List _transientListeners = new ArrayList<>(); private MetaData.Response _committedMetaData; @@ -110,6 +112,8 @@ public abstract class HttpChannel implements Runnable, HttpOutput.Interceptor _combinedListener = (connector instanceof AbstractConnector) ? ((AbstractConnector)connector).getHttpChannelListeners() : NOOP_LISTENER; + _requestDispatcher = new RequestDispatchable(); + _asyncDispatcher = new AsyncDispatchable(); if (LOG.isDebugEnabled()) LOG.debug("new {} -> {},{},{}", @@ -494,23 +498,14 @@ public abstract class HttpChannel implements Runnable, HttpOutput.Interceptor if (!_request.hasMetaData()) throw new IllegalStateException("state=" + _state); - dispatch(DispatcherType.REQUEST, () -> - { - for (HttpConfiguration.Customizer customizer : _configuration.getCustomizers()) - { - customizer.customize(getConnector(), _configuration, _request); - if (_request.isHandled()) - return; - } - getServer().handle(HttpChannel.this); - }); + dispatch(DispatcherType.REQUEST, _requestDispatcher); break; } case ASYNC_DISPATCH: { - dispatch(DispatcherType.ASYNC, () -> getServer().handleAsync(this)); + dispatch(DispatcherType.ASYNC, _asyncDispatcher); break; } @@ -549,11 +544,7 @@ public abstract class HttpChannel implements Runnable, HttpOutput.Interceptor break; } - dispatch(DispatcherType.ERROR, () -> - { - errorHandler.handle(null, _request, _request, _response); - _request.setHandled(true); - }); + dispatch(DispatcherType.ERROR, new ErrorDispatchable(errorHandler)); } catch (Throwable x) { @@ -1592,4 +1583,45 @@ public abstract class HttpChannel implements Runnable, HttpOutput.Interceptor request.getHttpChannel().notifyEvent1(listener -> listener::onComplete, request); } } + + private class RequestDispatchable implements Dispatchable + { + @Override + public void dispatch() throws IOException, ServletException + { + for (HttpConfiguration.Customizer customizer : _configuration.getCustomizers()) + { + customizer.customize(getConnector(), _configuration, _request); + if (_request.isHandled()) + return; + } + getServer().handle(HttpChannel.this); + } + } + + private class AsyncDispatchable implements Dispatchable + { + @Override + public void dispatch() throws IOException, ServletException + { + getServer().handleAsync(HttpChannel.this); + } + } + + private class ErrorDispatchable implements Dispatchable + { + private final ErrorHandler _errorHandler; + + public ErrorDispatchable(ErrorHandler errorHandler) + { + _errorHandler = errorHandler; + } + + @Override + public void dispatch() throws IOException, ServletException + { + _errorHandler.handle(null, _request, _request, _response); + _request.setHandled(true); + } + } } diff --git a/jetty-servlet/src/main/config/modules/servlet.mod b/jetty-servlet/src/main/config/modules/servlet.mod index 609e27e7511..a29d218ec6b 100644 --- a/jetty-servlet/src/main/config/modules/servlet.mod +++ b/jetty-servlet/src/main/config/modules/servlet.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Enables standard Servlet handling. diff --git a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletContextHandler.java b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletContextHandler.java index 5cde6f1c35a..5b046894c07 100644 --- a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletContextHandler.java +++ b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletContextHandler.java @@ -1423,8 +1423,6 @@ public class ServletContextHandler extends ContextHandler @Override public int getSessionTimeout() { - if (!isStarting()) - throw new IllegalStateException(); if (!_enabled) throw new UnsupportedOperationException(); diff --git a/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/ServletContextHandlerTest.java b/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/ServletContextHandlerTest.java index c51c6bc6801..c2893e2236e 100644 --- a/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/ServletContextHandlerTest.java +++ b/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/ServletContextHandlerTest.java @@ -767,6 +767,7 @@ public class ServletContextHandlerTest Integer timeout = Integer.valueOf(100); ServletContextHandler root = new ServletContextHandler(contexts, "/", ServletContextHandler.SESSIONS); root.getSessionHandler().setMaxInactiveInterval((int)TimeUnit.MINUTES.toSeconds(startMin)); + root.addServlet(new ServletHolder(TestSessionTimeoutServlet.class), "/"); root.addBean(new MySCIStarter(root.getServletContext(), new MySCI(true, timeout.intValue())), true); _server.start(); @@ -781,6 +782,17 @@ public class ServletContextHandlerTest assertTrue((Boolean)root.getServletContext().getAttribute("MyContextListener.getSessionTimeout")); //test can't set session timeout from ContextListener that is not from annotation or web.xml assertTrue((Boolean)root.getServletContext().getAttribute("MyContextListener.setSessionTimeout")); + + //test accessing timeout from a servlet + StringBuilder rawRequest = new StringBuilder(); + rawRequest.append("GET / HTTP/1.1\r\n"); + rawRequest.append("Host: local\r\n"); + rawRequest.append("Connection: close\r\n"); + rawRequest.append("\r\n"); + String rawResponse = _connector.getResponse(rawRequest.toString()); + HttpTester.Response response = HttpTester.parseResponse(rawResponse); + assertEquals(200, response.getStatus(), "response status"); + assertEquals("SessionTimeout = " + timeout, response.getContent(), "response content"); } @Test @@ -2066,6 +2078,20 @@ public class ServletContextHandlerTest } } + public static class TestSessionTimeoutServlet extends HttpServlet + { + private static final long serialVersionUID = 1L; + + protected void doGet(HttpServletRequest req, HttpServletResponse resp) + throws ServletException, IOException + { + int t = req.getServletContext().getSessionTimeout(); + resp.setStatus(HttpServletResponse.SC_OK); + PrintWriter writer = resp.getWriter(); + writer.write("SessionTimeout = " + t); + } + } + public static class TestServlet extends HttpServlet { private static final long serialVersionUID = 1L; diff --git a/jetty-servlets/src/main/config/modules/servlets.mod b/jetty-servlets/src/main/config/modules/servlets.mod index 0c45ce9cb3f..dee4a8aa5d2 100644 --- a/jetty-servlets/src/main/config/modules/servlets.mod +++ b/jetty-servlets/src/main/config/modules/servlets.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Adds Jetty utility servlets and filters available to a webapp. diff --git a/jetty-start/src/main/java/org/eclipse/jetty/start/CommandLineBuilder.java b/jetty-start/src/main/java/org/eclipse/jetty/start/CommandLineBuilder.java index 7020159ec1f..ca1f9f900b7 100644 --- a/jetty-start/src/main/java/org/eclipse/jetty/start/CommandLineBuilder.java +++ b/jetty-start/src/main/java/org/eclipse/jetty/start/CommandLineBuilder.java @@ -16,6 +16,7 @@ package org.eclipse.jetty.start; import java.io.File; import java.util.ArrayList; import java.util.List; +import java.util.Objects; public class CommandLineBuilder { @@ -54,12 +55,9 @@ public class CommandLineBuilder } /** - * Perform an optional quoting of the argument, being intelligent with spaces and quotes as needed. If a subString is set in quotes it won't the subString - * won't be escaped. - * - * @param arg the argument to quote - * @return the quoted and escaped argument - * @deprecated no replacement, quoting is done by {@link #toQuotedString()} now. + * @param arg string + * @return Quoted string + * @deprecated use {@link #shellQuoteIfNeeded(String)} */ @Deprecated public static String quote(String arg) @@ -67,23 +65,97 @@ public class CommandLineBuilder return "'" + arg + "'"; } - private List args; + private final StringBuilder commandLine = new StringBuilder(); + private final List args = new ArrayList<>(); + private final String separator; public CommandLineBuilder() { - args = new ArrayList(); + this(false); } + @Deprecated public CommandLineBuilder(String bin) { this(); args.add(bin); } + public CommandLineBuilder(boolean multiline) + { + separator = multiline ? (" \\" + System.lineSeparator() + " ") : " "; + } + /** - * Add a simple argument to the command line. - *

        - * Will quote arguments that have a space in them. + * This method applies single quotes suitable for a POSIX compliant shell if + * necessary. + * + * @param input The string to quote if needed + * @return The quoted string or the original string if quotes are not necessary + */ + public static String shellQuoteIfNeeded(String input) + { + // Single quotes are used because double quotes + // are evaluated differently by some shells. + + if (input == null) + return null; + if (input.length() == 0) + return "''"; + + int i = 0; + boolean needsQuoting = false; + while (!needsQuoting && i < input.length()) + { + char c = input.charAt(i++); + + // needs quoting unless a limited set of known good characters + needsQuoting = !( + (c >= 'A' && c <= 'Z') || + (c >= 'a' && c <= 'z') || + (c >= '0' && c <= '9') || + c == '/' || + c == ':' || + c == '.' || + c == ',' || + c == '+' || + c == '-' || + c == '_' + ); + } + + if (!needsQuoting) + return input; + + StringBuilder builder = new StringBuilder(input.length() * 2); + builder.append("'"); + builder.append(input, 0, --i); + + while (i < input.length()) + { + char c = input.charAt(i++); + if (c == '\'') + { + // There is no escape for a literal single quote, so we must leave the quotes + // and then escape the single quote. We test for the start/end of the string, so + // we can be less ugly in those cases. + if (i == 1) + builder.insert(0, "\\").append("'"); + else if (i == input.length()) + builder.append("'\\"); + else + builder.append("'\\''"); + } + else + builder.append(c); + } + builder.append("'"); + + return builder.toString(); + } + + /** + * Add a simple argument to the command line, quoted if necessary. * * @param arg the simple argument to add */ @@ -91,49 +163,93 @@ public class CommandLineBuilder { if (arg != null) { + if (commandLine.length() > 0) + commandLine.append(separator); args.add(arg); + commandLine.append(shellQuoteIfNeeded(arg)); } } /** - * Similar to {@link #addArg(String)} but concats both name + value with an "=" sign, quoting were needed, and excluding the "=" portion if the value is - * undefined or empty. - * - *

        -     *   addEqualsArg("-Dname", "value") = "-Dname=value"
        -     *   addEqualsArg("-Djetty.home", "/opt/company inc/jetty (7)/") = "-Djetty.home=/opt/company\ inc/jetty\ (7)/"
        -     *   addEqualsArg("-Djenkins.workspace", "/opt/workspaces/jetty jdk7/") = "-Djenkins.workspace=/opt/workspaces/jetty\ jdk7/"
        -     *   addEqualsArg("-Dstress", null) = "-Dstress"
        -     *   addEqualsArg("-Dstress", "") = "-Dstress"
        -     * 
        - * + * @deprecated use {@link #addArg(String, String)} + */ + @Deprecated + public void addEqualsArg(String name, String value) + { + addArg(name, value); + } + + /** + * Add a "name=value" style argument to the command line with + * name and value quoted if necessary. * @param name the name * @param value the value */ - public void addEqualsArg(String name, String value) + public void addArg(String name, String value) { + Objects.requireNonNull(name); + + if (commandLine.length() > 0) + commandLine.append(separator); + if ((value != null) && (value.length() > 0)) { args.add(name + "=" + value); + commandLine.append(shellQuoteIfNeeded(name)).append('=').append(shellQuoteIfNeeded(value)); } else { args.add(name); + commandLine.append(shellQuoteIfNeeded(name)); } } /** - * Add a simple argument to the command line. - *

        - * Will NOT quote/escape arguments that have a space in them. - * - * @param arg the simple argument to add + * @deprecated use {@link #addArg(String)} */ + @Deprecated public void addRawArg(String arg) { - if (arg != null) + addArg(arg); + } + + /** + * Adds a "-OPTION" style option to the command line with no quoting, for example `--help`. + * @param option the option + */ + public void addOption(String option) + { + addOption(option, null, null); + } + + /** + * Adds a "-OPTIONname=value" style option to the command line with + * name and value quoted if necessary, for example "-Dprop=value". + * @param option the option + * @param name the name + * @param value the value + */ + public void addOption(String option, String name, String value) + { + Objects.requireNonNull(option); + + if (commandLine.length() > 0) + commandLine.append(separator); + + if (name == null || name.length() == 0) { - args.add(arg); + commandLine.append(option); + args.add(option); + } + else if ((value != null) && (value.length() > 0)) + { + args.add(option + name + "=" + value); + commandLine.append(option).append(shellQuoteIfNeeded(name)).append('=').append(shellQuoteIfNeeded(value)); + } + else + { + args.add(option + name); + commandLine.append(option).append(shellQuoteIfNeeded(name)); } } @@ -144,48 +260,35 @@ public class CommandLineBuilder @Override public String toString() - { - return toString(" "); - } - - public String toString(String delim) { StringBuilder buf = new StringBuilder(); - for (String arg : args) { if (buf.length() > 0) - { - buf.append(delim); - } + buf.append(' '); buf.append(arg); // we assume escaping has occurred during addArg } return buf.toString(); } + /** + * @deprecated use {@link #toCommandLine()} + */ + @Deprecated + public String toQuotedString() + { + return toCommandLine(); + } + /** * A version of {@link #toString()} where every arg is evaluated for potential {@code '} (single-quote tick) wrapping. * * @return the toString but each arg that has spaces is surrounded by {@code '} (single-quote tick) */ - public String toQuotedString() + public String toCommandLine() { - StringBuilder buf = new StringBuilder(); - - for (String arg : args) - { - if (buf.length() > 0) - buf.append(' '); - boolean needsQuotes = (arg.contains(" ")); - if (needsQuotes) - buf.append("'"); - buf.append(arg); - if (needsQuotes) - buf.append("'"); - } - - return buf.toString(); + return commandLine.toString(); } public void debug() diff --git a/jetty-start/src/main/java/org/eclipse/jetty/start/Main.java b/jetty-start/src/main/java/org/eclipse/jetty/start/Main.java index 425805d8e50..08d991360aa 100644 --- a/jetty-start/src/main/java/org/eclipse/jetty/start/Main.java +++ b/jetty-start/src/main/java/org/eclipse/jetty/start/Main.java @@ -441,7 +441,7 @@ public class Main { CommandLineBuilder cmd = args.getMainArgs(args.getDryRunParts()); cmd.debug(); - System.out.println(cmd.toQuotedString()); + System.out.println(cmd.toCommandLine()); } if (args.isStopCommand()) diff --git a/jetty-start/src/main/java/org/eclipse/jetty/start/ModuleGraphWriter.java b/jetty-start/src/main/java/org/eclipse/jetty/start/ModuleGraphWriter.java index cf1c8797381..d01ad6935c8 100644 --- a/jetty-start/src/main/java/org/eclipse/jetty/start/ModuleGraphWriter.java +++ b/jetty-start/src/main/java/org/eclipse/jetty/start/ModuleGraphWriter.java @@ -121,7 +121,7 @@ public class ModuleGraphWriter out.println("/*"); out.println(" * GraphViz Graph of Jetty Modules"); out.println(" * "); - out.println(" * Jetty: https://eclipse.org/jetty/"); + out.println(" * Jetty: https://eclipse.dev/jetty/"); out.println(" * GraphViz: http://graphviz.org/"); out.println(" * "); out.println(" * To Generate Graph image using graphviz:"); diff --git a/jetty-start/src/main/java/org/eclipse/jetty/start/StartArgs.java b/jetty-start/src/main/java/org/eclipse/jetty/start/StartArgs.java index 13b265ce5ec..b1554fa0237 100644 --- a/jetty-start/src/main/java/org/eclipse/jetty/start/StartArgs.java +++ b/jetty-start/src/main/java/org/eclipse/jetty/start/StartArgs.java @@ -208,6 +208,7 @@ public class StartArgs private boolean listConfig = false; private boolean version = false; private boolean dryRun = false; + private boolean multiLine = false; private final Set dryRunParts = new HashSet<>(); private boolean jpms = false; private boolean createStartD = false; @@ -706,7 +707,7 @@ public class StartArgs if (parts.isEmpty()) parts = ALL_PARTS; - CommandLineBuilder cmd = new CommandLineBuilder(); + CommandLineBuilder cmd = new CommandLineBuilder(multiLine); // Special Stop/Shutdown properties ensureSystemPropertySet("STOP.PORT"); @@ -714,13 +715,13 @@ public class StartArgs ensureSystemPropertySet("STOP.WAIT"); if (parts.contains("java")) - cmd.addRawArg(CommandLineBuilder.findJavaBin()); + cmd.addArg(CommandLineBuilder.findJavaBin()); if (parts.contains("opts")) { - cmd.addRawArg("-Djava.io.tmpdir=" + System.getProperty("java.io.tmpdir")); - cmd.addRawArg("-Djetty.home=" + baseHome.getHome()); - cmd.addRawArg("-Djetty.base=" + baseHome.getBase()); + cmd.addOption("-D", "java.io.tmpdir", System.getProperty("java.io.tmpdir")); + cmd.addOption("-D", "jetty.home", baseHome.getHome()); + cmd.addOption("-D", "jetty.base", baseHome.getBase()); for (String x : getJvmArgSources().keySet()) { @@ -731,11 +732,11 @@ public class StartArgs String value = assign.length == 1 ? "" : assign[1]; Prop p = processSystemProperty(key, value, null); - cmd.addRawArg("-D" + p.key + "=" + getProperties().expand(p.value)); + cmd.addOption("-D", p.key, properties.expand(p.value)); } else { - cmd.addRawArg(getProperties().expand(x)); + cmd.addArg(getProperties().expand(x)); } } @@ -743,7 +744,7 @@ public class StartArgs for (String propKey : systemPropertySource.keySet()) { String value = System.getProperty(propKey); - cmd.addEqualsArg("-D" + propKey, value); + cmd.addOption("-D", propKey, value); } } @@ -756,60 +757,60 @@ public class StartArgs List files = dirsAndFiles.get(false); if (files != null && !files.isEmpty()) { - cmd.addRawArg("--module-path"); + cmd.addOption("--module-path"); String modules = files.stream() .map(File::getAbsolutePath) .collect(Collectors.joining(File.pathSeparator)); - cmd.addRawArg(modules); + cmd.addArg(modules); } List dirs = dirsAndFiles.get(true); if (dirs != null && !dirs.isEmpty()) { - cmd.addRawArg("--class-path"); + cmd.addOption("--class-path"); String directories = dirs.stream() .map(File::getAbsolutePath) .collect(Collectors.joining(File.pathSeparator)); - cmd.addRawArg(directories); + cmd.addArg(directories); } if (!jmodAdds.isEmpty()) { - cmd.addRawArg("--add-modules"); - cmd.addRawArg(String.join(",", jmodAdds)); + cmd.addOption("--add-modules"); + cmd.addArg(String.join(",", jmodAdds)); } for (Map.Entry> entry : jmodPatch.entrySet()) { - cmd.addRawArg("--patch-module"); - cmd.addRawArg(entry.getKey() + "=" + String.join(File.pathSeparator, entry.getValue())); + cmd.addOption("--patch-module"); + cmd.addArg(entry.getKey(), String.join(File.pathSeparator, entry.getValue())); } for (Map.Entry> entry : jmodOpens.entrySet()) { - cmd.addRawArg("--add-opens"); - cmd.addRawArg(entry.getKey() + "=" + String.join(",", entry.getValue())); + cmd.addOption("--add-opens"); + cmd.addArg(entry.getKey(), String.join(",", entry.getValue())); } for (Map.Entry> entry : jmodExports.entrySet()) { - cmd.addRawArg("--add-exports"); - cmd.addRawArg(entry.getKey() + "=" + String.join(",", entry.getValue())); + cmd.addOption("--add-exports"); + cmd.addArg(entry.getKey(), String.join(",", entry.getValue())); } for (Map.Entry> entry : jmodReads.entrySet()) { - cmd.addRawArg("--add-reads"); - cmd.addRawArg(entry.getKey() + "=" + String.join(",", entry.getValue())); + cmd.addOption("--add-reads"); + cmd.addArg(entry.getKey(), String.join(",", entry.getValue())); } } else { - cmd.addRawArg("--class-path"); - cmd.addRawArg(classpath.toString()); + cmd.addOption("--class-path"); + cmd.addArg(classpath.toString()); } } if (parts.contains("main")) { if (isJPMS()) - cmd.addRawArg("--module"); - cmd.addRawArg(getMainClassname()); + cmd.addOption("--module"); + cmd.addArg(getMainClassname()); } // pass properties as args or as a file @@ -819,7 +820,8 @@ public class StartArgs { for (Prop p : properties) { - cmd.addRawArg(CommandLineBuilder.quote(p.key) + "=" + CommandLineBuilder.quote(properties.expand(p.value))); + if (!p.key.startsWith("java.version.")) + cmd.addArg(p.key, properties.expand(p.value)); } } else if (properties.size() > 0) @@ -837,17 +839,17 @@ public class StartArgs { properties.store(out, "start.jar properties"); } - cmd.addRawArg(propPath.toAbsolutePath().toString()); + cmd.addArg(propPath.toAbsolutePath().toString()); } for (Path xml : xmls) { - cmd.addRawArg(xml.toAbsolutePath().toString()); + cmd.addArg(xml.toAbsolutePath().toString()); } for (Path propertyFile : propertyFiles) { - cmd.addRawArg(propertyFile.toAbsolutePath().toString()); + cmd.addArg(propertyFile.toAbsolutePath().toString()); } } @@ -1225,6 +1227,12 @@ public class StartArgs int colon = arg.indexOf('='); for (String part : arg.substring(colon + 1).split(",")) { + if ("multiline".equalsIgnoreCase(part)) + { + multiLine = true; + continue; + } + if (!ALL_PARTS.contains(part)) throw new UsageException(UsageException.ERR_BAD_ARG, "Unrecognized --dry-run=\"%s\" in %s", part, source); diff --git a/jetty-start/src/main/resources/org/eclipse/jetty/start/usage.txt b/jetty-start/src/main/resources/org/eclipse/jetty/start/usage.txt index 19a865b7ccd..5813c199fdd 100644 --- a/jetty-start/src/main/resources/org/eclipse/jetty/start/usage.txt +++ b/jetty-start/src/main/resources/org/eclipse/jetty/start/usage.txt @@ -60,12 +60,13 @@ Report Commands: --dry-run Prints the command line that start.jar generates, - then exits. + in a format usable by a POSIX compliant shell, then exits. This may be used to generate command lines into scripts: $ java -jar start.jar --dry-run > jetty.sh --dry-run=(,)* - Prints specific parts of the command line. The parts are: + Prints specific parts of the command line in a format usable by + a POSIX compliant shell. The parts are: o "java" - the JVM to run o "opts" - the JVM options (e.g. -D, -X and -XX flags) o "path" - the JVM class-path and/or the JPMS module-path diff --git a/jetty-start/src/test/java/org/eclipse/jetty/start/CommandLineBuilderTest.java b/jetty-start/src/test/java/org/eclipse/jetty/start/CommandLineBuilderTest.java index 06753229e7e..6f938f7ae00 100644 --- a/jetty-start/src/test/java/org/eclipse/jetty/start/CommandLineBuilderTest.java +++ b/jetty-start/src/test/java/org/eclipse/jetty/start/CommandLineBuilderTest.java @@ -13,7 +13,12 @@ package org.eclipse.jetty.start; +import java.util.stream.Stream; + import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.MethodSource; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.is; @@ -23,43 +28,90 @@ public class CommandLineBuilderTest @Test public void testSimpleCommandline() { - CommandLineBuilder cmd = new CommandLineBuilder("java"); - cmd.addEqualsArg("-Djava.io.tmpdir", "/home/java/temp dir/"); + CommandLineBuilder cmd = new CommandLineBuilder(); + cmd.addArg("java"); + cmd.addArg("-Djava.io.tmpdir", "/home/java/temp dir/"); cmd.addArg("--version"); - assertThat(cmd.toQuotedString(), is("java '-Djava.io.tmpdir=/home/java/temp dir/' --version")); + assertThat(cmd.toCommandLine(), is("java -Djava.io.tmpdir='/home/java/temp dir/' --version")); } @Test public void testSimpleHomeNoSpace() { - CommandLineBuilder cmd = new CommandLineBuilder("java"); - cmd.addEqualsArg("-Djetty.home", "/opt/jetty"); - assertThat(cmd.toQuotedString(), is("java -Djetty.home=/opt/jetty")); + CommandLineBuilder cmd = new CommandLineBuilder(); + cmd.addArg("java"); + cmd.addArg("-Djetty.home", "/opt/jetty"); + assertThat(cmd.toCommandLine(), is("java -Djetty.home=/opt/jetty")); } @Test public void testSimpleHomeWithSpace() { - CommandLineBuilder cmd = new CommandLineBuilder("java"); - cmd.addEqualsArg("-Djetty.home", "/opt/jetty 10/home"); - assertThat(cmd.toQuotedString(), is("java '-Djetty.home=/opt/jetty 10/home'")); + CommandLineBuilder cmd = new CommandLineBuilder(); + cmd.addArg("java"); + cmd.addArg("-Djetty.home", "/opt/jetty 10/home"); + assertThat(cmd.toCommandLine(), is("java -Djetty.home='/opt/jetty 10/home'")); } @Test public void testEscapedFormattingString() { - CommandLineBuilder cmd = new CommandLineBuilder("java"); - cmd.addEqualsArg("-Djetty.home", "/opt/jetty"); - cmd.addEqualsArg("jetty.requestlog.formatter", "%{client}a - %u %{dd/MMM/yyyy:HH:mm:ss ZZZ|GMT}t \"%r\" %s %O \"%{Referer}i\" \"%{User-Agent}i\""); - assertThat(cmd.toQuotedString(), is("java -Djetty.home=/opt/jetty 'jetty.requestlog.formatter=%{client}a - %u %{dd/MMM/yyyy:HH:mm:ss ZZZ|GMT}t \"%r\" %s %O \"%{Referer}i\" \"%{User-Agent}i\"'")); + CommandLineBuilder cmd = new CommandLineBuilder(); + cmd.addArg("java"); + cmd.addArg("-Djetty.home", "/opt/jetty"); + cmd.addArg("jetty.requestlog.formatter", "%{client}a - %u %{dd/MMM/yyyy:HH:mm:ss ZZZ|GMT}t \"%r\" %s %O \"%{Referer}i\" \"%{User-Agent}i\""); + assertThat(cmd.toCommandLine(), is("java -Djetty.home=/opt/jetty jetty.requestlog.formatter='%{client}a - %u %{dd/MMM/yyyy:HH:mm:ss ZZZ|GMT}t \"%r\" %s %O \"%{Referer}i\" \"%{User-Agent}i\"'")); } @Test public void testEscapeUnicode() { - CommandLineBuilder cmd = new CommandLineBuilder("java"); - cmd.addEqualsArg("-Djetty.home", "/opt/jetty"); - cmd.addEqualsArg("monetary.symbol", "€"); - assertThat(cmd.toQuotedString(), is("java -Djetty.home=/opt/jetty monetary.symbol=€")); + CommandLineBuilder cmd = new CommandLineBuilder(); + cmd.addArg("java"); + cmd.addArg("-Djetty.home", "/opt/jetty"); + cmd.addArg("monetary.symbol", "€"); + assertThat(cmd.toCommandLine(), is("java -Djetty.home=/opt/jetty monetary.symbol='€'")); + } + + public static Stream shellQuoting() + { + return Stream.of( + Arguments.of(null, null), + Arguments.of("", "''"), + Arguments.of("Hello", "Hello"), + Arguments.of("Hell0", "Hell0"), + Arguments.of("Hello$World", "'Hello$World'"), + Arguments.of("Hello\\World", "'Hello\\World'"), + Arguments.of("Hello`World", "'Hello`World'"), + Arguments.of("'Hello World'", "\\''Hello World'\\'"), + Arguments.of("\"Hello World\"", "'\"Hello World\"'"), + Arguments.of("H-llo_world", "H-llo_world"), + Arguments.of("H:llo/world", "H:llo/world"), + Arguments.of("Hello World", "'Hello World'"), + Arguments.of("foo\\bar", "'foo\\bar'"), + Arguments.of("foo'bar", "'foo'\\''bar'"), + Arguments.of("some 'internal' quoting", "'some '\\''internal'\\'' quoting'"), + Arguments.of("monetary.symbol=€", "'monetary.symbol=€'") + ); + } + + @ParameterizedTest + @MethodSource("shellQuoting") + public void testShellQuoting(String string, String expected) + { + assertThat(CommandLineBuilder.shellQuoteIfNeeded(string), is(expected)); + } + + @Test + public void testMultiLine() + { + CommandLineBuilder cmd = new CommandLineBuilder(true); + cmd.addArg("java"); + cmd.addArg("-Djetty.home", "/opt/jetty"); + cmd.addArg("monetary.symbol", "€"); + assertThat(cmd.toCommandLine(), + is("java \\" + System.lineSeparator() + + " -Djetty.home=/opt/jetty \\" + System.lineSeparator() + + " monetary.symbol='€'")); } } diff --git a/jetty-start/src/test/java/org/eclipse/jetty/start/MainTest.java b/jetty-start/src/test/java/org/eclipse/jetty/start/MainTest.java index 94a3ddafa5b..e43f16b5cf3 100644 --- a/jetty-start/src/test/java/org/eclipse/jetty/start/MainTest.java +++ b/jetty-start/src/test/java/org/eclipse/jetty/start/MainTest.java @@ -174,7 +174,7 @@ public class MainTest assertThat("jetty.base", baseHome.getBase(), is(homePath.toString())); CommandLineBuilder commandLineBuilder = args.getMainArgs(StartArgs.ALL_PARTS); - String commandLine = commandLineBuilder.toString("\n"); + String commandLine = commandLineBuilder.toString(); String expectedExpansion = String.format("-Xloggc:%s/logs/gc-%s.log", baseHome.getBase(), System.getProperty("java.version") ); diff --git a/jetty-start/src/test/java/org/eclipse/jetty/start/fileinits/MavenLocalRepoFileInitializerTest.java b/jetty-start/src/test/java/org/eclipse/jetty/start/fileinits/MavenLocalRepoFileInitializerTest.java index 1ac05337690..82b30b6fbf7 100644 --- a/jetty-start/src/test/java/org/eclipse/jetty/start/fileinits/MavenLocalRepoFileInitializerTest.java +++ b/jetty-start/src/test/java/org/eclipse/jetty/start/fileinits/MavenLocalRepoFileInitializerTest.java @@ -66,7 +66,7 @@ public class MavenLocalRepoFileInitializerTest public void testGetCoordinateNotMaven() { MavenLocalRepoFileInitializer repo = new MavenLocalRepoFileInitializer(baseHome); - String ref = "https://www.eclipse.org/jetty/"; + String ref = "https://eclipse.dev/jetty/"; Coordinates coords = repo.getCoordinates(URI.create(ref)); assertThat("Coords", coords, nullValue()); } diff --git a/jetty-start/src/test/resources/dist-home/modules/main.mod b/jetty-start/src/test/resources/dist-home/modules/main.mod index 8fd93990e8a..8e398221e85 100644 --- a/jetty-start/src/test/resources/dist-home/modules/main.mod +++ b/jetty-start/src/test/resources/dist-home/modules/main.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Example of a module diff --git a/jetty-unixsocket/jetty-unixsocket-server/src/main/config-template/modules/unixsocket-forwarded.mod b/jetty-unixsocket/jetty-unixsocket-server/src/main/config-template/modules/unixsocket-forwarded.mod index 552b5bc1617..70328787fac 100644 --- a/jetty-unixsocket/jetty-unixsocket-server/src/main/config-template/modules/unixsocket-forwarded.mod +++ b/jetty-unixsocket/jetty-unixsocket-server/src/main/config-template/modules/unixsocket-forwarded.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Adds a forwarded request customizer for the Unix Domain Socket connector. diff --git a/jetty-unixsocket/jetty-unixsocket-server/src/main/config-template/modules/unixsocket-http.mod b/jetty-unixsocket/jetty-unixsocket-server/src/main/config-template/modules/unixsocket-http.mod index 22442344024..13f028ba942 100644 --- a/jetty-unixsocket/jetty-unixsocket-server/src/main/config-template/modules/unixsocket-http.mod +++ b/jetty-unixsocket/jetty-unixsocket-server/src/main/config-template/modules/unixsocket-http.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Adds an HTTP protocol support to the Unix Domain Socket connector. diff --git a/jetty-unixsocket/jetty-unixsocket-server/src/main/config-template/modules/unixsocket-http2c.mod b/jetty-unixsocket/jetty-unixsocket-server/src/main/config-template/modules/unixsocket-http2c.mod index d1d22aca9b7..4285da8705f 100644 --- a/jetty-unixsocket/jetty-unixsocket-server/src/main/config-template/modules/unixsocket-http2c.mod +++ b/jetty-unixsocket/jetty-unixsocket-server/src/main/config-template/modules/unixsocket-http2c.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Adds an HTTP2C connetion factory to the Unix Domain Socket Connector. diff --git a/jetty-unixsocket/jetty-unixsocket-server/src/main/config-template/modules/unixsocket-prefix.mod b/jetty-unixsocket/jetty-unixsocket-server/src/main/config-template/modules/unixsocket-prefix.mod index 16963be99ea..d17377f7109 100644 --- a/jetty-unixsocket/jetty-unixsocket-server/src/main/config-template/modules/unixsocket-prefix.mod +++ b/jetty-unixsocket/jetty-unixsocket-server/src/main/config-template/modules/unixsocket-prefix.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Enables a Unix Domain Socket Connector. diff --git a/jetty-unixsocket/jetty-unixsocket-server/src/main/config-template/modules/unixsocket-proxy-protocol.mod b/jetty-unixsocket/jetty-unixsocket-server/src/main/config-template/modules/unixsocket-proxy-protocol.mod index 739ed19d7b5..6d831d45605 100644 --- a/jetty-unixsocket/jetty-unixsocket-server/src/main/config-template/modules/unixsocket-proxy-protocol.mod +++ b/jetty-unixsocket/jetty-unixsocket-server/src/main/config-template/modules/unixsocket-proxy-protocol.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Enables the proxy protocol on the Unix Domain Socket Connector. diff --git a/jetty-unixsocket/jetty-unixsocket-server/src/main/config-template/modules/unixsocket-secure.mod b/jetty-unixsocket/jetty-unixsocket-server/src/main/config-template/modules/unixsocket-secure.mod index 8dfe843774d..67a52bef1ee 100644 --- a/jetty-unixsocket/jetty-unixsocket-server/src/main/config-template/modules/unixsocket-secure.mod +++ b/jetty-unixsocket/jetty-unixsocket-server/src/main/config-template/modules/unixsocket-secure.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Enable a secure request customizer on the HTTP Configuration. diff --git a/jetty-util/src/main/config/modules/console-capture.mod b/jetty-util/src/main/config/modules/console-capture.mod index 0fa45415ae6..d390a073cf3 100644 --- a/jetty-util/src/main/config/modules/console-capture.mod +++ b/jetty-util/src/main/config/modules/console-capture.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/ +# DO NOT EDIT - See: https://eclipse.dev/jetty/documentation/ [description] Redirects the JVM console stderr and stdout to a rolling log file. diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/thread/strategy/AdaptiveExecutionStrategy.java b/jetty-util/src/main/java/org/eclipse/jetty/util/thread/strategy/AdaptiveExecutionStrategy.java index cae0e352d07..8af11caf7fc 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/thread/strategy/AdaptiveExecutionStrategy.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/thread/strategy/AdaptiveExecutionStrategy.java @@ -91,7 +91,7 @@ import org.slf4j.LoggerFactory; * that says that a hunter should eat (i.e. consume) what they kill (i.e. produced).

        */ @ManagedObject("Adaptive execution strategy") -public class AdaptiveExecutionStrategy extends ContainerLifeCycle implements ExecutionStrategy +public class AdaptiveExecutionStrategy extends ContainerLifeCycle implements ExecutionStrategy, Runnable { private static final Logger LOG = LoggerFactory.getLogger(AdaptiveExecutionStrategy.class); @@ -137,7 +137,6 @@ public class AdaptiveExecutionStrategy extends ContainerLifeCycle implements Exe private final Executor _executor; private final TryExecutor _tryExecutor; private final Executor _virtualExecutor; - private final Runnable _runPendingProducer = () -> tryProduce(true); private State _state = State.IDLE; private boolean _pending; @@ -185,7 +184,7 @@ public class AdaptiveExecutionStrategy extends ContainerLifeCycle implements Exe if (LOG.isDebugEnabled()) LOG.debug("{} dispatch {}", this, execute); if (execute) - _executor.execute(_runPendingProducer); + _executor.execute(this); } @Override @@ -194,6 +193,12 @@ public class AdaptiveExecutionStrategy extends ContainerLifeCycle implements Exe tryProduce(false); } + @Override + public void run() + { + tryProduce(true); + } + /** * Tries to become the producing thread and then produces and consumes tasks. * @@ -308,7 +313,7 @@ public class AdaptiveExecutionStrategy extends ContainerLifeCycle implements Exe try (AutoLock l = _lock.lock()) { // If a pending producer is available or one can be started - if (_pending || _tryExecutor.tryExecute(_runPendingProducer)) + if (_pending || _tryExecutor.tryExecute(this)) { // Use EPC: the producer directly consumes the task, which may block // and then races with the pending producer to resume production. @@ -332,7 +337,7 @@ public class AdaptiveExecutionStrategy extends ContainerLifeCycle implements Exe try (AutoLock l = _lock.lock()) { // If a pending producer is available or one can be started - if (_pending || _tryExecutor.tryExecute(_runPendingProducer)) + if (_pending || _tryExecutor.tryExecute(this)) { // use EPC: The producer directly consumes the task, which may block // and then races with the pending producer to resume production. diff --git a/jetty-util/src/test/java/org/eclipse/jetty/util/LazyListTest.java b/jetty-util/src/test/java/org/eclipse/jetty/util/LazyListTest.java index 35ca58094d4..4b6f6bb0440 100644 --- a/jetty-util/src/test/java/org/eclipse/jetty/util/LazyListTest.java +++ b/jetty-util/src/test/java/org/eclipse/jetty/util/LazyListTest.java @@ -1496,12 +1496,12 @@ public class LazyListTest uris.add(URI.create("http://www.mortbay.org/")); uris.add(URI.create("http://jetty.codehaus.org/jetty/")); uris.add(URI.create("http://www.intalio.com/jetty/")); - uris.add(URI.create("https://www.eclipse.org/jetty/")); + uris.add(URI.create("https://eclipse.dev/jetty/")); // Make sure that Generics pass through the 'get' routine safely. // We should be able to call this without casting the result to URI URI eclipseUri = LazyList.get(uris, 3); - assertEquals("https://www.eclipse.org/jetty/", eclipseUri.toASCIIString()); + assertEquals("https://eclipse.dev/jetty/", eclipseUri.toASCIIString()); } /** diff --git a/jetty-util/src/test/java/org/eclipse/jetty/util/Utf8LineParserTest.java b/jetty-util/src/test/java/org/eclipse/jetty/util/Utf8LineParserTest.java index dd9ebc53d49..95fa0519d99 100644 --- a/jetty-util/src/test/java/org/eclipse/jetty/util/Utf8LineParserTest.java +++ b/jetty-util/src/test/java/org/eclipse/jetty/util/Utf8LineParserTest.java @@ -82,7 +82,7 @@ public class Utf8LineParserTest public void testWildHttpRequestParse() { // Arbitrary Http Response Headers seen in the wild. - // Request URI -> http://www.eclipse.org/jetty/ + // Request URI -> https://eclipse.dev/jetty/ List expected = new ArrayList<>(); expected.add("HEAD /jetty/ HTTP/1.0"); expected.add("User-Agent: \"Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.6) Gecko/20060601 Firefox/2.0.0.6 (Ubuntu-feisty)\""); diff --git a/jetty-util/src/test/java/org/eclipse/jetty/util/resource/FileSystemResourceTest.java b/jetty-util/src/test/java/org/eclipse/jetty/util/resource/FileSystemResourceTest.java index d93ccec2352..7e052dc7fe8 100644 --- a/jetty-util/src/test/java/org/eclipse/jetty/util/resource/FileSystemResourceTest.java +++ b/jetty-util/src/test/java/org/eclipse/jetty/util/resource/FileSystemResourceTest.java @@ -218,7 +218,7 @@ public class FileSystemResourceTest public void testNotFileURI(Class resourceClass) { assertThrows(IllegalArgumentException.class, - () -> newResource(resourceClass, new URI("https://www.eclipse.org/jetty/"))); + () -> newResource(resourceClass, new URI("https://eclipse.dev/jetty/"))); } @ParameterizedTest diff --git a/jetty-webapp/src/main/config/etc/webdefault.xml b/jetty-webapp/src/main/config/etc/webdefault.xml index 4644d2dfaf0..315358c8f9f 100644 --- a/jetty-webapp/src/main/config/etc/webdefault.xml +++ b/jetty-webapp/src/main/config/etc/webdefault.xml @@ -187,7 +187,7 @@ - + diff --git a/jetty-webapp/src/main/config/modules/webapp.mod b/jetty-webapp/src/main/config/modules/webapp.mod index 4abe3964676..7e52896183d 100644 --- a/jetty-webapp/src/main/config/modules/webapp.mod +++ b/jetty-webapp/src/main/config/modules/webapp.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Adds support for servlet specification web applications to the server classpath. diff --git a/jetty-websocket/websocket-jetty-client/src/main/config/modules/websocket-jetty-client.mod b/jetty-websocket/websocket-jetty-client/src/main/config/modules/websocket-jetty-client.mod index 78420f79fb4..8a25c068e9f 100644 --- a/jetty-websocket/websocket-jetty-client/src/main/config/modules/websocket-jetty-client.mod +++ b/jetty-websocket/websocket-jetty-client/src/main/config/modules/websocket-jetty-client.mod @@ -1,4 +1,4 @@ -# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html +# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/ [description] Expose the Jetty WebSocket Client classes to deployed web applications. diff --git a/jetty-xml/src/main/java/org/eclipse/jetty/xml/XmlConfiguration.java b/jetty-xml/src/main/java/org/eclipse/jetty/xml/XmlConfiguration.java index 76e143d5a45..92cf1520ff3 100644 --- a/jetty-xml/src/main/java/org/eclipse/jetty/xml/XmlConfiguration.java +++ b/jetty-xml/src/main/java/org/eclipse/jetty/xml/XmlConfiguration.java @@ -13,6 +13,7 @@ package org.eclipse.jetty.xml; +import java.io.Closeable; import java.io.IOException; import java.io.InputStream; import java.lang.annotation.Annotation; @@ -198,7 +199,7 @@ public class XmlConfiguration private final String _dtd; private ConfigurationProcessor _processor; - ConfigurationParser getParser() + public XmlParser getXmlParser() { Pool.Entry entry = __parsers.acquire(ConfigurationParser::new); if (entry == null) @@ -215,12 +216,18 @@ public class XmlConfiguration */ public XmlConfiguration(Resource resource) throws SAXException, IOException { - try (ConfigurationParser parser = getParser(); InputStream inputStream = resource.getInputStream()) + XmlParser parser = getXmlParser(); + try (InputStream inputStream = resource.getInputStream()) { _location = resource; setConfig(parser.parse(inputStream)); _dtd = parser.getDTD(); } + finally + { + if (parser instanceof Closeable) + ((Closeable)parser).close(); + } } @Override @@ -1896,7 +1903,7 @@ public class XmlConfiguration } } - private static class ConfigurationParser extends XmlParser implements AutoCloseable + private static class ConfigurationParser extends XmlParser implements Closeable { private final Pool.Entry _entry; @@ -1923,14 +1930,35 @@ public class XmlConfiguration redirectEntity("configure_10_0.dtd", config100); redirectEntity("http://jetty.mortbay.org/configure.dtd", config93); - redirectEntity("http://jetty.mortbay.org/configure_9_3.dtd", config93); redirectEntity("http://jetty.eclipse.org/configure.dtd", config93); redirectEntity("https://jetty.eclipse.org/configure.dtd", config93); redirectEntity("http://www.eclipse.org/jetty/configure.dtd", config93); redirectEntity("https://www.eclipse.org/jetty/configure.dtd", config93); + redirectEntity("http://eclipse.org/jetty/configure.dtd", config93); + redirectEntity("https://eclipse.org/jetty/configure.dtd", config93); + redirectEntity("http://www.eclipse.dev/jetty/configure.dtd", config93); + redirectEntity("https://www.eclipse.dev/jetty/configure.dtd", config93); + redirectEntity("http://eclipse.dev/jetty/configure.dtd", config93); + redirectEntity("https://eclipse.dev/jetty/configure.dtd", config93); + + redirectEntity("http://jetty.mortbay.org/configure_9_3.dtd", config93); redirectEntity("http://www.eclipse.org/jetty/configure_9_3.dtd", config93); redirectEntity("https://www.eclipse.org/jetty/configure_9_3.dtd", config93); + redirectEntity("http://eclipse.org/jetty/configure_9_3.dtd", config93); + redirectEntity("https://eclipse.org/jetty/configure_9_3.dtd", config93); + redirectEntity("http://www.eclipse.dev/jetty/configure_9_3.dtd", config93); + redirectEntity("https://www.eclipse.dev/jetty/configure_9_3.dtd", config93); + redirectEntity("http://eclipse.dev/jetty/configure_9_3.dtd", config93); + redirectEntity("https://eclipse.dev/jetty/configure_9_3.dtd", config93); + + redirectEntity("http://www.eclipse.org/jetty/configure_10_0.dtd", config100); redirectEntity("https://www.eclipse.org/jetty/configure_10_0.dtd", config100); + redirectEntity("http://eclipse.org/jetty/configure_10_0.dtd", config100); + redirectEntity("https://eclipse.org/jetty/configure_10_0.dtd", config100); + redirectEntity("http://www.eclipse.dev/jetty/configure_10_0.dtd", config100); + redirectEntity("https://www.eclipse.dev/jetty/configure_10_0.dtd", config100); + redirectEntity("http://eclipse.dev/jetty/configure_10_0.dtd", config100); + redirectEntity("https://eclipse.dev/jetty/configure_10_0.dtd", config100); redirectEntity("-//Mort Bay Consulting//DTD Configure//EN", config100); redirectEntity("-//Jetty//Configure//EN", config100); diff --git a/jetty-xml/src/main/java/org/eclipse/jetty/xml/XmlParser.java b/jetty-xml/src/main/java/org/eclipse/jetty/xml/XmlParser.java index 33c142481ec..b4297ae51b7 100644 --- a/jetty-xml/src/main/java/org/eclipse/jetty/xml/XmlParser.java +++ b/jetty-xml/src/main/java/org/eclipse/jetty/xml/XmlParser.java @@ -66,7 +66,7 @@ public class XmlParser */ public XmlParser() { - SAXParserFactory factory = SAXParserFactory.newInstance(); + SAXParserFactory factory = newSAXParserFactory(); boolean validatingDefault = factory.getClass().toString().contains("org.apache.xerces."); String validatingProp = System.getProperty("org.eclipse.jetty.xml.XmlParser.Validating", validatingDefault ? "true" : "false"); boolean validating = Boolean.valueOf(validatingProp).booleanValue(); @@ -83,11 +83,16 @@ public class XmlParser return _lock.lock(); } + protected SAXParserFactory newSAXParserFactory() + { + return SAXParserFactory.newInstance(); + } + public void setValidating(boolean validating) { try { - SAXParserFactory factory = SAXParserFactory.newInstance(); + SAXParserFactory factory = newSAXParserFactory(); factory.setValidating(validating); _parser = factory.newSAXParser(); @@ -129,6 +134,11 @@ public class XmlParser return _parser.isValidating(); } + public SAXParser getSAXParser() + { + return _parser; + } + public void redirectEntity(String name, URL entity) { if (entity != null) @@ -264,24 +274,16 @@ public class XmlParser entity = (URL)_redirectMap.get(pid); if (entity == null) entity = (URL)_redirectMap.get(sid); - if (entity == null) - { - String dtd = sid; - if (dtd.lastIndexOf('/') >= 0) - dtd = dtd.substring(dtd.lastIndexOf('/') + 1); - - if (LOG.isDebugEnabled()) - LOG.debug("Can't exact match entity in redirect map, trying {}", dtd); - entity = (URL)_redirectMap.get(dtd); - } + // Only serve entity if found. + // We don't want to serve from unknown hosts or random paths. if (entity != null) { try { InputStream in = entity.openStream(); if (LOG.isDebugEnabled()) - LOG.debug("Redirected entity {} --> {}", sid, entity); + LOG.debug("Redirected entity {} --> {}", sid, entity); InputSource is = new InputSource(in); is.setSystemId(sid); return is; @@ -291,6 +293,9 @@ public class XmlParser LOG.trace("IGNORED", e); } } + + if (LOG.isDebugEnabled()) + LOG.debug("Entity not found for PID:{} / SID:{}", pid, sid); return null; } diff --git a/jetty-xml/src/test/java/org/eclipse/jetty/xml/XmlConfigurationTest.java b/jetty-xml/src/test/java/org/eclipse/jetty/xml/XmlConfigurationTest.java index 54bb37cfe44..159350769bf 100644 --- a/jetty-xml/src/test/java/org/eclipse/jetty/xml/XmlConfigurationTest.java +++ b/jetty-xml/src/test/java/org/eclipse/jetty/xml/XmlConfigurationTest.java @@ -55,6 +55,7 @@ import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.xml.sax.InputSource; import org.xml.sax.SAXException; import static java.nio.charset.StandardCharsets.UTF_8; @@ -92,9 +93,12 @@ public class XmlConfigurationTest configuration.configure(); } - public static String[] xmlConfigs() + public static Stream xmlConfigs() { - return new String[]{"org/eclipse/jetty/xml/configureWithAttr.xml", "org/eclipse/jetty/xml/configureWithElements.xml"}; + return Stream.of( + Arguments.of("org/eclipse/jetty/xml/configureWithAttr.xml"), + Arguments.of("org/eclipse/jetty/xml/configureWithElements.xml") + ); } @ParameterizedTest @@ -1855,6 +1859,43 @@ public class XmlConfigurationTest assertThat(tc.testObject, instanceOf(ScheduledExecutorService.class)); } + public static Stream xmlSystemIdSource() + { + List ids = new ArrayList<>(); + + String[] schemes = {"http", "https"}; + String[] hosts = {"eclipse.org", "www.eclipse.org", "eclipse.dev", "www.eclipse.dev"}; + String[] paths = {"/jetty/configure.dtd", "/jetty/configure_9_3.dtd", "/jetty/configure_10_0.dtd"}; + + for (String scheme: schemes) + { + for (String host: hosts) + { + for (String path: paths) + { + ids.add(Arguments.of(String.format("%s://%s%s", scheme, host, path))); + } + } + } + + return ids.stream(); + } + + /** + * Test to ensure that all the XML System ID variants are covered in the + * {@link XmlConfiguration} internals. + */ + @ParameterizedTest + @MethodSource("xmlSystemIdSource") + public void testSystemIdVariants(String xmlSystemId) throws IOException, SAXException + { + // empty raw xml, just to instantiate XmlConfiguration, so we can access the XmlParser / ConfigurationParser. + XmlConfiguration xmlConfiguration = asXmlConfiguration(""); + XmlParser configurationProcessor = xmlConfiguration.getXmlParser(); + InputSource inputSource = configurationProcessor.resolveEntity(null, xmlSystemId); + assertNotNull(inputSource, "SystemID: " + xmlSystemId + " does not exist"); + } + private ByteArrayOutputStream captureLoggingBytes(ThrowableAction action) throws Exception { Logger slf4jLogger = LoggerFactory.getLogger(XmlConfiguration.class); diff --git a/jetty-xml/src/test/java/org/eclipse/jetty/xml/XmlParserTest.java b/jetty-xml/src/test/java/org/eclipse/jetty/xml/XmlParserTest.java index 764bd522441..00ae93a1e31 100644 --- a/jetty-xml/src/test/java/org/eclipse/jetty/xml/XmlParserTest.java +++ b/jetty-xml/src/test/java/org/eclipse/jetty/xml/XmlParserTest.java @@ -14,10 +14,17 @@ package org.eclipse.jetty.xml; import java.net.URL; +import javax.xml.parsers.SAXParser; +import javax.xml.parsers.SAXParserFactory; import org.junit.jupiter.api.Test; +import org.xml.sax.SAXException; +import org.xml.sax.XMLReader; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assumptions.assumeTrue; public class XmlParserTest { @@ -38,4 +45,32 @@ public class XmlParserTest assertTrue(testDocStr.startsWith("")); } + + /** + * Customize SAXParserFactory behavior. + */ + @Test + public void testNewSAXParserFactory() throws SAXException + { + XmlParser xmlParser = new XmlParser() + { + @Override + protected SAXParserFactory newSAXParserFactory() + { + SAXParserFactory saxParserFactory = super.newSAXParserFactory(); + // Configure at factory level + saxParserFactory.setXIncludeAware(false); + return saxParserFactory; + } + }; + + SAXParser saxParser = xmlParser.getSAXParser(); + assertNotNull(saxParser); + + XMLReader xmlReader = saxParser.getXMLReader(); + // Only run testcase if Xerces is being used. + assumeTrue(xmlReader.getClass().getName().contains("org.apache.xerces.")); + // look to see it was set at XMLReader level + assertFalse(xmlReader.getFeature("http://apache.org/xml/features/xinclude")); + } } diff --git a/pom.xml b/pom.xml index 4e25d8254b9..a08fc5e587d 100644 --- a/pom.xml +++ b/pom.xml @@ -8,7 +8,7 @@ Jetty :: Project The Eclipse Jetty Project pom - https://eclipse.org/jetty + https://eclipse.dev/jetty 1995 @@ -17,7 +17,7 @@ 11 11 false - https://www.eclipse.org/jetty/ + https://eclipse.dev/jetty/ benchmarks org.slf4j;version="[1.7,3.0)", org.slf4j.event;version="[1.7,3.0)", org.slf4j.helpers;version="[1.7,3.0)", org.slf4j.spi;version="[1.7,3.0)" UTF-8 @@ -28,17 +28,17 @@ 1.11.1 4.5.14 4.4.16 - 2.2.8 + 2.2.9 2.5.6 - 2.2.1 + 2.2.2 9.5 4.2.0 6.3.1 1.5 10.3.4 - 1.15 + 1.16.0 1.23.0 - 2.12.0 + 2.13.0 3.12.0 2.5.2 3.4.2 @@ -79,7 +79,7 @@ 1.2.5 2.2.1.Final 2.2.1.Final - 3.5.0.Final + 3.5.3.Final 2.1.19.Final 3.5.0.Final 1.1 @@ -102,10 +102,10 @@ 5.9.1 2.0.3 2.20.0 - 1.3.7 + 1.3.8 3.0.8 10.3.6 - 1.9.10 + 1.9.13 3.9.0 3.12.11 0.9.1 @@ -115,7 +115,7 @@ 1.2.0 2.1.1 4.0.0 - 4.0.0 + 4.0.2 2.0.5 2.1.1.RELEASE 1.2.5 @@ -123,7 +123,7 @@ 1.18.3 3.1.9.Final 1.6.0.Final - 2.2.0.Final + 2.2.1.Final 2.4.7 @@ -139,7 +139,7 @@ 3.1.0 3.6.0 5.1.9 - 3.2.0 + 3.3.1 3.3.0 3.11.0 3.6.0 @@ -148,19 +148,19 @@ 3.1.0 3.1.0 3.1.1 - 3.5.1 + 3.6.0 4.0.6 3.3.0 3.5.0 3.9.0 3.9.0 - 3.0.0 + 3.0.1 3.1.0 3.3.1 - 3.4.1 - 3.1.0 + 3.5.0 + 3.1.2 3.3.0 - 3.3.2 + 3.4.0 4.7.2.0 2.12.0 @@ -180,7 +180,7 @@ Eclipse Public License - Version 2.0 - https://www.eclipse.org/legal/epl-2.0 + https://www.eclipse.org/legal/epl-2.0/ Apache Software License - Version 2.0 @@ -839,10 +839,10 @@ asciidoctor-diagram - https://www.eclipse.org/jetty/javadoc/jetty-10 + https://eclipse.dev/jetty/javadoc/jetty-10 ${basedir}/.. - https://github.com/eclipse/jetty.project/tree/jetty-9.4.x - https://github.com/eclipse/jetty.project/tree/jetty-10.0.x-doc-refactor/jetty-documentation/src/main/asciidoc + https://github.com/eclipse/jetty.project/tree/jetty-10.0.x + https://github.com/eclipse/jetty.project/tree/jetty-10.0.x/documentation/jetty-documentation/src/main/asciidoc http://central.maven.org/maven2 ${project.version} ${maven.build.timestamp} @@ -2456,27 +2456,18 @@ Jetty Developer Mailing List - https://dev.eclipse.org/mhonarc/lists/jetty-dev/maillist.html - https://dev.eclipse.org/mailman/listinfo/jetty-dev - https://dev.eclipse.org/mailman/listinfo/jetty-dev - - - Jetty Commit Mailing List - https://dev.eclipse.org/mhonarc/lists/jetty-commit/maillist.html - https://dev.eclipse.org/mailman/listinfo/jetty-commit - https://dev.eclipse.org/mailman/listinfo/jetty-commit + https://www.eclipse.org/lists/jetty-dev/ + https://accounts.eclipse.org/mailing-list/jetty-dev Jetty Users Mailing List - https://dev.eclipse.org/mhonarc/lists/jetty-users/maillist.html - https://dev.eclipse.org/mailman/listinfo/jetty-users - https://dev.eclipse.org/mailman/listinfo/jetty-users + https://www.eclipse.org/lists/jetty-users/ + https://accounts.eclipse.org/mailing-list/jetty-users Jetty Announce Mailing List - https://dev.eclipse.org/mhonarc/lists/jetty-announce/maillist.html - https://dev.eclipse.org/mailman/listinfo/jetty-announce - https://dev.eclipse.org/mailman/listinfo/jetty-announce + https://www.eclipse.org/lists/jetty-announce/ + https://accounts.eclipse.org/mailing-list/jetty-announce @@ -2562,9 +2553,5 @@ Jetty Snapshot Repository https://oss.sonatype.org/content/repositories/jetty-snapshots/ - - jetty.eclipse.website - scp://build.eclipse.org:/home/data/httpd/download.eclipse.org/jetty/${project.version}/ -