Commit Graph

14997 Commits

Author SHA1 Message Date
Rossen Stoyanchev 0e370e0703 Separate out URL path parsing in PathContainer
PathContainer now has separate parsePath and parseUrlPath methods each
creating PathSegment and UrlPathSegment respectively.
2017-07-11 10:56:19 +02:00
Rossen Stoyanchev 1d201a55db Refine PathContainer.Segment value representation
Segment.value() now returns the actual original path segment value
including path parameters while semicolonContent() is removed.

valueDecoded() is renamed to valueToMatch() to reflect it is the value
for pattern matching which is not only decoded but also has path
parameters removed.
2017-07-11 10:54:42 +02:00
Rossen Stoyanchev 2f17c5f3b6 From static to instance-based PathContainer#subPath 2017-07-11 06:05:36 +02:00
Rossen Stoyanchev 9f7d57f933 Encapsulate choice of URI encoding within RequestPath
Currently the URI path is always treated as UTF-8 so we can eliminate
the encoding parameter from RequestPath#parse.
2017-07-11 06:05:36 +02:00
Juergen Hoeller 122ee3096c Efficient log checks in STOMP encoder/decoder 2017-07-10 20:44:51 +02:00
Juergen Hoeller dd43b6aabe ReflectionTestUtils does not require spring-aop on the classpath
Issue: SPR-15757
2017-07-10 20:43:34 +02:00
Juergen Hoeller 3714e7b044 Deprecate FileSystemUtils
Issue: SPR-15748
2017-07-10 14:25:13 +02:00
Juergen Hoeller 9b5132ce53 LinkedCaseInsensitiveMap exposes its locale for key conversion
Issue: SPR-15752
2017-07-10 14:24:28 +02:00
Rossen Stoyanchev fac35ebec2 Remove PathPatternRegistry 2017-07-10 11:37:18 +02:00
Juergen Hoeller e7b77cb2b6 Drop legacy DisposableBean declaration on AbstractApplicationContext
Issue: SPR-15154
2017-07-07 20:50:35 +02:00
Juergen Hoeller 6d55b3a592 Perform onException delegation outside of connection monitor
Issue: SPR-15738
2017-07-07 20:44:09 +02:00
Rossen Stoyanchev 7d747f9645 Deprecate AsyncRestTemplate methods in MockRestServiceServer 2017-07-07 19:20:36 +02:00
Rossen Stoyanchev 9640cedeae Removing remaining use of PathPattern with String path 2017-07-07 19:20:36 +02:00
Juergen Hoeller 00f4c36d7a Nullability fine-tuning (RequestContext, LocaleResolver)
Includes page-level JSTL time zone support for JSP tags.

Issue: SPR-15720
Issue: SPR-15746
2017-07-07 18:46:19 +02:00
Sam Brannen 4a3ca17d3f Fix imports 2017-07-07 17:23:43 +02:00
Arjen Poutsma 5f2d2b21d9 Avoid required uri when using WebTestClient w/ base url
This commit makes the `uri` step of the WebTestClient optional, so that
users who have specified a base URL during WebClient config do not need
to provide an empty one (i.e. `url("")`).

Issue: SPR-15695
2017-07-07 17:07:15 +02:00
Arjen Poutsma 3232cb6260 Avoid required uri when using WebClient w/ base url
This commit makes the `uri` step of the WebClient optional, so that
users who have specified a base URL during WebClient config do not need
to provide an empty one (i.e. `url("")`).

The basic idea of this fix is that the HTTP method methods in WebClient
(`get`, `post`, etc.) should be able to "bypass" the uri stage, and skip
straight to defining headers, or even doing an exchange or retrieve
(i.e. call methods on `RequestHeaderSpec` or `RequestBodySpec`).

I have accomplished this by adding two new composed interfaces:
`RequestHeadersUriSpec` and `RequestBodyUriSpec`.
`RequestHeadersUriSpec` extends from the existing `UriSpec` and
`RequestHeaderSpec`, while `RequestBodyUriSpec` extends from `UriSpec`
and `RequestBodySpec`. These types are returned from the HTTP methods
(`get`, `post` etc). The `uri` methods on these types return a plain
`RequestHeaderSpec` and `RequestBodySpec` (i.e. types without the `uri`
methods), so that you can call `uri` once only.

Issue: SPR-15695
2017-07-07 17:07:15 +02:00
Sam Brannen 1c07369406 Verify interoperability w/ JUnit Jupiter's @ParameterizedTest in TCF
This commit introduces integration tests which verify that the
SpringExtension can be used in conjunction with JUnit Jupiter's
@ParameterizedTest support.
2017-07-07 16:52:37 +02:00
Sam Brannen 2b03507894 Polishing wording regarding JUnit Platform and JUnit Jupiter 2017-07-07 16:52:37 +02:00
Sam Brannen ad5f85f8d3 Clean up deprecation warnings in spring-test 2017-07-07 15:41:02 +02:00
Arjen Poutsma e458862849 Reflect recent Reactor changes 2017-07-07 15:24:15 +02:00
Rossen Stoyanchev e0de7754cc Polish 2017-07-07 09:44:02 +02:00
Renato Soppelsa 3dd6069578 Add UTF8 problem+json media type constant
Issue: SPR-15742
2017-07-07 09:42:50 +02:00
Rossen Stoyanchev aad4916cac WiretapConnector removes exchanges
Issue: SPR-15744
2017-07-06 23:01:01 +02:00
Rossen Stoyanchev 4e95378fc6 Remove unused imports 2017-07-06 15:28:32 +02:00
Rossen Stoyanchev 5f9f323b12 Add logging to randomly failing websocket test 2017-07-06 15:07:41 +02:00
Rossen Stoyanchev acd6b9df06 Fix failing test
Explicitly pass the client-side JSR-356 WebSocketContainer to the
TomcatWebSocketClient to prevent the ContainerProvider from finding
the one from undertow-websockets-jsr through the ServiceLoader API.
2017-07-06 14:32:46 +02:00
Arjen Poutsma b0ab84657b Disable "failOnServerError" in ReactorClientHttpRequest
This commit disables the "failOnServerError" feature on the
`HttpClientRequest`, as wrapped by ReactorClientHttpRequest. 5xx errors
are supposed to be dealt with in the WebClient, not in the lower-level
components.

