Commit Graph

560 Commits

Author SHA1 Message Date
Juergen Hoeller eb3254d2a9 Polishing 2018-07-06 15:18:47 +02:00
Juergen Hoeller ea534b6820 Polishing 2018-06-29 20:07:53 +02:00
Juergen Hoeller 9a20ec9284 Polishing 2018-06-28 18:13:40 +02:00
Juergen Hoeller 4be6bcae74 Polishing 2018-06-28 17:30:55 +02:00
Juergen Hoeller a631af80c1 Polishing
(cherry picked from commit 40efcc9)
2018-06-28 16:42:14 +02:00
Napster f83a01e573 Undertow WebSocket sessions share ByteBufferPool
Issues: SPR-16957
2018-06-25 17:59:34 -03:00
Brian Clozel d1c9401dc2 WebClient writes Content-Length for Mono bodies
In SPR-16892, the `EncoderHttpMessageWriter` has been improved to write
`"Content-Length"` HTTP response headers if the response body is of type
`Mono` (i.e. the actual content length is easily accessible without
buffering a possibly large response body). That change was relying on
the fact that the server side is using a `ChannelSendOperator` to delay
the writing of the body until the first signal is received.

This strategy is not effective on the client side, since no such channel
operator is used for `WebClient`. This commit improves
`EncoderHttpMessageWriter` and delays, for `Mono` HTTP message bodies
only, the writing of the body so that we can write the
`"Content-Length"` header information once we've got the body resolved.

Issue: SPR-16949
(Cherry-picked from 4a26f93a0d)
2018-06-19 11:52:26 +02:00
Rossen Stoyanchev 24acae1195 Polish ExchangeFilterFunction[s] 2018-06-13 17:15:47 -04:00
Rossen Stoyanchev 7bfd683816 Eliminate the need for Encoder#getContentLength
Issue: SPR-16892
2018-06-04 16:01:48 -04:00
Juergen Hoeller bbe5124556 Polishing 2018-05-29 22:16:48 +02:00
Arjen Poutsma a7ffe092ab Fix parent path variables in nested route functions
This commit fix an issue where path variables in a nested parent
RouterFunction were not committed to the request attributes.

Issue: SPR-16868

(cherry picked from commit 8c30b8e)
2018-05-29 15:57:52 +02:00
Rossen Stoyanchev 051ab05d32 Properly initialize URI/Matrix vars w/ urlDecode=false
Issue: SPR-16867
2018-05-24 15:10:55 -04:00
Rossen Stoyanchev f078e057ce Update docs on WebClient filters 2018-05-24 07:20:24 -04:00
Rossen Stoyanchev a71bd7c03f Immutable Resource[Resolver|Transformer]Chains
Backport of #f121aa5e31, applied to spring-webflux only.

Issue: SPR-16862
2018-05-23 09:53:26 -04:00
Rossen Stoyanchev b385ff1d9f Polish WebFlux WebSocket docs
Issue: SPR-16820
2018-05-17 10:03:24 -04:00
Arjen Poutsma 3c88029dd3 Improve toString for filtered router function
Issue: SPR-16829

(cherry picked from commit f722f40)
2018-05-17 12:02:57 +02:00
Rossen Stoyanchev c7adf28f61 Expand WebFlux docs with WebSocketHandler examples
Issue: SPR-16820
2018-05-16 21:33:47 -04:00
Rossen Stoyanchev ab0b0b31fd Polish: simplify ControllerMethodResolver initialization 2018-05-16 10:04:08 -04:00
Arjen Poutsma d24546ad18 Improve toString for query param and path extension predicates
Issue: SPR-16829

(cherry picked from commit 7424ca5)
2018-05-16 11:16:11 +02:00
Rossen Stoyanchev fd36af6fcf Inject UriComponentsBuilder relative to webapp root
Issue: SPR-16813
2018-05-11 09:54:35 -04:00
Juergen Hoeller 41ab177b6c Fine-tuned assertions and related polishing 2018-05-05 14:59:13 +02:00
Arjen Poutsma a63f04df09 Clean up path variables after non match
This commit makes sure the nested path variables are only commited to
the attributes when all predicates match.

Issue: SPR-16692

(cherry picked from commit 51325af)
2018-05-03 12:06:06 +02:00
Juergen Hoeller 3e47f4564d Fine-tuned assertions and related polishing in WebFlux builders
(cherry picked from commit 9bff5b4)
2018-05-02 16:04:51 +02:00
Juergen Hoeller a9548f93e4 Support for non-standard HTTP status in reactive ClientHttpResponse
Issue: SPR-16748

