Commit Graph

2747 Commits

Author SHA1 Message Date
Rossen Stoyanchev
3371c23343 Reinstate removal of jsessionid from lookup path
Closes gh-25864
2020-10-13 16:31:27 +01:00
Juergen Hoeller
da84155d8d Avoid outdated Jackson API in tests
See gh-25907
2020-10-13 11:24:15 +02:00
Juergen Hoeller
60a4766e9e Polishing 2020-10-13 01:29:11 +02:00
Juergen Hoeller
3fb51b0743 Polishing 2020-10-13 00:37:37 +02:00
Juergen Hoeller
187b029671 Include Part headers support in MockMultipartHttpServletRequest
See gh-25829
2020-10-12 19:49:07 +02:00
Juergen Hoeller
87b1b618fb Polishing 2020-10-12 19:25:47 +02:00
Juergen Hoeller
3b09456991 Attempt fallback Part resolution even without StandardMultipartHttpServletRequest
Closes gh-25829
2020-10-12 19:24:38 +02:00
Juergen Hoeller
7861cfab6c Polishing 2020-10-06 17:50:08 +02:00
Juergen Hoeller
db48b546ac Polishing 2020-09-25 12:20:37 +02:00
Juergen Hoeller
a3bb9b2fe4 Polishing
(cherry picked from commit f010368a66)
2020-09-15 10:12:51 +02:00
Juergen Hoeller
ec87fdb028 Polishing 2020-09-14 23:13:24 +02:00
Juergen Hoeller
c1f534548d Javadoc refinement (aligned with 5.2.x)
See gh-25509
2020-09-08 12:42:03 +02:00
Rossen Stoyanchev
385c97db9f Expose protected method in AbstractJackson2HttpMessageConverter
Closes gh-25509
2020-09-08 11:27:27 +01:00
Rossen Stoyanchev
32cbbfe111 UriComponentsBuilder Javadoc update
Closes gh-25604
2020-09-08 11:24:01 +01:00
Rossen Stoyanchev
a63c8886c0 Avoid unnecessary parsing of path params
Closes gh-25690
2020-09-08 11:07:22 +01:00
Rossen Stoyanchev
2281e42191 Shared read-only instances of UrlPathHelper
UrlPathHelper is often created and used without customizations or with
the same customizations. This commit introduces re-usable, instances.
Effectively a backport of commit 23233c.

Closes gh-25690
2020-09-08 10:55:36 +01:00
Juergen Hoeller
b0b4b47bae Explicit nullability declarations for getTarget() implementations 2020-09-01 23:31:00 +02:00
Juergen Hoeller
c9573a4fb6 Polishing 2020-09-01 10:47:37 +02:00
Juergen Hoeller
2891dc6409 Polishing 2020-08-27 15:33:08 +02:00
Juergen Hoeller
bfd20da9de Polishing (backported from 5.2.x) 2020-08-07 14:51:08 +02:00
Juergen Hoeller
ce4001dd40 Refine use of substring operations
Closes gh-25445
2020-08-07 14:50:44 +02:00
Juergen Hoeller
b254777744 Reset charset field in MockHttpServletResponse
Closes gh-25501
2020-08-07 14:50:36 +02:00
Juergen Hoeller
ab6b504692 Copy queryParams MultiValueMap through addAll (for independent List entries)
Closes gh-25423
2020-07-20 07:35:05 +02:00
Juergen Hoeller
a53d28edf1 Consistently use PropertySource.getName() for comparison
Includes synchronization for mutators on MutablePropertySources.

Closes gh-25369

(cherry picked from commit 01bab89dba)
2020-07-17 18:06:20 +02:00
Arjen Poutsma
f4ae18fa89 Support for ASCII in Jackson codec & converter
This commit introduces support for writing JSON with an US-ASCII
character encoding in the Jackson encoder and message converter,
treating it like UTF-8.

See gh-25322

(cherry picked from commit 79c339b03e)
2020-06-30 16:04:11 +02:00
Juergen Hoeller
fc5a6db84b Polishing 2020-06-23 11:47:47 +02:00
Arjen Poutsma
9a847dc5a0 Map from charset name rather than Charset
With this commit it is no longer assumed that all charset names in the
JsonEncoding can be resolved by Charset.forName. Instead, we store the
charset name itself, rather than the Charset object.
2020-06-22 09:50:56 +02:00
Brian Clozel
a82cf2fb7d Fix missing sslInfo with Reactor Netty and http/2
Prior to this commit, the `SslInfo` would be missing for WebFlux apps
when deployed on Reactor Netty with http/2.

This commit ensures that the request adapter checks the current channel
and the parent channel for the presence of the `SslHander`.
In the case of http/2, the `SslHander` is tied to the parent channel.

Fixes gh-25286
See gh-25278
2020-06-19 16:46:09 +02:00
Arjen Poutsma
df9d09389f Convert non-unicode input when reading w/ Jackson
This commit makes sure that Jackson-based message converters and
decoders can deal with non-unicode input. It does so by reading
non-unicode input messages with a InputStreamReader.

This commit also adds additional tests forthe canRead/canWrite methods
on both codecs and message converters.

