Commit Graph

14712 Commits

Author SHA1 Message Date
Martin Švorc bf83e4e861 Use original query string of forwarded request
Prior to this commit, the AbstractFlashMapManager has used the
originating URI but the query string of the forwarded request. That
resulted to FlashMap not being matched even when both originating
URI and query string matched the FlashMap attributes. The originating
query string is now used to match the forwarded request.

Issue: SPR-15505
2017-05-19 16:49:29 -04:00
Bao Tran 44c31a6aad Fix duplicate STOMP subscription id issue
Issue: SPR-15543
2017-05-19 15:20:14 -04:00
Juergen Hoeller cb3d1befcd LocalValidatorFactoryBean properly supports unwrap at ValidatorFactory level
Also documents limitation for Bean Validation 2.0's getClockProvider() method.

Issue: SPR-15561
Issue: SPR-13482
2017-05-18 21:00:56 +02:00
Juergen Hoeller 67881a5726 Polish PathPattern parser (including package change to web.util.pattern)
Issue: SPR-15531
2017-05-17 17:40:25 +02:00
Juergen Hoeller eaac348c05 Close InputStreams in writeResourceRegionCollection (analogous to writeResourceRegion)
Issue: SPR-15559
2017-05-17 14:34:50 +02:00
Juergen Hoeller 7b3f5fd855 ResourceUtils.extractArchiveURL properly deals with top-level war URLs
Issue: SPR-15556
2017-05-17 14:22:43 +02:00
Juergen Hoeller e835f4d025 Revised png and jpeg mappings
Issue: SPR-15546
Issue: SPR-15557
2017-05-17 14:21:44 +02:00
Arjen Poutsma ba39697f2e Expose Principal in ServerRequest
This commit exposes the Principal in ServerRequest.

Issue: SPR-15552
2017-05-16 14:50:57 +02:00
Juergen Hoeller 94efbe2687 Latest dependency updates (OkHttp 3.8, Protobuf 3.3.1, Rome 1.7.3, Tomcat 8.5.15) 2017-05-16 11:39:21 +02:00
Juergen Hoeller 9e3f4ccce9 Merge pull request #1394 from alexander-riss/keySet
Fix inefficient use of keySet operators in messaging classes

Issue: SPR-15553
2017-05-16 11:22:22 +02:00
Alexander Riss e49a5d8424 fix inefficient use of keySet operators in messaging classes
issue: SPR-15553
2017-05-16 10:41:22 +02:00
Rossen Stoyanchev 5ac7955de9 More qualified "request-id" header in WebTestClient
Issue: SPR-15501
2017-05-15 15:52:50 -04:00
Violeta Georgieva 7f616c216b Specify the HandlerMapping#order in the websocket example
The order value has to be specified for the HandlerMapping
so that it will be ordered before the one that serves the static resource.
2017-05-12 20:45:27 +03:00
Juergen Hoeller f985f71daf Polishing 2017-05-12 12:50:17 +02:00
Juergen Hoeller 650a682659 Upgrade to Netty 4.1.11 2017-05-12 12:50:10 +02:00
Arjen Poutsma f4cf55cb2b Add support for WebFilter and WebExceptionHandler
This commit adds support for configuring `WebFilter` and
`WebExceptionHandler` instances in HandlerStrategies. It also drops the
"native" support for `ResponseStatusException`s, in favor of the
`ResponseStatusExceptionHandler`, which is registered by default.

Issue: SPR-15518
2017-05-11 11:45:00 +02:00
Arjen Poutsma ad9cf99420 ResourceHandlerFunction returns EntityResponse
The ResourceHandlerFunction now returns an `EntityResponse<Resource>`
(instead of a `ServerResponse`), so that filters can inspect/change the
returned Resource.
2017-05-11 11:45:00 +02:00
Arjen Poutsma 8db4b2f7ed Remove synchronized block around PathPatternParser
Removed the synchronized block around PathPatternParser, since it is
now thread-safe.
2017-05-11 09:55:20 +02:00
Sebastien Deleuze 285fa1cc2c Fix typos in Kotlin extensions documentation 2017-05-10 17:22:27 +02:00
Arjen Poutsma f0f3df5cc0 Use PathPattern in PathResourceLookupFunction 2017-05-10 10:12:55 +02:00
Arjen Poutsma 64c0ec3d5e Add test for combining @Controller with RouterFunctions
This commit adds a test for combining RouterFunctions with a
@Controller.

Issue: SPR-15521
2017-05-09 16:38:30 +02:00
Juergen Hoeller 9273197f11 Latest dependency updates (Common Annotations 1.3, Caffeine 2.5, Selenium 3.4, JSONassert 1.5) 2017-05-09 13:48:05 +02:00
Arjen Poutsma b649041976 Add ServerHttpResponse.addCookie method
This commit adds a `addCookie(ResponseCookie)` method to the reactive
`ServerHttpResponse` interface.

