Commit Graph

2213 Commits

Author SHA1 Message Date
Juergen Hoeller c75423216c AbstractRequestLoggingFilter.isIncludeHeaders() declared as protected
Issue: SPR-16881
2018-05-29 21:52:31 +02:00
Juergen Hoeller 8593fec22c Avoid ConstantConditions warnings suppression (plus related polishing)
Issue: SPR-15756
2018-05-29 21:47:10 +02:00
Rossen Stoyanchev 2acf91a438 Polish 2018-05-26 09:24:23 -04:00
Rossen Stoyanchev 3ede3a4b34 Extension point in HttpMessageConverterExtractor 2018-05-25 13:45:10 -04:00
Rossen Stoyanchev c7c3e5585b X-Forwarded-Ssl is listed in ForwardedHeaderFilter
Issue: SPR-16863
2018-05-25 13:39:37 -04:00
Juergen Hoeller 836a09d5c0 Upgrade to Woodstox 5.1, XMLUnit 2.6, Gson 2.8.5 2018-05-25 00:18:06 +02:00
Rossen Stoyanchev 3eac2dd31e Support X-Forwarded-Ssl
Issue: SPR-16863
2018-05-24 16:14:12 -04:00
Rossen Stoyanchev 72022899de Polish Forwarded header support 2018-05-23 21:23:23 -04:00
Rossen Stoyanchev 1e4a3a2370 Return SslInfo only if X509Certificate[] present
Issue: SPR-16842
2018-05-23 21:23:23 -04:00
Rossen Stoyanchev d035593562 Update @RequestParam Javadoc and remove Portlet mentions 2018-05-23 11:52:14 -04:00
Rossen Stoyanchev 9b496b1264 CodecConfigurer internal refactoring
Improve how HTTP message writers are obtained for general use vs for
multipart requests.
2018-05-21 21:10:44 -04:00
Rossen Stoyanchev 6e5273f08e Polish CodecConfigurer support classes
Functionally equivalent updates to package private classes to improve
the code and make it easier to understand.
2018-05-21 21:09:42 -04:00
Rossen Stoyanchev fbd12e9d16 Support for SslInfo in ServerHttpRequest#mutate
Issue: SPR-16830
2018-05-17 17:27:52 -04:00
Sebastien Deleuze bdfee3417e Polishing 2018-05-15 10:45:20 +02:00
Eddú Meléndez 48c3fa9908 Add visibility support to Jackson2ObjectMapperBuilder
Issue: SPR-16411
2018-05-15 10:45:20 +02:00
Rossen Stoyanchev 7fd0cac6f2 Include FormHttpMessageReader in client codecs
Issue: SPR-16804
2018-05-14 23:16:36 -04:00
Rossen Stoyanchev 3af5f00ee7 UnsupportedMediaType[Status]Exception reports body type
Issue: SPR-16805
2018-05-14 23:16:36 -04:00
Rossen Stoyanchev f7d60b7f58 Add getResource to MultipartFile
Issue: SPR-16808
2018-05-14 09:04:33 -04:00
Rossen Stoyanchev ab6a6f4e17 Merge multipart and query param values
DefaultMultipartHttpServletRequest always returned mulitpart parameter
values only rather than aggregating with query parameters, which
contradicts with Servlet spec, section 3.1, and is inconsistent with
StandardMultipartHttpServletRequest.

Issue: SPR-16590
2018-05-14 09:03:55 -04:00
Rossen Stoyanchev 15182b29a4 Add MockWebSession for use with MockServerWebExchange
Issue: SPR-16772
2018-05-11 10:53:28 -04:00
Rossen Stoyanchev 4da43de7e1 Remove individual detection of forwarded headers
This commit removes all places where forwarded headers are checked
implicitly, on an ad-hoc basis.

ForwardedHeaderFilter is expected to be used instead providing
centralized control over using or discarding such headers.

