Commit Graph

2282 Commits

Author SHA1 Message Date
Juergen Hoeller
18ce8564e2 Polishing 2019-03-07 18:27:02 +01:00
Juergen Hoeller
24c6392e1a Upgrade to SLF4J 1.7.26, H2 1.4.198, OkHttp 3.13.1, WebJars Locator 0.37 2019-03-06 15:21:23 +01:00
Juergen Hoeller
ac19af511c Polishing 2019-03-05 13:34:56 +01:00
Juergen Hoeller
df9be494cc Polishing 2019-02-25 18:36:24 +01:00
Juergen Hoeller
af1691cbba Upgrade to Hibernate Validator 5.4.3 and 6.0.15
Includes Apache HttpClient 4.5.7 and Jetty 9.4.15.
2019-02-22 14:42:38 +01:00
Juergen Hoeller
305e4535d8 Null-safe handling of response type in AcceptHeaderRequestCallback
Issue: SPR-16690
See gh-22401
2019-02-11 13:47:33 +01:00
Brian Clozel
a0d420686b 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
Closes gh-22401
2019-02-11 13:46:55 +01:00
Juergen Hoeller
e7dbae84a5 Upgrade to Netty 4.1.33, Undertow 1.4.27, Hibernate ORM 5.2.18/5.1.17
Includes consistent upgrade to Rome 1.12.
2019-02-07 22:28:36 +01:00
Rossen Stoyanchev
5aa131a259 Correction for commit #c6e500
Issue: SPR-17630
2019-01-08 22:45:19 -05:00
Juergen Hoeller
0dd87e8339 Upgrade to Tomcat 8.5.37 and Hibernate Validator 6.0.14
Includes WebJars Locator 0.36, OkHttp 3.12.1, Apache Johnzon 1.1.11.
2019-01-08 18:45:52 +01:00
Juergen Hoeller
e0283c2edf Polishing 2019-01-08 18:45:16 +01:00
Rossen Stoyanchev
c6e50087a0 Adjust UriComponentsBuilder#toUriString behavior
Commit #93b7a4 added support for pre-configuring URI variables at the
UriComponentsBuilder level, and also changed toUriString to encode
template and URI variables separately. However this went a bit too far
causing side effects for URLs with curly braces that don't represent
URI variables.

This commit restores the original toUriString behavior which is to
encode template and URI variables sepraately only if URI variables have
been pre-configured.

Issue: SPR-17630
2019-01-08 11:07:00 -05:00
Rossen Stoyanchev
124e8179b2 Lenient URI template encoding
URI template encoding ignores mismatched curly braces, treating them as
literal parts instead.

Issue: SPR-17630
2019-01-02 16:42:01 -05:00
Violeta Georgieva
0742160821 Propagate the cancel signal to the downstream 2018-12-18 15:01:35 -05:00
Juergen Hoeller
8de86b7fb3 Revised backport version 5.0.11
Issue: SPR-17410
Issue: SPR-17433
2018-12-17 17:55:54 +01:00
Juergen Hoeller
ce57d4ad58 Revised HttpHeaders javadoc 2018-12-12 12:54:01 +01:00
Juergen Hoeller
7377764d02 Polishing 2018-12-12 12:40:14 +01:00
Juergen Hoeller
a9b453d79f Polishing 2018-12-11 11:14:23 +01:00
Juergen Hoeller
bc864dc161 MockHttpServletRequest preserves original Accept-Language header value
Issue: SPR-17566

(cherry picked from commit 9efea7eb73)
2018-12-04 22:27:58 +01:00
Juergen Hoeller
d175d280a0 Backported decoder optimizations and related polishing
Includes downgrade to Netty 4.1.31 for StringDecoderTests.
2018-12-03 22:57:00 +01:00
Juergen Hoeller
02616fbabd Upgrade to Kotlin 1.2.71, OkHttp 3.12, FreeMarker 2.3.28
Also includes Apache HttpClient 4.5.6 and HttpAsyncClient 4.1.4.
2018-11-24 14:44:57 +01:00
Juergen Hoeller
4a51acbeb2 DefaultResponseErrorHandler detects non-standard error code as well
Issue: SPR-17439
2018-11-23 19:12:41 +01:00
Juergen Hoeller
3d7e373e5a Polishing
(cherry picked from commit 77ab88b144)
2018-11-23 19:12:30 +01:00
Juergen Hoeller
e2b74e6943 Polishing 2018-11-22 17:44:29 +01:00
Rossen Stoyanchev
567fcc41cc ForwardedHeaderTransformer handles encoding correctly
Issue: SPR-17525
2018-11-21 11:17:10 -05:00
Brian Clozel
617b94afb6 Polish
See SPR-17502
2018-11-20 18:03:07 +01:00
Brian Clozel
5342c6e493 Remove Content-Length response header from errors
Prior to this commit, when errors happened before the response was
committed, the `Content-Length` response header would be left as is.
This can be problematic since the error can be handled later in the
chain and the response body changed accordingly. For example, Spring
Boot renders error pages in those cases. If the `Content-Length` is set,
HTTP clients can get confused and only consider part of the error
response body.

