Commit Graph

1457 Commits

Author SHA1 Message Date
Joakim Erdfelt 857e888e8b
Issue #5401 - Move HttpTester to jetty-http
+ leaving jetty-http-tools alone

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-10-07 14:50:31 -05:00
Joakim Erdfelt ad2446dd6c
Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-09-29 11:24:28 -05:00
Joakim Erdfelt 3423375a97
Issue #5357 - Updating to https://eclipse.org/ (#5358)
* Issue #5357 - Updating to https://eclipse.org/

 - Removing redundant <url> refs in pom.xml
 - Correcting bad indenting from merge
 - Correcting mailing list references
 - Correcting bugs.eclipse.org references
 - Correcting text file references
 - Correcting html references
 - Correcting further references
 - Correcting download.eclipse.org reference
 - Adding test for demo-base /proxy/current/
 - Ensuring jetty-client is included in javadoc-proxy.war/WEB-INF/lib

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-09-29 11:02:32 -05:00
Chris Walker 70c8822eef
Updated module descriptions for consistency. Resolves #5313 2020-09-23 13:10:47 -05:00
Lachlan df085a610f
Merge pull request #5248 from eclipse/jetty-10.0.x-5198-UpdateGzipHandler
Issue #5198 - update gzip handler
2020-09-21 10:41:16 +10:00
Greg Wilkins 780e1207c7
Issue #5254 List/Show modules (#5257)
* Issue #5254 List/Show modules

 * simplified --list-modules output
 * added --show-module

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

* improve module descriptions

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-09-14 18:07:16 +02:00
Greg Wilkins feb859e0e9 Issue #5215
Fixed gzip test as HEAD requests now have identical headers to GET.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-09-08 15:16:47 +02:00
Lachlan Roberts 7642be8fd0 Issue #4988 - make the MIME type comparison in GzipHandler case insensitive
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-09-07 17:29:13 +10:00
Joakim Erdfelt 4a0ffc2f73
Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-09-03 14:11:58 -05:00
Joakim Erdfelt a8ae3f9476
Issue #5185 - Add DoSFilter Listener to allow extensible behavior
+ Currently there's no way to respond to rejected/throttled/delayed
  requests that the DoSFilter impacts.
  A Listener has been added to allow for any behaviors needed
  by a user of the DoSFilter on requests that have been
  impacted by the DoSFilter.
+ Introducing OverLimit and RateType to DoSFilter internals

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-09-02 16:13:56 -05:00
Greg Wilkins 601710c9dc
Issue #5171 Simplify GzipHandler user-agent handling (#5196)
* Issue #5171 Simplify GzipHandler user-agent handling

+ Remove User-Agent handling from GzipHandler
+ Allow Vary header to be set
+ Create rewrite MsieRule to remove Accept-Encoding from IE<=6

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

* + Full implementation of HttpFields ensure
 + use for Vary field

* + fixed checkstyle

* + fixed test for merged header

* + fixed javadoc

* Issue #5171 Simplify GzipHandler user-agent handling

 + improved comments

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

* rename and testing after review
2020-08-26 23:55:36 +02:00
Jan Bartel 77779ed6d8
Issue #4996 - Regularlize logging (#5167)
* Issue #4996 Regularize logging

Signed-off-by: Jan Bartel <janb@webtide.com>

Co-authored-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-08-24 17:15:13 +02:00
Simone Bordet 16cd552995 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-08-11 21:00:43 +02:00
olivier lamy c198d26e6b Updating to version 10.0.0-SNAPSHOT 2020-08-11 16:47:55 +08:00
olivier lamy 429b091578 Updating to version 10.0.0.beta1 2020-08-11 16:47:54 +08:00
Simone Bordet d53d9d8a1d Fixes #5079 - :authority header for IPv6 address not having square brackets.
On the client:
* Origin.Address.host is passed through HostPort.normalizeHost(),
so that if it is IPv6 is bracketed.
Now the ipv6 address passed to an `HttClient` request is bracketed.
* HttpRequest was de-bracketing the host, but now it does not anymore.