Closes: gh-25247
2020-06-16 14:29:02 +02:00
Juergen Hoeller
4f81ab7e14 Polishing 2020-06-08 20:09:12 +02:00
Juergen Hoeller
7281d44178 Polishing 2020-06-06 19:14:34 +02:00
Juergen Hoeller
f965c2f5af Avoid unnecessary creation of not-found entity in ResponseEntity#of
Closes gh-25183
2020-06-06 19:14:26 +02:00
Juergen Hoeller
840ae05942 Polishing 2020-06-06 16:57:28 +02:00
Juergen Hoeller
4b7890315f Restore original readOnlyHttpHeaders signature for binary compatibility
Closes gh-25034
2020-06-06 16:56:29 +02:00
Arjen Poutsma
f81b1de2c0 Respect MimeType charset in Jackson codecs
Before this commit, Jackson2CodecSupport and subclasses
did not check media type encoding in the supportsMimeType
method (called from canEncode/canDecode).
As a result, the encoder reported that it can write
(for instance) "application/json;charset=ISO-8859-1", but in practice
wrote the default charset (UTF-8).

This commit fixes that bug.

Closes: gh-25076
2020-06-05 11:54:18 +02:00
Arjen Poutsma
d9c98801bc Respect MediaType charset in Jackson converters
Before this commit, AbstractJackson2HttpMessageConverter and subclasses
did not check media type encoding in the canRead and canWrite
methods. As a result, the converter reported that it can write
(for instance) "application/json;charset=ISO-8859-1", but in practice
wrote the default charset (UTF-8).

This commit fixes that bug.

See: gh-25076
2020-06-05 11:14:43 +02:00
Juergen Hoeller
083dd0e19d Polishing 2020-05-29 16:31:11 +02:00
Sam Brannen
16ab43d957 Polish contribution
See gh-25149
2020-05-28 15:26:50 +02:00
dlsrb6342
6c5129b829 Fix BaseCodecConfigurer clone bug
Prior to this commit, ExchangeStrategies custom codec's reader and
writer were not registered due to a bug in BaseCodecConfigurer.

This commit fixes this by correcting the implementation of the
DefaultCustomCodecs constructor used within BaseCodecConfigurer.

Closes gh-25149
2020-05-28 15:06:34 +02:00
Rossen Stoyanchev
e25e6a68cf Fix race condition in WriteResultPublisher
between subscription and error from the Publish

Closes gh-25096
2020-05-28 06:53:30 +01:00
Juergen Hoeller
4ad7deda4c Polishing 2020-05-18 15:15:46 +02:00
Rossen Stoyanchev
b22e670668 HttpHeaders#equals handles wrapping correctly
Closes gh-25034
2020-05-08 09:47:10 +01:00
Rossen Stoyanchev
42f60fe490 Fix race condition in WriteResultPublisher
Backport of c35b3e5c82

Closes gh-24989
2020-05-04 11:13:06 +01:00
Juergen Hoeller
e3175a2dc9 Polishing 2020-04-25 17:13:44 +02:00
Sam Brannen
9ab7cde00e Retain brackets for IPV6 address in MockHttpServletRequest
According to the Javadoc for ServletRequest's getServerName() method,
when the `Host` header is set, the server name is "the value of the
part before ':' in the Host header value ...". For a value representing
an IPV6 address such as `[::ffff:abcd:abcd]`, the enclosing square
brackets should therefore not be stripped from the enclosed IPV6
address.

However, the changes made in conjunction with gh-16704 introduced a
regression in Spring Framework 4.1 for the getServerName() method in
MockHttpServletRequest by stripping the enclosing brackets from the
IPV6 address in the `Host` header. Similarly, the changes made in
conjunction with gh-20686 introduced a regression in Spring Framework
4.3.13 and 5.0.2 in the getRequestURL() method in
MockHttpServletRequest by delegating to the getServerName() method
which strips the enclosing brackets.

This commit fixes the implementation of getServerName() so that the
enclosing brackets are no longer stripped from an IPV6 address in the
`Host` header. The implementation of getRequestURL() is therefore also
fixed.

In addition, in order to avoid a NullPointerException, the
implementations of getServerName() and getServerPort() now assert that
an IPV6 address present in the `Host` header correctly contains an
opening and closing bracket and throw an IllegalStateException if that
is not the case.

Closes gh-24916
2020-04-17 16:22:51 +02:00
Juergen Hoeller
a4bba6aff2 Honor overridden AcceptHeaderLocaleContextResolver.getDefaultLocale()
Closes gh-24871
2020-04-09 12:03:29 +02:00
Rossen Stoyanchev
ef013f7158 UriComponentsBuilder.cloneBuilder copies uriVariables
Closes gh-24772
2020-03-26 16:41:21 +00:00
Juergen Hoeller
9f71c98871 Expose parameter annotations from interfaces across entire class hierarchy
Closes gh-24127
2020-03-24 00:53:40 +01:00
Juergen Hoeller
5953d99d1c Mark MediaTypeNotSupportedStatusException as deprecated
Closes gh-24743
2020-03-24 00:25:53 +01:00
Juergen Hoeller
5f7df0d14f Latest dependency updates (RxJava 2.2.19, Undertow 2.0.30, Netty 4.1.47, Jetty 9.4.27, POI 4.1.2, OkHttp 3.14.7) 2020-03-13 23:42:30 +01:00