Commit Graph

2664 Commits

Author SHA1 Message Date
Juergen Hoeller
7244f03064 Avoid unnecessary creation of not-found entity in ResponseEntity#of
Closes gh-25183
2020-06-06 17:44:30 +02:00
Juergen Hoeller
f3d4df2fd4 Consistently check available local/remote addresses for non-null 2020-06-06 15:15:16 +02:00
Juergen Hoeller
ad5710c1d1 Restore original readOnlyHttpHeaders signature for binary compatibility
Closes gh-25034
2020-06-06 13:14:47 +02:00
Arjen Poutsma
847629412f 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 10:53:28 +02:00
Arjen Poutsma
eb0aae066c 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 10:52:42 +02:00
Rossen Stoyanchev
1e25556049 Shared PathPatternParser instance
See gh-25143
2020-06-03 05:58:10 +01:00
Juergen Hoeller
914425eefa Polishing 2020-05-29 15:52:39 +02:00
Sam Brannen
3201671ceb Polish contribution
See gh-25149
2020-05-28 14:37:18 +02:00
dlsrb6342
fce972eec8 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 12:34:29 +02:00
Rossen Stoyanchev
c0c3c01afd Fix race condition in WriteResultPublisher
between subscription and error from the Publish

Closes gh-25096
2020-05-27 19:11:29 +01:00
Rossen Stoyanchev
4f65ba4e74 Simplify creation of HttpContext for Apache HttpClient
Closes gh-25066
2020-05-24 21:09:49 +01:00
Rossen Stoyanchev
23a66e016e UriBuilder javadoc update
Closes gh-25055
2020-05-24 21:09:13 +01:00
Rossen Stoyanchev
c3e55d537e DefaultResponseErrorHandler javadoc update
Closes gh-25067
2020-05-23 10:41:35 +01:00
Juergen Hoeller
9631db71c4 Direct exposure of StringBuilder instead of intermediate String
Closes gh-25024
2020-05-18 20:09:24 +02:00
Juergen Hoeller
c35b21b49f Consistent not-null assertions for configured interceptors
Closes gh-25088
2020-05-18 14:23:05 +02:00
Rossen Stoyanchev
19ba9087f5 HttpHeaders#equals handles wrapping correctly
Closes gh-25034
2020-05-08 09:37:37 +01:00
Rossen Stoyanchev
aa97563853 Add UnknownContentTypeException
Closes gh-24964
2020-05-01 17:32:19 +01:00
Rossen Stoyanchev
c35b3e5c82 Fix race condition in WriteResultPublisher
Closes gh-24989
2020-05-01 17:06:18 +01:00
Rossen Stoyanchev
583435d068 Consistent ordering in MethodNotAllowedException
This caused random failures in a newly added test. Also remove defensive
check in ResponseStatusExceptionResolver.

See gh-24944
2020-04-25 07:33:30 +01:00
Rossen Stoyanchev
18474c921d Document IAE in HttpHeaders methods that parse ETags
See gh-24950
2020-04-24 13:02:12 +01:00
Brian Clozel
dc4cda1b13 WARN against invalid patterns with PathPatternParser
As of gh-24952, `PathPatternParser` will strictly reject patterns with
`"**"` in the middle of them. `"**"` is only allowed at the end of the
pattern for matching multiple path segments until the end of the path.

Currently, if `"**"` is used in the middle of a pattern it will be
considered as a single `"*"` instead. Rejecting such cases should
clarify the situation.

This commit prepares for that upcoming change and:

* logs a warning message if such a case is used by an application
* expands the MVC and WebFlux documentation about URI matching in
general

