Commit Graph

650 Commits

Author SHA1 Message Date
Ludovic Orban 177bafbace #9078 make HttpContent.getByteBuffer() implementations return new ByteBuffer instances and document that contract
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-01-10 10:18:55 +01:00
Simone Bordet 8d6734cf78
Fixes #9141 - Thread-safe Content.Chunk#slice (#9142)
* Fixes #9141 - Thread-safe Content.Chunk#slice

* Changed Content.Chunk.slice(int, int, boolean) to have the same parameters as ByteBuffer.slice(int, int) for consistency.
* Updated Chunk.slice(int, int, boolean) javadocs.
* Update code that was calling Chunk.slice(int, int, boolean).

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-01-10 09:49:39 +01:00
Joakim Erdfelt b4d274e3d3
Remove `@Disabled` from `jetty-jmx` (#9143)
* Remove @Disabled from jetty-jmx
2023-01-09 15:20:55 -06:00
Joakim Erdfelt 8db7101862
Fixing TypeUtilTest expectation 2023-01-09 10:07:33 -06:00
Joakim Erdfelt ebd45ebb74
Renaming TypeUtilTest.TestClass to .ExampleClass to avoid junit picking it up 2023-01-09 09:42:40 -06:00
Ludovic Orban f14c0a5002
Jetty 12.0.x h2c perf improvement: implement equals/hashcode in Stream (#9077)
implement equals/hashcode in H2Stream

Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-01-09 10:37:20 +01:00
Greg Poulos 1dc175efac
Jetty 12.0.x documentation (#9096)
* fix broken include
* fix demo module example
* add documentation markup to fix documentation build error
* editorial suggestions for installation instructions
* editorial suggestions for quickstart guide
* fix unresolved directive errors
* fix file not found exception thrown during doc build
* editorial suggestions for deployment quickstart, plus some fixed references
* Update documentation/jetty-documentation/src/main/asciidoc/operations-guide/begin/start.adoc

Co-authored-by: Simone Bordet <simone.bordet@gmail.com>
2023-01-06 17:21:46 +01:00
Joakim Erdfelt 250c9409fa
Remove @Disabled on ResourceTest 2023-01-04 14:27:55 -06:00
Joakim Erdfelt c26538ba86
Remove @Disabled on SerializedInvokerTest 2023-01-04 14:27:29 -06:00
Joakim Erdfelt eb8152094d
Remove @Disabled on LifeCycleListenerNestedTest 2023-01-04 14:26:19 -06:00
Joakim Erdfelt 4c1843f2fb
Renaming TestConfiguration to ExampleConfiguration.
+ Name changed to avoid it being picked up by junit runners as a Test case (which this class is not)
2023-01-04 09:33:03 -06:00
Joakim Erdfelt 94ddbbfddd
Removing QueueBenchmarkTest (it should exist as a jmh test anyway) 2023-01-04 09:30:13 -06:00
Joakim Erdfelt f3cbe80395
Removing @Disabled microbenchmark from BufferUtilTest 2023-01-04 09:29:50 -06:00
Joakim Erdfelt ccce29dde8
Removing @Diabled from SocketChannelEndPointTest 2023-01-04 09:27:31 -06:00
Ludovic Orban fcbdab8b3e
Rework client content listeners (#8981)
* Removed DemandedContentListener
* Updated AsyncContentListener signature
* Updated documentation

Signed-off-by: Ludovic Orban <lorban@bitronix.be>
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Co-authored-by: Simone Bordet <simone.bordet@gmail.com>
2023-01-04 11:01:18 +01:00
Joakim Erdfelt f1b8bf5663
Merge pull request #9122 from eclipse/fix/jetty-12.0.x/remove-client-usage-class
Jetty 12 : Removing client `Usage.java` as the examples have been moved to documentation
2023-01-03 13:29:33 -06:00
Simone Bordet ebbdda61bc
Replaced try/catch with MathUtils.cappedAdd().
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-01-03 18:56:50 +01:00
Joakim Erdfelt c2f04f5efc
Merge pull request #9117 from eclipse/fix/jetty-12.0.x/enable-connectionpooltest
Removing `@Disabled` from `ConnectionPoolTest`
2023-01-03 11:10:43 -06:00
Joakim Erdfelt 8abebdbe17
Removing client Usage.java as the examples have been moved to documentation 2023-01-03 11:07:53 -06:00
Dr. Christian Kohlschütter 360bd2ea0a
core: util: TypeUtil: Use method references instead of reflection (#9115)
* core: util: TypeUtil: Use method references instead of reflection

TypeUtil currently uses reflection to convert Strings to primitive/boxed
basic types.

This may not only be a performance problem, but it also prevents
environments like GraalVM native-image to detect required methods
without the help of an agent.

Use method references (Boolean::valueOf, etc.) instead.

Signed-off-by: Christian Kohlschütter <christian@kohlschutter.com>
2023-01-02 14:54:27 -06:00
Joakim Erdfelt 6a942f66d9
Removing @Disabled from HttpCookieTest 2023-01-02 14:31:29 -06:00
Joakim Erdfelt e5a6622f37
Removing @Disabled from ConnectionPoolTest 2023-01-02 11:55:22 -06:00
Greg Wilkins 838091d2be
Alternate DelayedHandler & ThreadLimitHandler implementations #9051 (#9056)
* Improved javadoc
* Refactored ThreadLimitHandler to avoid lambda creation and to always execute
* Refactored DelayedHandler to avoid lambda creation and to execute only if needed
* added modules for the DelayedHandler

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Signed-off-by: Greg Wilkins <gregw@webtide.com>
Co-authored-by: Simone Bordet <simone.bordet@gmail.com>
2022-12-24 10:49:29 +11:00
Lachlan 0e95953be3
Merge pull request #9043 from eclipse/jetty-12.0.x-httpcontentFactoryCleanup
Create StaticHttpContentFactory and other cleanups
2022-12-23 22:54:38 +11:00
Greg Wilkins 3d4bb492d0 Improved test coverage 2022-12-22 09:51:14 +11:00
Greg Wilkins 2a5fd34716 Suppress expected stack 2022-12-22 09:24:40 +11:00
Greg Wilkins 81b5fa61cf Avoid using `formatted` in getId 2022-12-22 09:22:29 +11:00
Joakim Erdfelt 0485fdf2f3
Fixing FileID.getFileName when dealing with opaque URIs 2022-12-21 14:51:28 -06:00
Joakim Erdfelt ff48442fa0
Narrowing in on possible bug in jar:file:// handling of Resource.getFileName() 2022-12-21 14:39:20 -06:00
Joakim Erdfelt fe74264ecc
Simpler TreeTrie.isEmpty() method (#9075)
Avoid creating (Key)Set to just test for empty.
More test cases
2022-12-21 12:46:08 -06:00
Joakim Erdfelt ce52ffdd33
More meaningful .toString() implementations 2022-12-21 12:14:07 -06:00
Joakim Erdfelt e753f35965
Adding more LOG.debug() 2022-12-21 12:04:22 -06:00
Jan Bartel 1abaeb6cee
Jetty 12.0.x osgi (#9068) 2022-12-21 08:12:44 -06:00
Joakim Erdfelt e9ec1f423c
Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x 2022-12-20 12:56:27 -06:00
Joakim Erdfelt c7e866562f
Enable all jetty-deploy tests (#9058)
* Enable all jetty-deploy tests
2022-12-20 11:40:49 -06:00
Greg Wilkins 12d66f083a Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x 2022-12-20 11:20:39 +11:00
Jan Bartel 721a4c74fa
Jetty 12.0.x ee10 convert cookie (#9057)
* Convert HttpCookie -> Cookie based on compliance mode.
* Fix max-age
* Fix old cookie handling; getCookies return null instead of empty list
2022-12-20 10:22:38 +11:00
Greg Wilkins c18e790858
Jetty 12 handler as boolean processor (#9035)
Alternative Handler architecture.

All Handlers are Processors, which now return a boolean to indicate the request has been accepted.
The request/response/callback are no longer modal, so there is no race with the boolean return.

Optimized PathMappings.
Avoid iterations if only ServletPathSpec instances
Avoid tests for empty mappings.
Better reset implementation
Improve suffix matching
Improve exact matching

Renamed HttpStream.getNanoTimeStamp() to getNanoTime().

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Co-authored-by: Simone Bordet <simone.bordet@gmail.com>
2022-12-19 16:02:26 +01:00
Lachlan Roberts 06f9e5ec18 Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.0.x-httpcontentFactoryCleanup 2022-12-19 21:46:05 +11:00
Greg Wilkins c55938c3fa Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x 2022-12-17 10:29:34 +11:00
Lachlan Roberts 0f1420fbd7 changes from review
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-12-16 17:17:12 +11:00
Joakim Erdfelt 3c4fdad9ce
Enable ExternalSiteTest 2022-12-14 13:43:25 -06:00
Joakim Erdfelt 1cecf13575
Enable ConscryptHTTP2ClientTest 2022-12-14 13:36:59 -06:00
Lachlan Roberts a5817144f6 fix HttpContent.Factory config in ResourceHandlerTest
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-12-14 18:16:32 +11:00
Simone Bordet e16b7948b2 Fixes #9038 - Jetty 12 - Review EE10 Http[Input|Output].Interceptor APIs
Removed HttpInput.Interceptor and HttpOutput.Interceptor.
Simplified AsyncContentProducer.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-12-13 15:33:27 +01:00
Lachlan Roberts 60656ebb72 make stylesheet final in StaticHttpContentFactory
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-12-13 10:48:06 +11:00
Lachlan Roberts 9270e62f78 rename of StaticHttpContentFactory
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-12-13 10:44:35 +11:00
Lachlan Roberts abc40afd89 cleanups for HttpContent Factories
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-12-13 09:55:55 +11:00
Ludovic Orban 150cad510f improve javadoc and testing + generously comment the surprising implementation
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-12-09 19:25:50 +01:00
Simone Bordet d3a0aa281b
Fixed flaky test MultiPartRequestContentTest.
The problem was that sometimes content bytes generated randomically ended with \r, confusing the multipart parser.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-12-09 15:58:57 +01:00