On the server:
* Request.getLocalAddr(), getLocalName(), getRemoteAddr(),
getRemoteHost(), getServerName(), when dealing with an IPv6 address,
return it bracketed.
The reason to return bracketed IPv6 also from *Addr() methods is that
if it is used with InetAddress/InetSocketAddress it still works, but
often it is interpreted as a URI host so brackets are necessary.
* DoSFilter was blindly bracketing - now it does not.

Added a number of test cases, and fixed those that expected
non-bracketed IPv6.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-08-07 15:53:19 +02:00
Simone Bordet 089e51f0bc Fixes #5083 - Convert synchronized usages to AutoLock.
Updates after review.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-07-29 15:34:01 +02:00
Simone Bordet 8d69fc41a7 Fixes #5083 - Convert synchronized usages to AutoLock.
* Replaced relevant usages of synchronized with AutoLock.
* Made AutoLock serializable since classes that use it may be stored in the HttpSession.
* Added convenience methods to AutoLock to execute lambdas with the lock held.
* Introduced AutoLock.WithCondition to use a Lock and a Condition together.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-07-27 23:14:05 +02:00
Joakim Erdfelt fe9deae849 Updating to version 9.4.32-SNAPSHOT 2020-07-23 13:53:47 -05:00
Joakim Erdfelt 450ba27947 Updating to version 9.4.31.v20200723 2020-07-23 12:46:54 -05:00
Lachlan Roberts c09e4d6f86 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-07-16 08:46:29 +10:00
Lachlan Roberts de1b6745c5 the DO NOT EDIT comment in .mod files should start with '#'
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-07-15 16:47:22 +10:00
olivier lamy eefe3d202b revert fail release
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2020-07-10 15:04:22 +10:00
olivier lamy 9619a5a743 Updating to version 10.0.0.beta1 2020-07-10 14:23:28 +10:00
olivier lamy aaeffb719e Updating to version 10.0.0-SNAPSHOT 2020-07-09 12:25:34 +10:00
olivier lamy 23c99ffdbe Updating to version 10.0.0.beta1 2020-07-09 11:20:55 +10:00
Joakim Erdfelt 6df6fa33b8 Updating to version 9.4.31-SNAPSHOT 2020-06-11 08:24:34 -05:00
Joakim Erdfelt 271836e4c1 Updating to version 9.4.30.v20200611 2020-06-11 07:21:18 -05:00
Joakim Erdfelt 5d6f3e2ddc Updating to version 9.4.30-SNAPSHOT 2020-05-21 13:42:25 -05:00
Joakim Erdfelt 77c232aed8 Updating to version 9.4.29.v20200521 2020-05-21 12:04:14 -05:00
Joakim Erdfelt 1d734e1daf
Merge pull request #4779 from eclipse/jetty-10.0.x-4770-simplify-gzip-testing
Issue #4770 - Deprecate GzipTester
2020-05-05 09:54:23 -05:00
Simone Bordet 1c22de433b Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-05-04 19:11:26 +02:00
Joakim Erdfelt adeb6084b2
Issue #4770 - GzipHandler testing (Addressing PR review)
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-05-04 11:52:56 -05:00
Joakim Erdfelt f9a215f18d
Merge branch 'origin/jetty-10.0.x' into jetty-10.0.x-4770-simplify-gzip-testing 2020-04-28 11:33:31 -05:00
Greg Wilkins 8c7e34f37d
Jetty 10.0.x immutable meta data (#4777)
Made HttpURI, HttpFields and MetaData immutable.  The first two follow the same builder pattern and MetaData is constructor injection only.

* Immutable version of HttpFields

Preserve API and usage of HttpFields class while providing a read only interface and immutable implementation.

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

* Immutable version of HttpFields

Use an ArrayList in HttpFields. While slightly slower than the array, it will mostly be used as a builder pattern for an Immutable

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

* Immutable version of HttpFields

Fixed exception type.

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

* Immutable version of HttpFields

asImmutable method

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

* Immutable MetaData

Made HttpURIU immutable with a builder pattern.
MetaData immutable and working within http module.

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

* Immutable MetaData

Fixes from review

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

* Immutable MetaData

Passing tests upto and including jetty-server

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

* Immutable MetaData

Cleanup of HttpURI.Builder API as suggested in PR.

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

* Immutable MetaData

Added builder for MetaData.Request

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

* Immutable MetaData

more api fixes

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

* Immutable MetaData

WIP making HttpFiels itself immutable.  Currently working up to jetty-servlet.

Need to consider if content-length really is meta data and how much and when can we trust it.

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

* Immutable MetaData

WIP

Need to consider if content-length really is meta data and how much and when can we trust it. Also need to consider difference between h2 and h1 authority in metadata.

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

* Immutable MetaData WIP

jetty-client and jetty-servlet passing tests.

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

* Immutable MetaData WIP

Better align the style of immutability between `HttpFields` and `HttpURI`.
They both now have static build() and from() methods, plus Builder and Immutable implementations.
Potentially `Builder` could be renamed as `Mutable`

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

* Immutable MetaData WIP

http2-server tests passed

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

* Immutable MetaData WIP

http2-client tests passed

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

* Immutable MetaData WIP

cleann build?

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

* Immutable MetaData WIP

fix

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

* Immutable MetaData WIP

more test fixes

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

* Immutable MetaData WIP

Cleanups, mostly using EMPTY when appropriate.

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

* Immutable MetaData WIP

Cleanups, use immutable

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

* Immutable MetaData WIP

No trailers for connect

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

* Immutable MetaData WIP

Fix CONNECT path handling

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

* Immutable MetaData WIP

fixed rewrite query handling

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

* Immutable MetaData WIP

rename Builders to Muttables

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

* Immutable MetaData WIP

misc cleanups

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

* Immutable MetaData WIP

Revert to using arrays due to garbage generated by streams and iterators (12% of a simple benchmark!).
Even if this garbage is an artifact of the JIT being disabled by observation, it can hide other allocations, so best to just use simple arrays!

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

* Immutable MetaData WIP

More optimizations and better test coverage.

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

* Immutable Metadata

various cleanups

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

* Immutable MetaData WIP

More optimizations

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

* Immutable MetaData WIP

review changes

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

* Immutable MetaData WIP

changes after review:
 + less usage of Mutable
 + more usage of EMPTY
 + restored fragment handling

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

* Immutable MetaData WIP

changes after review:
 + less usage of Mutable
 + less usage of asImmutable

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

* Immutable MetaData WIP

changes after review:
 + less usage of Mutable

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

* Immutable MetaData

changes after review:
 + better handling of URI in ContextHandler

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

* Immutable MetaData

changes after review:
 + downcast in test to access mutable response headers.

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

* Immutable MetaData

changes after review:
 + use put instead of add for one time headers

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

* private

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-04-28 13:36:44 +02:00
Joakim Erdfelt 1d1dbf6085
Issue #4770 - Testcase fixes
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-04-21 06:02:04 -05:00
Joakim Erdfelt aa702c06bd
Issue #4770 - Deprecate GzipTester
+ Renamed TestDirContentServlet to AbstractFileContentServlet
+ Renamed various TestServlet*Write classes to BlockingServlet*Write to better
  represent their purpose.
+ Renamed TestServletBufferTypeLengthWrite to HttpOutputWriteFileContentServlet
+ Cleaned up GzipContentLengthTest to be one big ParameterizedTest
  - now does Internal vs External GzipHandler testing too.
+ Introduced AbstractGzipTest to house simple common methods
+ Cleanup remaining testcases

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-04-15 12:30:02 -05:00
Simone Bordet 509f5791ff Issue #4765 - Review GzipHandler inside ServletContextHandler.
Restored IncludedGzipTest.
Fixed ServletContextHandler.relinkHandlers(), now excluding
the checks for GzipHandler.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-04-14 12:39:19 +02:00
Simone Bordet e17d0f4e98 Issue #4765 - Review GzipHandler inside ServletContextHandler.
Fixed test failures.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-04-13 23:54:31 +02:00
Joakim Erdfelt 5699b9ff3d Updating to version 9.4.29-SNAPSHOT 2020-04-08 13:15:04 -05:00
Joakim Erdfelt ab228fde9e Updating to version 9.4.28.v20200408 2020-04-08 12:33:56 -05:00
Joakim Erdfelt 43419802b7
Issue #4685 - Declare <scope> for jetty-slf4j-impl everywhere
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-03-20 11:12:08 -05:00
Joakim Erdfelt 9492a5379c
Issue #4685 - eliminate <version> in jetty-slf4j-impl
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-03-20 10:42:36 -05:00
Joakim Erdfelt 57604d0955
Issue #4572 - Mechanical Change to use org.slf4j
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-03-16 15:48:25 -05:00
Joakim Erdfelt 8b7e64915f
Issue #4572 - Replace Jetty Logging with SLF4J
* Introducing jetty-slf4j-impl
* Make Jetty use org.slf4j
* Removed most of org.eclipse.jetty.util.log classes
* Left org.eclipse.jetty.util.log.Log and
       org.eclipse.jetty.util.log.Logger but as
  simple bridge classes that are deprecated
* Migrated code using org.eclipse.jetty.util.log.StacklessLogging
  to org.eclipse.jetty.logging.StacklessLogging found in
  the jetty-slf4j-impl
* Moved logging start modules from jetty-util to jetty-home
* Simplified logging start modules
* Updated code that was using StdErrLog directly
* Updating module-info.java for org.slf4j
* removing org.eclipse.jetty.util.log.class references
* jetty-start supports manually declared default provider
  + and we use it to default "logging" to the "logging-jetty" provider
* Cleaning up jetty-maven-plugin and IT testing for Logging
* Using old slf4j for it testing
* Updating compiler config to show Xlint:exports warnings
* Updating console-capture and logging-noop
* Adding slf4j bridge (capture) jetty modules
* Updates to jetty logging module locations
* Changing reference to slf4j dependent mod
* Process requested enabled modules in topological order
* Limiting inclusions in shaded jetty-start
  + Also adding note to jetty-util classes that are used by
    jetty-start
* Default logging level on baseline logging config is INFO (not DEBUG)
* Changing from system to server classes in logging
* Updating other modules to use new logging names

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-03-16 11:21:54 -05:00
Denny Abraham Cheriyan ce8d2ef168 Refactor CrossOriginFilter with small perf improvements (#4672)
* Refactor CrossOriginFilter

Signed-off-by: Denny Abraham Cheriyan <dennyac@gmail.com>

* Fix checkstyle violation

Signed-off-by: Denny Abraham Cheriyan <dennyac@gmail.com>
2020-03-16 10:23:04 +01:00
Denny Abraham Cheriyan fb00422fca
Refactor CrossOriginFilter with small perf improvements (#4672)
* Refactor CrossOriginFilter

Signed-off-by: Denny Abraham Cheriyan <dennyac@gmail.com>

* Fix checkstyle violation

Signed-off-by: Denny Abraham Cheriyan <dennyac@gmail.com>
2020-03-16 10:21:00 +01:00
Joakim Erdfelt 8aabb52557 Updating to version 9.4.28-SNAPSHOT 2020-02-27 13:03:44 -06:00
Joakim Erdfelt a304fd9f35 Updating to version 9.4.27.v20200227 2020-02-27 12:21:57 -06:00
Joakim Erdfelt 56fc476d55 Updating to version 9.4.27-SNAPSHOT 2020-01-17 07:00:10 -06:00