This commit ensures that any `Content-Length` response header is removed
in case of errors, if the response is not already committed.

This is done at the `AbstractServerHttpResponse` level, since errors can
be handled in multiple places and the response itself is the safest
place to handle this case.

As a consequence, this commit also removes `Content-Length` checks in
`EncoderHttpMessageWriter` since we now consider that we should rely on
the response body we're about to write rather than any previously set
value.

Issue: SPR-17502
(Cherry-picked from 3203d39821)
2018-11-19 16:06:32 +01:00
Rossen Stoyanchev
18da718bf5 Enforce use of unpooled data buffers in 5.0.x
Issue: SPR-17501
2018-11-16 11:26:54 -05:00
Rossen Stoyanchev
24051619a5 Consistent encoding in DefaultUriBuilderFactory
Unlike 5,1, TEMPLATE_AND_VALUES is not the default encoding mode.
Nevertheless when that mode is used, it should work consistently.

Issue: SPR-17465
2018-11-09 14:50:39 -05:00
Rossen Stoyanchev
f73a5222f1 Ensure client response is drained with onStatus hook
Issue: SPR-17473
2018-11-08 22:33:37 -05:00
Juergen Hoeller
4bd95663f9 Polishing
(cherry picked from commit 5e7a8b275d)
2018-11-05 22:42:27 +01:00
Juergen Hoeller
3ceb05f63c Upgrade to Jackson 2.9.7, Netty 4.1.30, Tomcat 8.5.34, Undertow 1.4.26
Also includes Apache Johnzon 1.1.10 and JRuby 9.1.17.
2018-10-25 17:39:47 +02:00
Juergen Hoeller
d5f725d503 Polishing
(cherry picked from commit ffa032e78f)
2018-10-24 21:24:42 +02:00
Rossen Stoyanchev
36510cf808 Server adapters release buffers on error/cancel
Review and update Servlet and Undertow adapters to release any data
buffers they be holding on to at the time of error or cancellation.

Also remove onDiscard hooks from Reactor and Undertow request body.
For Reactor we expect it to be handled. For Undertow there isn't
any Reactor Core upstream for the callback to be useful.

Issue: SPR-17410
2018-10-23 20:56:08 -04:00
Rossen Stoyanchev
c8e320019f HttpRange validates requested ranges
Issue: SPR-17318
2018-10-14 22:53:33 -04:00
Rossen Stoyanchev
d551710c32 Restore calls to setLocale in MockHttpServletResponse
Issue: SPR-17284
2018-10-05 13:53:19 -04:00
Rossen Stoyanchev
6fe8cb949f Workaround for Synchronoss content-length limitation
Issue: SPR-17345
2018-10-05 13:52:58 -04:00
Juergen Hoeller
a21ce42558 MockHttpServletRequest allows for removing registered header entries
Issue: SPR-17295
2018-09-29 17:36:03 +02:00
Juergen Hoeller
5ca2c56cf0 Polishing 2018-09-17 14:39:54 +02:00
Juergen Hoeller
94ae933122 Upgrade to Rhino 1.7.10 and Apache Johnzon 1.1.9
Includes reordering of web dependency declarations.
2018-09-14 14:29:57 +02:00
Juergen Hoeller
1d58fac54d UriComponentsBuilder copies query params through MultiValueMap.addAll
Issue: SPR-17256
2018-09-11 15:15:15 +02:00
Juergen Hoeller
658bd7a686 Correct linkplain javadoc in BufferingClientHttpRequestFactory
Issue: SPR-17261

(cherry picked from commit e47355078c)
2018-09-11 15:15:00 +02:00
Rossen Stoyanchev
92bb76f3cd Disable Jackson's buffer recyling feature for WebFlux
Issue: SPR-17193
2018-09-06 16:21:27 -04:00
Brian Clozel
6189e17d7c Fix empty body writing in EncoderHttpMessageWriter
Prior to this commit, an bug introduced in SPR-16949 prevented
`Mono.empty` bodies from being written to the response.

This commit ensures that empty bodies still trigger the writing to the
response and does not hang the processing of the exchange.

Issue: SPR-17220
Cherry-picked from: 280da61d5c
2018-08-27 21:19:12 +02:00
Juergen Hoeller
b5270a9cff Polishing 2018-08-24 12:39:03 +02:00
Juergen Hoeller
a44fe4cbe4 Support Jackson filters in combination with serialization view
Issue: SPR-17209

(cherry picked from commit 03f1920106)
2018-08-24 12:38:51 +02:00
Juergen Hoeller
92228f9e64 Fix recent javadoc errors
Issue: SPR-17174
2018-08-16 19:24:38 +02:00
Juergen Hoeller
37db3ba834 Polishing
(cherry picked from commit 6027cf2255)
2018-08-14 21:45:25 +02:00
Juergen Hoeller
0e3f23eeb7 Polishing 2018-08-13 13:42:19 +02:00
Rossen Stoyanchev
f23496ae32 Fix URI var encoding issue with '$'
When expanding and strictly encoding URI variables, there is no need to
quote `/` and `$` which will be encoded anyway.

Issue: SPR-17168
2018-08-13 11:57:44 +03:00