Commit Graph

1214 Commits

Author SHA1 Message Date
Juergen Hoeller
17f42fc97a Polishing 2017-09-08 19:42:32 +02:00
Brian Bohl
f5d689e764 Fix StringIndexOutOfBoundsException in RestTemplate
Backport for commits #81dfad and #3d61f7

Issue: SPR-15900
2017-09-01 17:00:23 -04:00
Rossen Stoyanchev
681ced8fd3 Cancel WebAsyncManager thread on request timeout
Issue: SPR-15852
2017-08-16 09:42:39 +02:00
Rossen Stoyanchev
35248498ae Fix regression in HttpPutFormContentFilter
Re-arrange the checks so that if there is no form parameter, then
immediately and unconditionally delegate to super.getParameterValues().
Or reversely if there is no super.getParameterValues() then return the
form parameter.

So the only remaining case is when combining values present in both.
In that case we'll take both only if a queryString exists.

One extra fix is to not even wrap the request if we did not parse any
form parameters at all which can happen with HttpHiddenMethodFilter.

Issue: SPR-15828, 15835
2017-08-01 12:41:45 +02:00
Rossen Stoyanchev
cd602e5904 Deprecate setContentDispositionFormData method
The method was orginally added under SPR-14547 but the example in it
was probably intended for use with Content-Disposition server response
header (file download) and not for a Content-Disposition header
within the body of a multipart request.

In a Spring application a multipart request is typically serialized
by the FormHttpMessageConverter and hence the Content-Disposition is
not explicitly set by the application.
2017-07-20 17:58:52 +02:00
Juergen Hoeller
c752ba5b38 Polishing 2017-07-19 23:55:47 +02:00
Juergen Hoeller
40b4276475 UriUtils.extractFileExtension properly handles all fragments
Issue: SPR-15786
(cherry picked from commit 13080f0)
2017-07-19 23:54:57 +02:00
Rossen Stoyanchev
4160ced64c Backport of relative redirect filter support
Issue: SPR-15717
2017-07-19 23:54:32 +02:00
Juergen Hoeller
bb6d9fabee Expression alignment and related polishing (backported from master) 2017-07-14 15:41:38 +02:00
Juergen Hoeller
121a3bf670 Always invoke Jackson serialization with AtomicReference cause
Issue: SPR-15760
(cherry picked from commit 5f767a8)
2017-07-12 22:59:29 +02:00
Rossen Stoyanchev
8d743181da Fix MockMvc + HttpPutFormContentFilter issue
Issue: SPR-15753
2017-07-11 12:03:07 +02:00
Brian Clozel
d4d609318d 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
(cherry-picked from commit baaa84e90)
2017-07-04 12:19:54 +02:00
Juergen Hoeller
fee259a3c5 WebAsyncManager defensively ignores attribute type mismatch
Issue: SPR-15709
(cherry picked from commit c4694c3)
2017-06-30 16:07:14 +02:00
Juergen Hoeller
016b7d753c Fine-tune HTTP/RMI Invoker exception handling
Issue: SPR-15684
(cherry picked from commit 535103c)
2017-06-30 16:06:53 +02:00
Juergen Hoeller
35efdf6b51 HttpComponentsAsyncClientHttpRequestFactory supports plain HttpAsyncClient as well
Issue: SPR-15664
(cherry picked from commit 7b5f96c)
2017-06-30 16:06:26 +02:00
Juergen Hoeller
b35c238d27 Cleanup of duplicate semicolons
Issue: SPR-15654
(cherry picked from commit 779deb0)
2017-06-30 16:06:05 +02:00
Juergen Hoeller
be93ee77e4 Debug-level log entry for any Jackson exception during canConvert
Issue: SPR-15582
2017-06-07 17:56:47 +02:00
Juergen Hoeller
22bf9febcc Close InputStreams in writeResourceRegionCollection (analogous to writeResourceRegion)
Issue: SPR-15559
(cherry picked from commit eaac348)
2017-06-07 17:56:21 +02:00
Rossen Stoyanchev
8c206bf477 Improve docs on forwarded headers
Issue: SPR-15612
2017-06-01 22:37:34 -04:00
Rossen Stoyanchev
04a96ffa27 Add removeOnly mode to ForwardedHeaderFilter
Issue: SPR-15610
2017-06-01 15:48:39 -04:00
Andrey Kaipov
0f8bf10aa8 Minor typo fix: form -> from
Closes gh-1411
2017-05-20 14:50:47 +02:00
Juergen Hoeller
81143a80c4 Wrap IOException as HttpMessageNotReadableException for RestTemplate usage
In the 4.3.x line, conversion exceptions do not get wrapped as RestClientException yet, so the expectation remains to receive a HttpMessageNotReadableException for conversion-level IOExceptions.

Issue: SPR-13592
2017-05-08 08:42:06 +02:00
Juergen Hoeller
9572859a35 Expect IOException instead of HttpMessageNotReadableException 2017-05-07 22:10:55 +02:00
Juergen Hoeller
78931ee3ea Polishing 2017-05-07 21:41:26 +02:00
Juergen Hoeller
1332482c40 Polishing 2017-05-04 14:09:15 +02:00
Juergen Hoeller
dab56dbb05 GenericFilterBean lazily initializes its default environment
Alignment with HttpServletBean; consistent use of EnvironmentCapable.