Issue: SPR-15739
2017-07-06 13:37:21 +02:00
Arjen Poutsma 0065bc5ee5 Support null query param values in ServerRequest.queryParam(String)
Issue: SPR-15740
2017-07-06 12:10:55 +02:00
Arjen Poutsma 625855c00f Add comment indicating path segment combining in UriComponents.normalize
Issue: SPR-15734
2017-07-06 11:45:13 +02:00
Juergen Hoeller 398322139a StringUtils.uncapitalize is not actually nullable
Issue: SPR-15540
2017-07-05 17:56:37 +02:00
Juergen Hoeller 59c26f65ba AbstractValueAdaptingCache subclasses may reuse NullValue.INSTANCE
Issue: SPR-15693
2017-07-05 17:55:11 +02:00
Arjen Poutsma 74b4c02881 Add ClientRequest attributes
This commit introduces client-side request attributes, similar to those
found on the server-side. The attributes can be used, for instance, for
passing on request-specific information to a globally registered
ExchangeFilterFunction.

The client request builder, as well as WebClient.RequestHeadersSpec and
WebTestClient.RequestHeaderSpec, add methods for adding a single
attribute, as well as manipulating the entire attributes map.

The client request itself adds a accessor for the (immutable) attributes
map.

This commit also introduces a new variant of the basic authentication
filter in ExchangeFilterFunctions. This variant takes the username and
password from well-known attributes.

Issue: SPR-15691
2017-07-05 14:52:38 +02:00
Juergen Hoeller eb928ce456 Reliably detect event listener conditions on proxied beans
Issue: SPR-15678
2017-07-05 13:41:56 +02:00
Juergen Hoeller a6d616d844 Exception handler methods may receive original as well as cause
Issue: SPR-15701
2017-07-05 13:39:30 +02:00
Juergen Hoeller 45d376b6af Polishing 2017-07-05 10:55:30 +02:00
Juergen Hoeller 1306bb9982 Declare spring-context as optional in web, webflux, messaging, jms
Issue: SPR-15733
2017-07-05 10:55:16 +02:00
Juergen Hoeller e35b63f813 Latest dependency updates (Kotlin 1.1.3-2, Undertow 1.4.18, JsonPath 2.3) 2017-07-05 00:19:38 +02:00
Juergen Hoeller 6c0ae1ec9b Clarified role of postProcessAfterInstantiation
Issue: SPR-15732
2017-07-05 00:01:38 +02:00
Sam Brannen 75a71accea Upgrade to JUnit Jupiter 5.0 M5
Issue: SPR-15728
2017-07-04 22:21:13 +02:00
Brian Clozel 9c93521512 Leverage PathPatternParser in CORS configuration source
Previously `UrlBasedCorsConfigurationSource` was relying on
`PathMatcher` implementations for matching incoming request lookup paths
with the configured path patterns for CORS configuration.

This commit replaces the use of `PathMatcher` with a `PathPatternParser`
that parses the string patterns into `PathPattenr` instances and allows
for faster matching against lookup paths.

Issue: SPR-15688
2017-07-04 16:01:18 +02:00
Violeta Georgieva fd1859c34c Adapt to the changes in Reactor Netty ClientOptions
ClientOptions/HttpClientOptions are now created via Builder
2017-07-04 15:26:29 +02:00
Rossen Stoyanchev f7478446b7 Improve Object return type support in WebFlux
Issue: SPR-15731
2017-07-04 08:19:50 -04:00
Brian Clozel f63b0d720e Update WebFlux reference documentation
Note that WebFlux and WebFlux.fn can be both used at the same time
thanks to the handler mapping registration in `@EnableWebFlux`.

Fixing typos in the reference documentation for outdated Reactor
operators.
2017-07-04 13:47:05 +02:00
Brian Clozel baaa84e90f Include port info in HTTP headers for Netty client
This commit adds the port information in the "Host" HTTP request header
for the Netty-based HTTP client.

Issue: SPR-15706
2017-07-04 12:13:06 +02:00
Sebastien Deleuze 7a171c6ae9 Fix Kotlin return types to match @Nullable annotations 2017-07-04 11:27:54 +02:00
Arjen Poutsma de9196bbdc Change from flatMap to map
Changed main tokenbuffer decoding loop from using flatMap to using map.
2017-07-04 10:51:43 +02:00
Brian Clozel 839b6c18d4 Optimize Flux pipeline in ClientHttpRequest 2017-07-04 10:11:56 +02:00
Arjen Poutsma f8589d9eca Return MultiValueMap from ServerRequest.queryParams instead of List
This commit changes ServerRequest.queryParams from returning a
List<String> given a String name, to returning a
MultiValueMap<String, String>, which gives more flexibility.
2017-07-03 16:23:33 +02:00
Arjen Poutsma 2ccbc55ffd Use PathContainer in web.reactive.function.server
This commit uses the newly introduced `PathContainer` and `RequestPath`
support in the functional web framework. It exposes the path container
as property in `ServerRequest`, and uses that in the path-based
`RequestPredicates`.
2017-07-03 13:36:30 +02:00