Closes gh-24958
2020-04-23 13:03:05 +02:00
Rossen Stoyanchev
8d31dcaa29 Clarification on path extension deprecations
Closes gh-24642
2020-04-20 14:43:07 +01:00
Deycoesr
87f28ce48e Simplify some control flow code
Closes gh-24925
2020-04-17 18:32:02 +02:00
Oliver Degener
df291a39b1 Fix Javadoc link in DefaultCorsProcessor
Closes gh-24921
2020-04-17 09:26:53 +02:00
Sébastien Deleuze
67955dfb35 Prevent duplicated Vary headers in CORS processing
Closes gh-24829
2020-04-15 11:23:59 +02:00
Juergen Hoeller
de0d06fab5 Polishing 2020-04-09 11:49:35 +02:00
Lars Grefer
8682a5d89a Honor overriden AccepptHeaderLocaleContextResolver.getDefaultLocale() 2020-04-09 11:37:50 +02:00
Sam Brannen
9f0ce09cf0 Update copyright date 2020-04-02 16:33:50 +02:00
Sam Brannen
c9e13d448a Revert change to PathPattern Javadoc 2020-04-02 16:28:26 +02:00
Gurps Bassi
4aca91c3b0 corrected javadoc 2020-04-01 22:05:53 +01:00
Rossen Stoyanchev
7d0f48289b Improve error handling in WebAsyncManager
See gh-24835
2020-04-01 18:35:22 +01:00
Sam Brannen
d8567749b8 Fix Javadoc 2020-03-31 19:14:56 +02:00
Sam Brannen
89d282125a Ensure logPrefix is not null or blank in AbstractListenerWriteProcessor 2020-03-31 18:49:05 +02:00
Sam Brannen
e87ab6f4ee Update Javadoc for AbstractListenerWriteProcessor.write()
Co-authored-by: Rossen Stoyanchev <rstoyanchev@pivotal.io>
2020-03-31 18:47:06 +02:00
Sam Brannen
e26764d249 Remove duplicate words in documentation and polish Javadoc 2020-03-31 12:17:58 +02:00
Sam Brannen
9e30620ac2 Polish contribution
See gh-24805
2020-03-30 13:47:00 +02:00
Сергей Цыпанов
e63d1cf12d Improve usage of ByteArrayOutputStream/ByteArrayInputStream
Closes gh-24805
2020-03-30 13:22:21 +02:00
Qimiao Chen
f8ff4e42b9 Use try-with-resource to close resources
Closes gh-24807
2020-03-30 12:05:29 +02:00
Rossen Stoyanchev
dd3dd5d67d UriComponentsBuilder.cloneBuilder copies uriVariables
Closes gh-24772
2020-03-26 16:31:25 +00:00
Johnny Lim
0f50a9a60a Fix empty domain handling in ResponseCookie
This commit also updates its test to use its intended inputs.
2020-03-25 08:18:03 +00:00
Juergen Hoeller
1800b10717 Expose parameter annotations from interfaces across entire class hierarchy
Closes gh-24127
2020-03-23 17:57:44 +01:00
Juergen Hoeller
7ebd850b85 Mark MediaTypeNotSupportedStatusException as deprecated
Closes gh-24743
2020-03-23 17:56:28 +01:00
Rossen Stoyanchev
e11373fe69 Unwrap XMLStreamException from cause
Closes: gh-24622
2020-03-23 12:22:43 +00:00
Rossen Stoyanchev
a7fe6b8f5c Avoid NPE in ResponseCookie on null domain
See gh-24663
2020-03-19 12:18:29 +00:00
Rossen Stoyanchev
b121c0e2ea Avoid ClassCastException in TomcatHttpHandlerAdapter
Closes gh-24707
2020-03-19 12:17:24 +00:00
Sam Brannen
17140c8d4b Polish contribution
See gh-24595
2020-03-17 17:15:12 +01:00
Andrew Woodbury
2fb13d410d Include response body in UnknownHttpStatusCodeException
Spring Framework 5.2.2 introduced a regression in
DefaultResponseErrorHandler.handleError(ClientHttpResponse)
Specifically, for use cases where the InputStream had already been
consumed by the first invocation of getResponseBody(), the second
invocation of getResponseBody() resulted in the response body being
absent in the created UnknownHttpStatusCodeException.

This commit fixes this by invoking getResponseBody() only once in
DefaultResponseErrorHandler.handleError(ClientHttpReponse) in order to
reuse the retrieved response body for creating the exception message
and as a separate argument to the UnknownHttpStatusCodeException
constructor.

Closes gh-24595
2020-03-17 17:06:57 +01:00
Sam Brannen
a8feb792da Fix broken Javadoc links 2020-03-16 16:30:27 +01:00
Rossen Stoyanchev
a599859595 ServerCookie ignores empty domain with double quotes
Closes gh-24663
2020-03-12 12:21:19 +00:00
Juergen Hoeller
6df80a8f70 Restore original JsonMappingException handling (assuming invalid input)
Closes gh-24610
Closes gh-24630
Closes gh-24646
2020-03-11 14:51:36 +01:00