Issue: SPR-16668
2018-05-11 09:31:39 -04:00
Rossen Stoyanchev d3f3b41f52 MockHttpServletResponse writer sets committed flag
Issue: SPR-16683
2018-05-10 16:22:54 -04:00
Rossen Stoyanchev 79e809be24 Public RequestCallback/ResponseExtractor factory methods
Issue: SPR-8604
2018-05-10 15:39:47 -04:00
Rossen Stoyanchev eef592d901 Add builder to MockServerWebExchange
Issue: SPR-16772
2018-05-10 15:16:13 -04:00
Juergen Hoeller c9f488363d Fine-tuned assertions and related polishing 2018-05-05 14:39:43 +02:00
Juergen Hoeller e17fc8d607 Upgrade to Tomcat 9.0.8, Undertow 2.0.6, Jetty 9.4.10, Gson 2.8.4 2018-05-05 12:47:34 +02:00
Sebastien Deleuze af0cb53742 Support decoding Mono in Jaxb2XmlDecoder
Issue: SPR-16759
2018-05-02 12:10:46 +02:00
Juergen Hoeller f8c2d7ab51 Nullable HttpMethod parameter only on internal doExecute delegate
Issue: SPR-15540
2018-05-01 23:52:12 +02:00
Juergen Hoeller 21fad8e205 SimpleClientHttpResponse catches any Exception on close
Issue: SPR-16773
2018-05-01 23:51:05 +02:00
Rossen Stoyanchev 8d157cb5b5 Consistent handling of URISyntaxException
Issue: SPR-16778
2018-04-30 21:02:36 -04:00
Rossen Stoyanchev 85ee36b385 Uncomment tests that now work 2018-04-30 19:47:14 -04:00
Juergen Hoeller 9bff5b48cf Fine-tuned assertions and related polishing in WebFlux builders 2018-04-27 23:36:58 +02:00
Johnny Lim 6519e7b22a Polish 2018-04-27 14:06:48 -04:00
Juergen Hoeller a683472daa Support for non-standard HTTP status in reactive ClientHttpResponse
Issue: SPR-16748
2018-04-27 18:25:11 +02:00
Juergen Hoeller 44cf002c00 Null-safe handling of response type in AcceptHeaderRequestCallback
Issue: SPR-16690
2018-04-27 18:24:59 +02:00
sdeleuze 75a41db071 Fine tune WebFlux server logging verbosity
With this commit, WebFlux server uses warning instead of error log level
for request handling, and also just print the message instead of the
stacktrace which is mostly meaningless in reactive world.

Complementary to this change, Reactor Netty removed additional logging
as part of https://github.com/reactor/reactor-netty/issues/339.

Issue: SPR-16688
2018-04-27 10:40:48 +02:00
sdeleuze b5dfdbaa65 Reuse PartBodyStreamStorageFactory in SynchronossPartGenerator
Issue: SPR-16727
2018-04-26 10:59:11 +02:00
Rossen Stoyanchev 9bc4e70e93 Better assertion message in MockPart
Issue: SPR-16767
2018-04-25 09:59:06 -04:00
Rossen Stoyanchev da98ff72d2 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:29:12 -04:00
Rossen Stoyanchev 586be50109 Fix typo 2018-04-16 10:02:47 -04:00
Rossen Stoyanchev 551505bd93 Restore handling of 0 bytes read
Issue: SPR-16728
2018-04-16 09:59:34 -04:00
Juergen Hoeller 0754833b37 Local XMLUnit dependency declarations with consistent version 2.5.1 2018-04-14 21:03:20 +02:00
Brian Clozel 69e3fde295 Avoid duplicate Accept header values in RestTemplate
Prior to this commit, the various `HttpMessageConverter` instances
configured for a given `RestTemplate` instance could all contribute
`MediaType` values to the "Accept:" request header.

This could lead to duplicate media types in that request header,
cluttering for the HTTP request for no reason.

This commit ensures that only distinct values are added to the request.

Issue: SPR-16690
2018-04-12 22:28:31 +02:00
Rossen Stoyanchev 224589ea74 Remove write pausing in Undertow response
Using the simple example shown in the ticket but switching from
Mono<String> to Flux<String> (and 5,000,000 onNext calls) shows that
constant pausing causes significant overhead and is not worth the
trouble vs ignoring the onWritePossible in REQUESTED state.

Issue: SPR-16702
2018-04-11 14:27:27 -04:00
Rossen Stoyanchev 3549745e37 Avoid inifinite recursion in UndertowServerHttpResponse
Undertow does not provide a way to check if we can write so with the
current implementation of isWritePossible, deep recursion can occur
when writing slows down. We now use a flag to keep track of write
ChannelListener callbacks.

This commit also addresses a related issue in
AbstractListenerWriteProcessor that went undected since #3c2d186
where after a large (single) buffer that is not written fully, the
completion signal is processed before the all data is written.

Issue: SPR-16702
2018-04-11 14:27:27 -04:00
sdeleuze 89d069b09d Add default ctor to Reactive UrlBasedCorsConfigurationSource
Issue: SPR-16712
2018-04-11 14:38:42 +02:00
sdeleuze 27e87e5593 Document why "charset=UTF-8" is specified for JSON
Issue: SPR-14715
2018-04-09 12:03:17 +02:00
Brian Clozel 2dde000475 Document socket timeout config limitations for HttpClient
This commit documents the difference between configuring the socket
timeout on the `RequestConfig` and on the `SocketConfig`.

The first one does not affect timeouts when establishing an SSL
connection or sending a CONNECT request to a proxy. For these use cases,
it is required to configure `SocketConfig` on the `HttpClient` instance
directly.

Issue: SPR-16697
2018-04-06 16:35:17 +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
Juergen Hoeller 28ea718d2d Build setup allows for JDK 10 as source/test target compatibility
Includes upgrade to Groovy 2.4.15 and HtmlUnit 2.30.

Issue: SPR-16390
2018-03-31 23:17:31 +02:00