Commit Graph

1658 Commits

Author SHA1 Message Date
Joakim Erdfelt 5095c8a7b2 Issue #3288 - Correcting Jetty WebSocket API artifactIds
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-01-23 15:58:11 -06:00
Greg Wilkins 4f65799a7b
Merge pull request #3222 from eclipse/jetty-10.0.x-3167-websocket-mapping
Jetty 10.0.x #3167 refactor websocket mapping
2019-01-16 09:13:42 +11:00
Simone Bordet 64edaff68a Fixes #2095 - Remove FastCGI multiplexing.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-01-11 11:56:42 +01:00
Greg Wilkins 9b0c8336ba Merge branch 'jetty-10.0.x' into jetty-10.0.x-3167-websocket-mapping
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-01-10 08:34:33 +11:00
olivier lamy 63f2023e05 happy new year!!
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2019-01-01 12:17:53 +10:00
Greg Wilkins 729bf8299c Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-10.0.x-3167-websocket-mapping
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-12-23 13:51:01 +11:00
Olivier Lamy f5eb4864cc
Issue #3166 Jetty 10.0.x autobahn test ci (#3221)
*  issue #3166 add autobahn test

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2018-12-22 21:16:23 +10:00
Greg Wilkins 27a0adf94a Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-10.0.x-3167-websocket-mapping
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-12-22 10:33:05 +11:00
Greg Wilkins 8c7c5a5d01 Issue #3167 Improve websocket initialization
Improve on #3167 with major refactor of the context initialization of
websocket:
  + The Javax and Jetty sides are more symmetric - both use shared
    filter and mapping.
  + Regularised usage of beans rather than attributes for ws components
  + Customization is now part of the mapping, so ws are configured by
    how they were mapped and not by who does the upgrade.
  + Filter still can be configured to customize defaults
  + Servlet can be configured to customize any ws mappings added via the
    servlet

There is still some strangeness as the WebSocketServlet is mostly
generic, yet can only map Jetty API websockets.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-12-22 10:30:37 +11:00
olivier lamy bd4933b33c Merge branch 'jetty-9.4.x' into jetty-10.0.x 2018-12-21 21:48:36 +10:00
Jan Bartel 4abc4f8dd4 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2018-12-19 10:54:41 +11:00
Greg Wilkins 503bd71d4c Issue #3202
Handle async cross context session completion
2018-12-18 16:00:46 +11:00
Greg Wilkins 06bbab50f9 Issue #3202
Handle async cross context session completion
2018-12-18 14:07:16 +11:00
Jan Bartel 34b6ecec6c Issue #3202 Ensure sessions created during async are cleaned up.
Signed-off-by: Jan Bartel <janb@webtide.com>
2018-12-18 09:32:12 +11:00
Greg Wilkins 1176b267b5 removed -impl from websocket name and fixed SCI
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-12-13 10:05:10 +11:00
Greg Wilkins e8d468b3e1 work in progress
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-12-05 14:45:23 +01:00
Greg Wilkins 81ca90b1f6 Issue #113
Deletes the deprecated NcsaRequestLog classes
Updates modules to use CustomRequestLog by default
Move jetty-customrequestlog.xml from home to base

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-12-01 16:31:23 +01:00
Greg Wilkins bbc7037171 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2018-11-29 11:06:49 +01:00
Greg Wilkins e7d4f55891 Issue #113
Use CustomRequestLog in examples.
Convenience constructors

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-11-29 10:13:12 +01:00
Greg Wilkins 720e561008 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2018-11-29 09:32:50 +01:00
Jan Bartel 506e4dc682 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2018-11-23 16:45:32 +01:00
Jan Bartel 4e672c6b27
Issue #2646 - Better handle concurrent calls to change session id and invalidate within a context (#2670)
* Issue #2646 handle concurrent invalidate/changeid calls