Issue: SPR-15469
(cherry picked from commit 1ea54eb)
2017-05-04 14:01:09 +02:00
Gregory Vandenbroucke
554c3f3d7e Full "Forwarded" header support including port number
Issue: SPR-15504
2017-05-02 17:00:48 -04:00
Phillip Webb
ee40310c92 Defer Charset.availableCharsets() call
Change the `StringHttpMessageConverter` to defer calling
Charset.availableCharsets() until absolutely necessary to help improve
startup times.

Issue: SPR-15502
2017-05-02 17:19:19 +02:00
Juergen Hoeller
a9a1f783c5 Polishing 2017-04-13 15:59:15 +02:00
Juergen Hoeller
3c8fc46568 Backported JSON converter alignment (supports method, exception messages)
Includes deprecation of getTypeToken method in GsonHttpMessageConverter.

Issue: SPR-15381
2017-04-13 15:58:53 +02:00
Juergen Hoeller
597fe0720f HandlerMethod evaluates ResponseStatus annotation for early caching
Issue: SPR-15227
(cherry picked from commit 5986f88)
2017-04-13 15:54:35 +02:00
Rossen Stoyanchev
546d7ddd07 Update @ControllerAdvice Javadoc
Issue: SPR-15432
2017-04-12 17:53:42 -04:00
Rob Winch
95099fd709 Fix ForwardedHeaderFilter preserves semicolon content
Previously a requestURI that contained ';' would have the value incorrectly stripped out when using
ForwardedHeaderFilter.

This commit ensures that the ';' is preserved when using ForwardedHeaderFilter.

Issue: SPR-15428
2017-04-10 09:15:15 -05:00
Rob Winch
f65e1edd58 Polish
Group all contextPath tests together
2017-04-10 09:15:07 -05:00
Rob Winch
0a9f98f0df Add test to ensure ForwardedHeaderFilter contextPath preserves encoding
Add a test to verify that the ForwardedHeaderFilter contextPath override preserves URL encoding
as it should.

Issue SPR-15422
2017-04-10 09:13:41 -05:00
Rob Winch
46cf4f9ba1 ForwardedHeaderFilter requestURI preserve encoding
Previously ForwardedHeaderFilter would override the requestURI with a URL decoded value. This would cause
problems when using a URL encoded requestURI since downstream Filters would not see the URL encoded
value as they should.

This commit resolves this issue by ensuring that the requestURI is properly encoded.

Issues SPR-15422
2017-04-10 09:11:08 -05:00
Bryan Kelly
d0d7a88233 Fix ForwardedHeaderFilter getRequestURL()
Previously ForwardedHeaderFilter would return the same StringBuffer for every invocation. This
meant that users that modified the StringBuffer changed the state of the HttpServletRequest.

This commit ensures that a new StringBuffer is always returned for ForwardedHeaderFilter.

Issue: SPR-15423
2017-04-07 15:45:23 -05:00
Rossen Stoyanchev
f7548a87ed Deprecations related to reactive type support in 5.0
Issue: SPR-15365
2017-04-03 09:26:46 -04:00
Juergen Hoeller
21ac764e5c Polishing 2017-03-24 13:41:34 +01:00
Juergen Hoeller
c4fda0e811 Up-to-date guidelines for serialization-based endpoints
Issue: SPR-15317
(cherry picked from commit 2236262)
2017-03-24 13:41:19 +01:00
Juergen Hoeller
22ddb35258 HeaderValueHolder.toString() exposes underlying list of header values
Issue: SPR-15375
(cherry picked from commit 15bff8f)
2017-03-24 13:40:43 +01:00
Juergen Hoeller
d0177b0f55 Revised supportedMethods null handling in HttpRequestMethodNotSupportedException
Issue: SPR-15377
(cherry picked from commit 5ea4abd)
2017-03-24 13:40:35 +01:00
Juergen Hoeller
2233ec04ff StandardMultipartFile.transferTo falls back to manual copy
Issue: SPR-15257
(cherry picked from commit b73153c)
2017-03-24 13:40:29 +01:00
Juergen Hoeller
e9ff3bb4e3 DefaultResponseErrorHandler delegate methods declared as protected
Also revises copyToByteArray/String in FileCopyUtils/StreamUtils for lenient null handling.

Issue: SPR-15329
(cherry picked from commit ab7db41)
2017-03-24 13:40:19 +01:00
Juergen Hoeller
020e51cb96 Polishing
(cherry picked from commit 94a7624)
2017-03-07 16:04:46 +01:00
Juergen Hoeller
a78066830b Retrieve newly created attribute from underlying request (marking it for update)
Issue: SPR-15300
(cherry picked from commit f30c498)
2017-03-07 16:04:39 +01:00
Juergen Hoeller
98dbc17591 Polishing 2017-03-07 10:33:48 +01:00
stonio
1db42081e5 Use String#isEmpty()
Closes gh-1335
(cherry picked from commit 7d062df)
2017-02-22 16:31:35 +01:00
Juergen Hoeller
34a0857628 Polishing
(cherry picked from commit d2cc97a)
2017-02-21 23:03:16 +01:00
Juergen Hoeller
35e37f6b60 Polishing 2017-02-20 23:15:05 +01:00