Issue: SPR-15523
2017-05-09 10:18:39 +02:00
Rossen Stoyanchev add1305252 Re-add vararg options in WebHttpHandlerBuilder
WebHttpHandlerBuilder is low level not expected to appear frequently
but they might be repeated more in tests (e.g. of WebFilter's).

Issuse: SPR-15499
2017-05-08 15:50:27 -04:00
Rossen Stoyanchev 459457e1aa WebFilterChain delegation nested in Mono.defer()
Issue: SPR-15520
2017-05-08 15:36:31 -04:00
Rossen Stoyanchev 47d6e4a332 Immutable DefaultWebFilterChain
Issue: SPR-15517
2017-05-08 15:04:38 -04:00
Juergen Hoeller 5497416c2d Polishing 2017-05-08 09:10:36 +02:00
Juergen Hoeller f25c6ba9bc Polishing 2017-05-07 22:59:25 +02:00
Juergen Hoeller c735eec08b Merge pull request #1421 from kazuki43zoo/patch-javadoc
Fix javadoc of AbstractHandlerMapping#setPathMatcher
2017-05-07 22:58:04 +02:00
Kazuki Shimizu df793392fd Fix javadoc of AbstractHandlerMapping#setPathMatcher 2017-05-08 05:52:15 +09:00
Juergen Hoeller 92f18a4985 HandlerExecutionChain.toString() includes reliable interceptor number
Issue: SPR-15525
2017-05-07 21:05:16 +02:00
Juergen Hoeller 25aef4d3cc ResponseStatusException reason is optional (with lazily constructed message)
Issue: SPR-15524
2017-05-06 12:53:03 +02:00
Juergen Hoeller edbf9fa74e Upgrade to Kotlin 1.1.2-3
Also removes JDK 9 build support for the time being since Gradle 3.5 still doesn't run on JDK 9.
2017-05-05 23:55:18 +02:00
Juergen Hoeller 39f8bd663e Polishing 2017-05-05 23:19:08 +02:00
Juergen Hoeller 4fdd85324d Aligned exception handling in Jackson and JAXB codecs
Issue: SPR-15516
2017-05-05 23:19:01 +02:00
Rossen Stoyanchev 1c4babd410 Fix minor issue in ExchangeResult 2017-05-05 16:14:03 -04:00
Rossen Stoyanchev 0d28a1c32b Polish 2017-05-05 15:02:09 -04:00
Rossen Stoyanchev 4d962a1793 Remove HttpStatus from HttpMessageConversionException
HttpMessageConverter's are client and server and arguably shouldn't
contain a server-side concept such a response status.

The status field is recent, it was added to differentiate 400 vs 500
errors with Jackson 2.9+ but there is no need for it since the same
distinction is reflected in raising an HttpMessageNotReadableException
vs a general HttpMessageConversionException.

Issue: SPR-15516
2017-05-05 14:44:08 -04:00
Rossen Stoyanchev 83e0e1604a Refine encoding/decoding exception handling
Starting with removing a package cycle on the use of
ResponseStatusException in the codec package, this commit generally
refines codec exception handling.

The new [Encoding|Decoding]Exception mirror the existing
HttpMessageNot[Readable|Writable]Exception and are used similarly
especially to differentiate betwen 400 and 500 errors when parsing
server request body content.

The commit also aligns some of the exception handling of JSON and XML
on the WebFlux side with that on the Spring MVC side.

Issue: SPR-15516
2017-05-05 14:29:43 -04:00
Rossen Stoyanchev d7e54cea84 Test commit 2017-05-05 09:41:54 -04:00
Juergen Hoeller ba501791c9 Consistent use of WebFlux terminology over Web Reactive 2017-05-05 14:21:01 +02:00
Juergen Hoeller 429d6ac67d Defensive handling of test timeouts with RxNetty and Reactor 2017-05-05 14:19:50 +02:00
Juergen Hoeller 1083fe6f3f Upgrade to RxJava 1.3
Issue: SPR-15497
2017-05-05 12:13:37 +02:00
Rossen Stoyanchev 8231812a3c Jackson Encoder/Decoder accept custom MimeType's
Issue: SPR-15474
2017-05-04 18:05:55 -04:00
Rossen Stoyanchev afa1c93585 Fix error in mock server test code 2017-05-04 17:24:46 -04:00
Juergen Hoeller 652266bcc2 Polishing 2017-05-04 22:27:36 +02:00
Rossen Stoyanchev 75117f42b8 Use the configured charset for part headers
This comment extends the use of the charset property in
FormHttpMessageConverter to also include multipart headers with a
default of UTF-8.

We now also set the charset parameter of the "Content-Type" header to
indicate to the server side how to decode correctly.

Issue: SPR-15205
2017-05-04 15:59:54 -04:00
Rossen Stoyanchev bda2723933 Correct charset determination in Synchronoss reader 2017-05-04 13:30:56 -04:00
Rossen Stoyanchev bb744574e5 Remove optional javax.mail dependency from WebFlux
The MultipartHttpMessageWriter now directly encodes part header values
defaulting to UTF-8 and also specifies the charset in the
Content-Type header for the entire request.

This should work with something commonly used like Apache Commons
FileUpload which checks request.getCharacterEncoding() and uses it
for reading headers.
2017-05-04 13:12:44 -04:00
Rossen Stoyanchev a56f735edd Polish 2017-05-04 12:25:19 -04:00