Signed-off-by: Jan Bartel <janb@webtide.com>
2018-11-23 16:15:27 +01:00
Greg Wilkins f820a57d7e Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2018-11-22 17:57:47 +01:00
Simone Bordet 5f972b451c
Jetty 10.0.x 2978 add module info (#3120)
Fixes #2978 - Add module-info to relevant Jetty modules.

Added module-info.java for Jetty modules that are not test modules.
Moved jetty-http test utility classes to new module "jetty-http-tools".
Removed generation of test-jar from websocket-core.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-11-22 12:37:35 +01:00
olivier lamy 33eccf82dc remove non used test-dispatch-webapp
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2018-11-21 15:56:39 +10:00
olivier lamy 7d5ed3089c jmh test has been moved in 10.0.x
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2018-11-21 14:39:08 +10:00
Joakim Erdfelt 29fd18e046 Updating to version 9.4.15-SNAPSHOT 2018-11-14 16:42:40 -06:00
Joakim Erdfelt c4550056e7 Updating to version 9.4.14.v20181114 2018-11-14 15:19:10 -06:00
Simone Bordet aaa9a1e410 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2018-11-13 18:12:16 +01:00
Simone Bordet f2ed692a1b
Merge pull request #3099 from eclipse/jetty-9.4.x-HttpClient-dump-improvements
Fixes Issue #3103 - HttpClient buffer leak found by dump improvements

The leak problem was an additional, unnecessary, call retain() in ResponseNotifier.notifyContent() that was leaking `ByteBuffer`s.
2018-11-13 18:04:17 +01:00
Jan Bartel 1845e6ea48
Issue #39078 Duplicated programmatic listeners. (#3101)
Signed-off-by: Jan Bartel <janb@webtide.com>
2018-11-13 14:29:12 +01:00
Greg Wilkins d0afc63cd5 Fixing HttpClient tests to configure before start 2018-11-13 14:22:19 +01:00
Joakim Erdfelt a903017f5f Updating to version 9.4.14-SNAPSHOT 2018-11-11 21:06:50 -06:00
Joakim Erdfelt 49123a3313 Updating to version 9.4.13.v20181111 2018-11-11 20:02:42 -06:00
Jan Bartel 5f94f249a7 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2018-11-06 10:29:10 +01:00
Jan Bartel 871f73cdf6
Jetty 9.4.x 2932 switchable classloader for session attribute values (#2964) 2018-11-06 10:03:48 +01:00
Greg Wilkins 9003a0fd69
Jetty 10.0.x websocket refactor (#3055)
* Adding more todos
* More websocket test updates
* Adding more information to exception about mismatched hash
* AcceptHash improved testing
* Prevent duplicate request headers
* Removing ability to use LocalFuzzer entirely (until its fixed)
* JSR356 HandshakeResponse header modifications are now allowed during Configurator
* Correcting MessageSink creation
* Using proper sub-protocol
* Metadata remembers OnMessage.maxMessageSize now
* Minor test updates
* Issue #2172 - Fixing JSR-356 Decoder discovery and OnMessage wiring
* More websocket test updates
* Update for null/empty payload
* Partial String Message Sink fix
* More websocket fixes around InputStream handling
* Moving proposed Abstract FrameHandler hierarchy into core main
* More testing fixes, along with a change to use the new core Abstract*FrameHandler
* Adding WebSocket URI validation
* Updating copy found in other API with improvements made in first API.
* More websocket test updates
* Fixing compilation
* WebSocket test fixes
* Fixing ContinuationTest assertions
* fixed package
* Added some better examples of QuotedCSV
I think this test is trying to use QuotedCSV in the wrong way, as it often is offering values when it should be testing parameters.
I have added some examples to show that QuotedCSV is capable of handling the quotes, spaces and embedded commas of the tests, but only
for parameters and not for values.   The question is, is this sufficient for websocket?
* Improve close handling
The handling of a Close Frame may close the endpoint, so parsing should not continue
* moved old AbstractFrameHandler to test
* implement ingoing and outgoing frame sequence checking
* More work on javax.websocket parameterized server
* Bumping up pom plugin versions to jetty-9.4.x standards
* Merging up Jenkinsfile to attempt to fix CI build issues
* JSR356 @PathParam testing
* More WebSocket testing updates
* More WebSocket testing updates
* WebSocket Idle Timeout from FrameHandler specific policy
* WebSocket/JSR Pong support
* WebSocket/JSR Correcting MessageHandler.Whole<PongMessage> handling
* URL Decode UriTemplatePathSpec values
* Fixing test expectations
* Fixing AbstractWholeMessageHandler buffer flip
* More websocket test fixes
* Updated ALPN version for JDK 8u181.
* Removing QuotedUtil from WebSocket-core
+ Moved to QuotedCSV for most usages
+ Introduced HeaderUtil to satisfy remaining use cases
* Review of HttpClient names and Thread names.
+ Javax WebSocket Server = "Javax-WebSocketServer@####"
+ Javax WebSocket Client = "Javax-WebSocketClient@####"
* added OpCodeTest.java
* Minor Frame cleanup
* MessageOS cleanup
* Made the OpCode of WebSocket Frame immutable.
Frames can no longer be set as a continuation and should now be copied using the ContinuationFrame constructor
DataFrames can no longer be created without one of the subclasses as the public constructor was removed in favour of newDataFrame method
* Chat test
* Work on Chat Test
Moved implementation of assertValid to WebSocketFrame
Removed getFinRsvOp
* removed constructors for DataFrame using a basedOn Frame
instead use constructors with opCode, payload and fin bit
* refactor of WebSocket Frames WIP
* WIP: resolved failing tests
* CloseStatus rework, now use CloseStatus.toFrame to create Close Frames
new DelegateFrame class which ReadOnlyFrame extends
trim utf8 byte array in CloseStatus to utf8 character boundaries only
* working on test to test socket io erros in websocket-core
* renaming for clarity
Gave up on maintaining old names, as this is a different package anyway so some adaption will be needed regardless.
* Moved AbstractFrameHandlers to common
Only have a AbstractTestFrameHandler in core
* Close uses CloseStatus
Reduced the parsing and generation of CloseStatus when closing
* merge
* work on WebSocketTest
* cleanup log
* wip
* files missing comment header
jetty-jmh was using 9.4.12-SNAPSHOT now using 10.0.0-SNAPSHOT
* thread names
* remove sequence check from parser
* minor cleanups
* Call frameHandler externally to parser
* OpCode.check now throws ProtocolException instead of returning boolean
changed ProtocolException messages in OpCode.check
* removed Frame.Type and use OpCode instead
separated out FrameValidation for parser into method in WebSocketChannel
* moved remaining frame validation checks into WebSocketChannel
* referenced counted buffer
* cleanups
* wip on demand side
* First attempt at demandable
* demand control
* clean up reference counting
* clean ups
* WebSocketServerTest
* wip
* fixed auto fragmentation
* simple demand test
* test demand and retain
* Added validation back into the Parser
split up validation in WSChannel into methods for incoming and outgoing
fixed various tests in websocket-core
* more tests
* fixed remaining tests failing due to the changes to frame validation
* cleanups
* more autobahn refixes
* adjust mask for auto fragments
* clear mask
* fully close on unrecoverable error and not wait for close response
* Removed the CoreFuzzer and ContinuationTest
These tests are now covered elsewhere.
* remove declared exception onClosed
* Test delay close
* Test handler close
* fixed test dependency
* moved the frame sequence check from OutgoingState from after the ExtensionStack to channel.sendFrame
changed error handling to fail the callback of invalid/outOfSequence frames
added WebSocket Close tests revealing some problems with demand in state ICLOSE
* cleanup
* timing issues with WebSocketCloseTest
* test cleanups
* Cancel demand on close
* removed frame validation from generator
* finished close testing
* Issue #2901 - Moving Http Upgrader to Http Conversation
+ Solves for Authentication and Redirect
* changes from #2902 to jetty-10.0.x
* Validation Extension
introduced a ValidationExtension to do frame validation in the ExtensionStack
added the WebSocketChannel to ExtensionStack.connect to set it on the Extensions
* added parameters for ValidationExtension to choose what to validate
* ValidationExtension Cleanup
ValidationExtension now uses the Validation methods from its WebSocketChannel
simplified the parameter passing to the ValidationExtension
* core cleanup
* Fixed intermittent test failures
* clean up duplicates and imports
* simplified package structure
* many cleanups, simplifications and duplication removal
* cleanup
* added utf8 validation for text frames into ValidationExtension
added tests for utf8 validation
* create ValidationExtensionTest
* cleanup
* merge with jetty-10
update websocket to junit5
* fix to autobahn client report directory
* Fixes and cleanup
Fixed initial buffer too large for websocket buffer
less verbose debug
better debug
* Removed behavior from policy
* cleanup after merge from hell
* bug fixes and cleanups
* refactor packages with JPMS in mind
* unit test for TextMessageHandler
* cleanups
* more cleanups
* provided client/server dependencies
* fixed bad refactor
* use lambdas for TextMessageHandler
* cleanup
* cleanup
* cleanups
* cleanup of websocket-common framehandlers
* reverting to jetty websocket api from 9.4
* better chat
* renamed websocket common to util
* save wip on jetty-websocket-tests
* giving up on jetty-websocket-tests as mostly duplicated tests
* renamed websocket-util back to websocket-common
* moved InvalidWebSocketException to javax common
* reworked TextMessageHandler to MessageHandler
now handles binary messages as well
* implemented getByteBufferPool in remaining DummyChannel classes
* Moved the abstract Frame and Message handlers out of websocket-common
* replaced usages of AbstractWholeMessageHandler with CoreMessageHandler
renamed MessageHandler to CoreMessageHandler
* removed AbstractFrameTypeHandler
* cleanup
* jetty-websocket-common passing tests without websocket-common dependency
* fixed compile errors
* renamed MessageHandler
* Removing reference to websocket-server (no longer exists)
* Removing, Extensions now exist in websocket-core
* Do not append an empty ByteBuffer
* NPE Fix for empty/unused UTF-8 String Builder
* NPE Fix for SendPartialBinaryFrameHandler test
* Punching holes in WebAppContext needed for JSR356 use
* Updating "9.x.x" to "10.x.x"
* Removing Bad URI test case that is ignored
* Fixing test expectation now that we moved to QuotedCSV
* Adding TODO about onOpen failure requiring onError + onClose.
* Throwing JSR356 DeploymentException on addEndpoint() failure
* Test cleanup (for better error messages)
* Adding some comments to explain wrapNonVoidReturnType()
* cleanup methodHandle return type filtering
* test fixes
* Fix change return type to Void
* Fixed test by wiring up MessageHandler
* test cleanups
removed changeReturnType for MethodHandle as filterReturnValue already changes to return type of the filter
* fixed MessageReceivingTest.testPartialBinaryFrameHandler
* Core BatchMode replaced by boolean
* fixed LargeContainerTest.testEcho by allowing the policy to be set on the WSServer as an attribute
* acquire batchBuffer before calculating batchSpace in FrameFlusher
* Deprecated WebSocketPolicy
* Fixing MessageReceivingTest
* Refactoring out websocket-servlet
+ WebSocketPolicy removed from websocket-servlet
+ websocket-common is removed
+ Migrating back up to APIs
* WIP removing core policy
* added missing copyright headers
* customize client session
* customize cleanup
* wip
* wip
* Removing WebSocketPolicy usage within websocket-core
* Allowing DummyCoreSession to have a Behavior
* Removing core WebSocketPolicy.clonePolicy() - no longer used
* Jetty Native WebSocket now compiles / tests
* Remember WebSocketServletFactoryImpl as Context Attribute
* JSR356 codebase now compiles
* updated websocket servlets
* fix handling for no max message size
* Fixed LargeContainerTest.testEcho
Changed WebSocketServletFactoryImpl.defaultAutFragment to true
only check the incoming frame size if autoFragment is false
* Added WebSocketConstants to avoid duplicate default locations
* applications extensions discovered via headers
* fixed ConfiguratorTest.testNoExtensionsConfigurator
* cleaned up extension negotiation
* cleaned up extension negotiation
* cleanups
* Convert exceptions to API versions
* cleanup imports
* convert requestURI to a WebsocketURI in Negotiated
* fixed SessionTrackingTest
* moved session tracking management to be done by the JavaxWebSocketFrameHandler
* Cleanup dump for jdk11 classloaders
* fix to ConfiguratorTest
added the EchoSocket endpoint on the ServerContainer instead of using server.registerWebSocket
* Simplify websocket-servlet
    fixed jetty websocket chat example
    fixes for javax websocket chat example
    fixed Upgrade response header issues
    Set default configurations
    improved dump
    depends on javax server impl
    do not expose core classes
    fix javadoc
    removed FrameHandlerFactory self reference
* Removed -impl from javax client and server
* Fixed common tests for onClosed event
* Improve creation of JavaxWebSocketServerContainer
Better handling of executor and httpClient as managed beans
* Fixed MessageOutputStream using empty buffers and looping forever
no longer enforce maxTextMessageBufferSize on partial messages
* Updates after review
reintroduced WebSocketServletFactory
reverted other API changes
* Ignored TextStreamTest tests incorrectly assuming no frame fragmentation
When message fragmentation is implemented in PartialStringMessageSink
then update these tests to check on the server side for no buffers
larger than the maxTextMessageBufferSize.
* fixed check for previous WebsocketUpgrade filter
Disable the AltFilterTest until problems of the WebSocketUpgradeFilter
attributes on the ServletContext are fixed.
* fixed flaky SessionTrackingTest by waiting for Sessions to open
* remove payload length check for outgoing frames
fix bug sending frames after they have failed validation checks
* reverted maven coords for javax client and server
* updated to latest jetty-10 dump changes
* Fix to WebSocketUpgradeFilter Attributes on the ServletContext
Removed deprecated method
WebSocketUpgradeFilter.configureContext(ServletContext)
Changed return type of
WebSocketUpgradeFilter.configureContext(ServletContext) to void.
WebSocketUpgradeFilter.configureContext was checking the ServletContext
for a WebSocketUpgradeFilter set as an attribute before creating a new
one. The FilterHolder from web.xml is being set as an attribute in init
which is called which happens after configureContext.
So instead of checking the attribute in
WebSocketUpgradeFilter.configureContext, we are now searching through
the filters on the ServletHandler to see if a WebSocketUpgradeFilter
has been registered with the CONTEXT_ATTRIBUTE_KEY.
* cleanup and identifying problems with FrameHandlerMetadata
* properly cache Metadata and copy MessageMetadata
properly cache Metadata in the FrameHandlerFactory using the metadataMap
copy the MessageMetadata from Metadata to prevent mutating the MethodHandle
* added new WebSocketServerContainerExecutorTest
removed DelayedStartClientOnServerTest which doesnt seem to be a valid
test when executors are shared
removed last check for executor==null in JavaxWebSocketServerContainerInitializer
as the threadPool is always created in the server
* reformatted websocket code
* reformat code
* Rervert unnecessary changes from 10.0.x
* Rervert unnecessary changes from 10.0.x
* fix build issues testing Hazelcast sessions
* QuotesDecoderTest sessions not being closed
* Fixed CookiesTest
CookiesTest.testCookiesAreSentToClient was failing due to the
Assertion being caught and logged by the upgrade request
the response is now captured by a FuturePromise and the assertions are
done in the main test
the reason the assertion was failing was due to lowercase "set-cookie"
instead of "Set-Cookie"
* fixed maven coords
* javadoc fixes
* fixed javadoc
* revert maven artifact names
* cleanup after review

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-11-02 13:07:43 +01:00
Greg Wilkins 254dc88743 Merge branch 'jetty-9.4.x' into jetty-10.0.x
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-11-01 20:24:43 +01:00
Simone Bordet 11abe53df7
Merge pull request #2965 from eclipse/jetty-9.4.x-2796-http2_max_concurrent_streams
Issue #2796 - Max local stream count exceeded when request fails.
2018-11-01 17:28:08 +01:00
Greg Wilkins 161f1698cf
Jetty 9.4.x 3018 request logging bad messages (#3020)
Issue #3018 improve logging and handling of slow data rates.

* Slow data rates now result in aborted channels, but exception is still thrown.  Test for 408 in requestLog
* Updated many RequestLog usages to use Server.setRequestLog rather than a RequestLogHandler
* Fixed javadoc
* removed BadRequestLogHandlerTest (tested in RequestLogTest)
* added JMH to show the future of request logging for #113
* copyright header.
* Updates from review
* Revert to throwing BadMessageException
* BME ensures a 408 is logged rather than a 500

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-11-01 17:06:04 +01:00
Simone Bordet 31cab3dc08 Issue #2796 - Max local stream count exceeded when request fails.
Restored smaller maxContentLength to avoid that the test takes
too much time and fails.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-10-30 19:36:02 +01:00
Simone Bordet b70323d55f Merged branch 'jetty-9.4.x' into 'jetty-9.4.x-2796-http2_max_concurrent_streams'. 2018-10-29 19:05:35 +01:00
Olivier Lamy 7dbe056521
Signed-off-by: olivier lamy <oliver.lamy@gmail.com> (#3035) 2018-10-29 17:14:59 +10:00
Simone Bordet 0445968277 Issue #3024 - JDK 11 Infinispan test failure.
Disabled test, waiting for Infinispan to fix their issue.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-10-23 15:46:41 +02:00
Greg Wilkins 15e1c73f9c
Cleanup the dump implementation (#2998)
* Cleanup the dump implementation
* improved the clarity of utility methods for dump and updated most dump methods
* fixed upgrade filter dump
* Improved dump after review
* Moved dumpObjects to Dumpable
* implemented dumpBeans with dumpObjects
* less verbose dump
* Dump streams
* fixed dump test

Signed-off-by: Greg Wilkins <gregw@webtide.com>
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-10-22 11:53:59 +11:00
Simone Bordet 276fa7e86b Merged branch 'jetty-9.4.x' into 'jetty-9.4.x-2796-http2_max_concurrent_streams', 2018-10-18 16:56:13 +02:00
Jan Bartel ad40bab8fa ClusteredSessionScavengingTest is excluded for local infinispan test 2018-10-18 13:54:20 +11:00
Greg Wilkins 43ab14454a Some dump cleanups
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-10-17 17:14:42 +11:00
Greg Wilkins 0962fdb4e6 Moved async rest server to own module
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-10-17 11:45:38 +11:00
Greg Wilkins 42cda7bc7f Issue #2191 JPMS Support
Renamed ClasspathPattern to ClassMatcher as it also supports JPMS modules etc.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-10-17 10:08:20 +11:00