(cherry picked from commit a683472)
2018-05-02 16:04:01 +02:00
Sebastien Deleuze b55f69deb1 Support decoding Mono in Jaxb2XmlDecoder
Issue: SPR-16759
2018-05-02 11:57:40 +02:00
Rossen Stoyanchev de1eb343e7 Polish WebSocketIntegrationTests 2018-05-01 14:26:44 -04:00
Rossen Stoyanchev 417bb302c3 ReactorNettyWebSocketSession implements close properly
Issue: SPR-16774
2018-05-01 12:05:20 -04:00
Johnny Lim c6b60f0c00 Polish 2018-04-27 14:09:35 -04:00
sdeleuze 2c766b9501 Enable KotlinScriptTemplateTests after KT-18833 fix 2018-04-23 15:31:31 +02:00
Rossen Stoyanchev d3ed7b624d In 5.0.x we don't have Flux/Mono error with Supplier
Issue: SPR-16726
2018-04-19 13:41:01 -04:00
Rossen Stoyanchev 66bd277671 Use StringDecoder to split SSE stream
ServerSentEventHttpMessageReader had logic to split on new lines
and buffer until an empty new line (start of a new event). To account
for random data chunking, it later re-assembled the lines for each
event and split again on new lines. However bufferUntil was still
unreliable a chunk may contain nothing but a newline, which doesn't
necessarily mean an empty newline in the overall SSE stream.

This commit simplifies the above by delegating the splitting of the
stream along newlines to StringDecoder.

Issue: SPR-16744
2018-04-19 11:38:43 -04:00
Rossen Stoyanchev 881343e928 Polish tests to use WebClient retrieve() 2018-04-19 11:38:43 -04:00
Rossen Stoyanchev 053ffe808f Polish (minor) in AbstractMessageReaderArgumentResolver 2018-04-17 17:58:56 -04:00
Rossen Stoyanchev daa2d37ad4 Avoid creating Exception instance if not needed
Issue: SPR-16726
2018-04-17 17:58:46 -04:00
nkjackzhang bbe850d33a Fix typo in javadoc
Closes gh-1791
2018-04-13 13:16:40 +02:00
Juergen Hoeller 66a3a82fb3 Avoid reference to HandlerMethod class in ServerErrorException
This breaks the package dependency cycle between web.server/web.method and makes ServerErrorException more generally applicable. Includes deprecation of the plain reason constructor variant, in favor of providing a Method or MethodParameter context (which MatrixVariableMethodArgumentResolver does now).
2018-04-01 00:21:15 +02:00
Rossen Stoyanchev d9e17a62ce Refine SyncInvocableHandlerMethod error handling
Ensure the error is wrapped as ServerErrorException
2018-03-31 12:06:24 -04:00
Rossen Stoyanchev 4454ffd2b1 Replace remaining use of block operator 2018-03-31 11:18:38 -04:00
Juergen Hoeller 6393e5ce0c Consistent Ordered.LOWEST_PRECEDENCE declarations for default order 2018-03-31 00:20:44 +02:00
Juergen Hoeller d553ddc5b3 Nullability refinements (based on IntelliJ IDEA 2018.1 introspection)
Issue: SPR-15756
2018-03-29 23:50:17 +02:00
igor-suhorukov ab96bb5428 Remove redundant check 2018-03-29 23:33:38 +02:00
Rossen Stoyanchev dd96c873e3 Improve docs on forwarded headers
Issue: SPR-16660
2018-03-29 16:11:01 -04:00
Juergen Hoeller 695bf2961f Consistent trace logging in PathResourceResolver
Issue: SPR-16616
2018-03-29 16:04:33 +02:00
igor-suhorukov 4aae6a6dda Use Map.forEach instead of manual Map.Entry iteration wherever possible SPR-16646 2018-03-28 01:09:03 +02:00
Rossen Stoyanchev 224d52e032 Refine RequestedContentTypeResolver contract
Consistently return "*/*" if no media types were requested rather than
an empty list. Existing code has to check for both in any case to see
if nothing was requested.

Issue: SPR-16624
2018-03-27 16:54:25 -04:00
Juergen Hoeller 98ad23bef8 Consistent logging of encoded path evaluation failure
Issue: SPR-16616
2018-03-27 17:04:59 +02:00
Juergen Hoeller 13356a7ee2 Consistent encoded path evaluation in reactive ResourceWebHandler and co
Issue: SPR-16616
2018-03-27 01:00:42 +02:00
Juergen Hoeller e3d0ef6015 Use Map.forEach instead of manual Map.Entry iteration wherever possible
Issue: SPR-16646
2018-03-27 00:38:32 +02:00
Rossen Stoyanchev 729d0d2796 Property handling of Void.class in WebClient retrieve()
Issue: SPR-16636
2018-03-23 22:21:06 -04:00
Arjen Poutsma c56317928f Add formData() and multipartData() to ServerRequest
Issue: SPR-16551
2018-03-23 10:00:30 +01:00