Commit Graph

3692 Commits

Author SHA1 Message Date
Rossen Stoyanchev 443c34cc90 CorsRegistry implements combine correctly
Closes gh-26877
2021-05-05 21:02:25 +01:00
Rossen Stoyanchev b76e0c4826 HttpMethod#matches compares by String equality
Closes gh-26834
2021-05-04 12:09:35 +01:00
Rossen Stoyanchev 21c90829df Polishing
See gh-26834
2021-05-04 10:34:56 +01:00
Sam Brannen 5667d459a7 Polish Javadoc 2021-05-03 15:22:43 +02:00
Rossen Stoyanchev f7fc36250e Properly handle completion while in READING state
Closes gh-26834
2021-04-29 22:09:33 +01:00
Arjen Poutsma 7f1062159e Copy HttpStatus::values to prevent allocation
Before this commit, HttpStatus::resolve used the values() method in its
logic. This causes a new array to be allocated for each invocation,
and results in memory overhead.

This commit makes a copy of the HttpStatus values array, and uses that
to resolve status codes.

Closes gh-26842
2021-04-22 15:39:03 +02:00
Christoph Dreis e7cbe23771 Avoid exceptions when evaluating validation hints
Prior to this commit, evaluating validation hints for
@javax.validation.Valid caused exceptions being raised when getting the
value of this annotation, which does not exist. Bypassing
AnnotationUtils.getValue() in those cases can improve performance by
avoiding the cost incurred by raising exceptions.

See gh-26787
2021-04-22 11:19:30 +02:00
Juergen Hoeller f31933e67e Nullability refinements 2021-04-13 12:26:52 +02:00
Juergen Hoeller c7989c78c8 Polishing 2021-04-13 12:26:31 +02:00
Rebwon 7954dc7a00 Polish tests
Closes gh-26708
2021-04-12 20:11:14 +02:00
Arjen Poutsma 327e761536 Recreate file storage directory when removed in DefaultPartHttpMessageReader
Some operating systems delete temp files not just when booting up, but
also during operation. This commit makes sure that the
DefaultPartHttpMessageReader recreates the directory used to store
files in, if it's not there.

Closes gh-26790
2021-04-12 16:27:10 +02:00
Arjen Poutsma a2d91a562d Support "Accept-Patch" for unsupported media type
This commit introduces support in both servlet and webflux for the
"Accept-Patch" header, which is sent when the client sends unsupported
data in PATCH requests.
See  section 2.2 of RFC 5789.

Closes gh-26759
2021-04-08 14:46:59 +02:00
Arjen Poutsma 97f3846971 Support "Accept-Patch" for OPTIONS requests
This commit introduces support in both servlet and webflux for the
"Accept-Patch" header in OPTIONS requests, as defined in section 3.1 of
RFC 5789.

See gh-26759
2021-04-08 14:43:49 +02:00
Rossen Stoyanchev c5ac8e8ab6 Use createUnresolved for forwarded header address
Avoid DNS resolution.

See gh-26748
2021-04-07 12:50:07 +01:00
Rossen Stoyanchev 8a1182a678 Additional validation for forwarded header address value
Closes gh-26748
2021-04-06 19:43:13 +01:00
Rossen Stoyanchev 5e1e29a2dd Fix failing tests
See gh-26746
2021-03-31 12:25:39 +01:00
Rossen Stoyanchev 7dc3a55648 Deferred buffer allocation in SSE message writer
See gh-26746
2021-03-31 11:47:22 +01:00
Arjen Poutsma d83fb09914 Change header encoding to UTF8 in DefaultPartHttpMessageReader
This commit changes the encoding used to parse multipart headers from
ISO-8859-1 to UTF-8, in accordance with RFC 7578.

Closes gh-26736
2021-03-30 10:51:19 +02:00
Rossen Stoyanchev 1a9556925d missingAfterConversion flag for missing request values
Closes gh-26679
2021-03-29 15:23:29 +01:00
Rossen Stoyanchev 41d5048280 Add BlockHoundIntegration for spring-web
Closes gh-26712
2021-03-22 21:18:48 +00:00
Sam Brannen 70f0895f96 Polish HeaderWebSessionIdResolverTests
See gh-26675
2021-03-15 12:12:53 +01:00
MaengSol 2728a9b931
Polishing
Closes gh-26675
2021-03-15 12:02:40 +01:00
Rossen Stoyanchev 6d4c0091b5 Add application/*+xml to Jaxb2XmlEncoder
Closes gh-26655
2021-03-10 17:33:04 +00:00
Rossen Stoyanchev 55aa8e914e Expose id from ClientHttpResponse
Closes gh-26656
2021-03-10 17:33:04 +00:00
Rossen Stoyanchev 1ef8cad7bc Make use of Reactor Netty's ChannelOperationsId
Closes gh-26649
2021-03-08 21:06:49 +00:00
Rossen Stoyanchev 8bdc53ac5c Fix log message
See gh-gh-26434
2021-03-04 22:13:52 +00:00
Rossen Stoyanchev acb638f828 WriteResultPublisher propagates cancel upstream
Closes gh-26642
2021-03-04 20:58:18 +00:00
Rossen Stoyanchev 78f65c4ca9 Consistent handling on Servlet non-blocking error callbacks
See gh-26434
2021-03-04 13:58:21 +00:00
Rossen Stoyanchev 42e4ca1e2d Improve logging for Servlet / Reactive Streams adapters
See gh-26434
2021-03-04 13:58:21 +00:00
Rossen Stoyanchev d23a108e76 Consolidate AsyncListener registration
Previously we registered 3 AsyncListener's from the request, from the
response, and from the Servlet adapter.

After this change, only the Servlet adapter registers a listener and
the others are delegated to. This consolidates the handling of
AsyncListener events so that it's easier to discover, trace, and
enforce the order of handling.

See gh-26434
2021-03-04 13:58:21 +00:00
Arjen Poutsma b61643b71a Support UTF-16/UTF-32 in Jackson message converter
This commit makes sure that we let Jackson deal with all the encodings
that it supports, including UTF-16 and UTF-32.

Closes gh-26627
2021-03-02 14:45:48 +01:00
Brian Clozel 5a11569790 Allow ServerHttpRequest content-type mutation
Prior to this commit, `ServerHttpRequest.mutate()` would not reflect
changes made on the "Accept" and "Content-Type" HTTP headers.
This was due to the fact that the instantiation of a new request based
on the mutated values would not use the writable HTTP headers used
during the mutation, but rather a read-only view of the headers backed
by `ReadOnlyHttpHeaders`.

`ReadOnlyHttpHeaders` caches those values for performance reasons, so
getting those from the new request would not reflect the changes made
during the mutation phase.

This commit ensures that the new request uses the mutated headers.

Fixes gh-26615
2021-03-01 20:55:03 +01:00
Arjen Poutsma 1a79c54b01 Support quoted boundary in DefaultPartHttpMessageReader
This commit makes sure that quoted boundary parameters are supported in
the DefaultPartHttpMessageReader.

Closes gh-26616
2021-03-01 14:07:20 +01:00
Juergen Hoeller 4af7a6863b Polishing 2021-02-26 17:49:10 +01:00
Juergen Hoeller 48bd81341f Add javadoc for body parameter
See gh-26613
2021-02-26 17:31:14 +01:00
k3v1n 118d8133d3 Add missing nullable annotation to ResponseEntity ok convenience method 2021-02-26 17:00:32 +01:00
Rossen Stoyanchev c2137a0d2f Cancel handling onError/Timeout in ServletHttpHandlerAdapter
This commit ensures handling is cancelled in case of onError/Timeout
callback from the Servlet container.

Separately we detect the same in ServletServerHttpRequest and
ServletServerHttpResponse, which signal onError to the read publisher
and cancel writing, but if the onError/Timeout arrives after reading
is done and before writing has started (e.g. longer handling), then
neither will reach handling.

See gh-26434, gh-26407
2021-02-26 14:29:01 +00:00
Rossen Stoyanchev 8ed7f4703b Improve Javadoc for responseType on RestTemplate#exchange
Closes gh-26599
2021-02-25 18:29:05 +00:00
Rossen Stoyanchev e04269cadd Consistently check DispatcherType to avoid NPE in tests
Closes gh-26602
2021-02-25 18:20:34 +00:00
Johnny Lim dfc8406917
Polish contribution
See gh-26462
Closes gh-26586
2021-02-22 11:05:25 +01:00
Sam Brannen 5b97c47fc4 Sync changes in MockHttpServletResponse test fixture
See gh-26558
2021-02-17 14:32:39 +01:00
Juergen Hoeller ca8261cbf8 Polishing 2021-02-15 17:18:01 +01:00
Stephane Nicoll 582559dd9e Polish "Allow customer resolver and property sources"
See gh-26462
2021-02-15 16:53:18 +01:00
Phillip Webb d4c609f2f0 Allow customer resolver and property sources
Add factory methods to `AbstractEnvironment` that allow a custom
`ConfigurablePropertyResolver` and `MutablePropertySources` instance
to be used.

See gh-26462
2021-02-15 16:53:18 +01:00
Sébastien Deleuze 9c6b1b645d Prevent kotlinx.serialization usage on collection of interfaces
Closes gh-26371
2021-02-15 14:44:54 +01:00
Rossen Stoyanchev 0fc8bf654b Expose DispatcherHandler as PreFlightRequestHandler
Closes gh-26257
2021-02-15 12:59:03 +00:00
Juergen Hoeller df977a2fd2 Nullability refinements and related polishing 2021-02-14 17:57:32 +01:00
Rossen Stoyanchev 1c6bab23ea Polishing
See gh-26434
2021-02-11 21:26:37 +00:00
Rossen Stoyanchev 3e502d4739 Document removal of duplicate slashes in UriComponentsBuilder
Closes gh-26457
2021-02-11 20:57:03 +00:00
Rossen Stoyanchev 8791928f61 Update variable detection in UriComponentsBuilder#encode
This commit better aligns how URI variable placeholders are detected
in UriComponentsBuilder#encode (i.e. the pre-encoding of the literal
parts of a URI template) and how they are expanded later on.
The latter relies on a pattern that stops at the first closing '}'
which excludes the possibility for well-formed, nested placeholders
other than variables with regex syntax, e.g. "{year:\d{1,4}}".

UriComponentsBuilder#encode now also stops at the first closing '}' and
further ensures the placeholder is not empty and that it has '{' before
deciding to treat it as a URI variable.

Closes gh-26466
2021-02-11 08:34:06 +00:00
Stephane Nicoll 87c0e9b48a Update copyright of change file
See gh-26538
2021-02-11 08:58:50 +01:00
izeye 9a4164c4a8 Polish
See gh-26538
2021-02-11 08:57:32 +01:00
Rossen Stoyanchev 53cafe728c Support to customize rather than replace default codecs
See gh-26212
2021-02-09 18:40:00 +00:00
Rossen Stoyanchev 26000ee29f Polishing contribution
Closes gh-26502
2021-02-08 17:35:59 +00:00
Christophe Maillard 0c2c66b38b Add HttpHandlerDecoratorFactory
See gh-26502
2021-02-08 15:47:21 +00:00
Rossen Stoyanchev f7c952cb3e Polishing contribution
Closes gh-26512
2021-02-05 13:28:19 +00:00
ascopes 6bc7e12bcd Fix typos in ResponseEntity Javadoc
See gh-26512
2021-02-05 13:28:19 +00:00
Rossen Stoyanchev 8fb9796d1d Polishing contribution
Closes gh-26463
2021-02-05 12:16:59 +00:00
Yusuke Yamamoto a264013d7a Content-Disposition can parse BASE64 encoded filename
See gh-26463
2021-02-05 12:16:59 +00:00
Rossen Stoyanchev 0d16c9100a MIME types by Class for Encoder, Decoder, HttpMessageReader|Writer
Closes gh-26212
2021-02-04 16:12:57 +00:00
Rossen Stoyanchev 7cdaaa22bd Extra ObjectMapper registrations in Jackson2CodecSupport
See gh-26212
2021-02-04 16:12:57 +00:00
Rossen Stoyanchev f4c9f6b860 Media types by Class for HttpMessageConverter
See gh-26212
2021-02-04 16:12:57 +00:00
Rossen Stoyanchev 1721b0b8d7 Extra ObjectMapper registrations in HttpMessageConverter
See gh-26212
2021-02-04 16:12:57 +00:00
Rossen Stoyanchev c52526ad42 Fix in MockMultipartHttpServletRequest#getMultipartHeaders
Previously this method returned headers only when a Content-Type part header
was present. Now it is guaranteed to return headers (possibly empty) as long
as there is a MultipartFile or Part with the given name.

Closes gh-26501
2021-02-03 21:55:42 +00:00
Toshiaki Maki 0575e6637c Protobuf Codec supports application/vnd.google.protobuf 2021-02-02 16:55:10 +00:00
Sam Brannen 99bd8115dd Clean up deprecation warnings in Gradle build output 2021-02-02 11:37:30 +01:00
Sam Brannen 1a3ff83157 Remove obsolete code in HeaderValueHolder 2021-02-02 11:28:32 +01:00
Sam Brannen c19b2851f1 Ignore null Locale in MockHttpServletResponse
Prior to this commit, calls to setLocale() MockHttpServletResponse
would result in a NullPointerException if the supplied Locale was null.

Although the Javadoc for setLocale(Locale) and addHeader(String, String)
in javax.servlet.ServletResponse does not specify how a null
Locale should be handled, both Tomcat and Jetty simply ignore a null
value.

This commit therefore updates MockHttpServletResponse to silently
ignore a null Locale passed to setLocale().

Closes gh-26493
2021-02-02 11:18:34 +01:00
Sam Brannen 3b4a3431d4 Ignore null header value in MockHttpServletResponse
Prior to this commit, calls to setHeader() and addHeader() in
MockHttpServletResponse would result in an IllegalArgumentException or
NullPointerException if the supplied header value was null.

Although the Javadoc for setHeader(String, String) and
addHeader(String, String) in javax.servlet.http.HttpServletResponse
does not specify how a null header value should be handled, both Tomcat
and Jetty simply ignore a null value. Furthermore,
org.springframework.http.HttpHeaders.add(String, String) declares the
headerValue parameter as @Nullable.

This commit therefore updates MockHttpServletResponse to silently
ignore null header values passed to setHeader() and addHeader().

Closes gh-26488
2021-02-02 11:18:34 +01:00
fengyuanwei c82a445094 Fix Javadoc in StandardServletAsyncWebRequest 2021-02-01 08:27:40 +00:00
Rossen Stoyanchev 0ff50d6d9e Improve Javadoc of ServerHttpRequest#getPath
Closes gh-26469
2021-01-29 20:40:13 +00:00
Rossen Stoyanchev ecf5113e0e Handle forwarded header parse issues
Closes gh-26459
2021-01-28 20:45:26 +00:00
Gediminas Rimša 80c4e6bb95 Fix ContentCachingResponseWrapper comment typo 2021-01-28 17:53:38 +00:00
Rossen Stoyanchev 5e5d8e4a23 Handle flushingFailed() for Servlet containers
Closes gh-26434
2021-01-28 17:03:35 +00:00
Sam Brannen c5284009a1 Fix UriComponentsBuilder examples in ref docs
Closes gh-26453
2021-01-27 15:16:15 +01:00
Rossen Stoyanchev e80a23d6ad Fix CheckStyle violations 2021-01-26 17:51:52 +00:00
Rossen Stoyanchev 8aeae49f40 Support for servletPath prefix in ServletRequestPathUtils
Closes gh-26445
2021-01-26 17:30:16 +00:00
Rossen Stoyanchev f22e2ac578 Add HttpServletMapping support to MockHttpServletRequest
See gh-26428
2021-01-26 17:30:16 +00:00
Rossen Stoyanchev bad8954e65 Append unique number to log prefix for Undertow
Closes gh-26430
2021-01-22 15:26:48 +00:00
Rossen Stoyanchev aa7584d252 Support for Jetty 10
Closes gh-26123
2021-01-21 20:16:21 +00:00
Arjen Poutsma e537844a09 Copy headers from part in MultipartBodyBuilder
This commit makes sure that Part.headers() is copied over when adding a
part in the MultipartBodyBuilder.

Closes gh-26410
2021-01-21 16:24:59 +01:00
izeye 469eb8146e Add a missing space in exception message
Closes gh-26385
2021-01-14 12:01:04 +00:00
Rossen Stoyanchev a7413ea76b Add recommendation for original multipart filename
See gh-26299
2021-01-12 17:28:44 +00:00
Sébastien Deleuze 2d53570f4c Prevent kotlinx.serialization usage on interfaces
Remove support for open polymorphic serialization in
kotlinx.serialization web converters and codecs in order
to prevent serialization handling suitable for Jackson
or other general purpose Java JSON libraries.

This will probably need further refinements for collections
for example, and could ultimately be fixed when
kotlinx.serialization will provide a dedicated function to
evaluate upfront if a type can be serialized or not.

Closes gh-26298
2021-01-11 19:07:59 +01:00
Juergen Hoeller be5eb7037f Explicit notes on non-null enforcement and deep cause support in 5.3
Closes gh-26296
See gh-26317
2021-01-11 19:04:12 +01:00
Sam Brannen 2fd6e6e87c Polish Javadoc for base ExceptionHandlerMethodResolvers 2021-01-11 12:58:19 +01:00
Sam Brannen 570bdbd253 Avoid unnecessary sorting in base ExceptionHandlerMethodResolvers 2021-01-11 12:58:19 +01:00
Brian Clozel e4dc863ad0 Fix headers keySet in WebFlux adapters
Prior to this commit, WebFlux native headers adapters would delegate the
`httpHeaders.keySet` to underlying implementations that do not honor the
`remove*` methods.

This commit fixes the `Set` implementation backing the
`httpHeaders.keySet` and ensures that headers can be safely removed from
the set.

Fixes gh-26361
2021-01-11 09:18:10 +01:00
Rossen Stoyanchev 689b5566bf Cache "no match" result from ExceptionHandler methods
Closes gh-26339
2021-01-08 19:25:11 +00:00
Arjen Poutsma 234b4719c6 Use default bounded elastic scheduler
Instead of using a new bounded elastic scheduler per
DefaultPartHttpMessageReader instance, which creates daemon threads that
are not shut down, we now use the shared bounded elastic scheduler.

Closes gh-26347
2021-01-08 14:32:49 +01:00
Arjen Poutsma ce1ae2f1b2 Only write non-default charset in FormHttpMessageConverter
This commit only writes the 'charset' parameter in the written headers
if it is non-default (not UTF-8), since RFC7578 states that the only
allowed parameter is 'boundary'.

See gh-25885
Closes gh-26290
2021-01-08 14:03:58 +01:00
Arjen Poutsma 69ce7d33b9 Polishing 2021-01-08 12:02:13 +01:00
Rossen Stoyanchev 138f6bfd84 Update Javadoc of FilePart#filename
See gh-26299
2021-01-07 11:26:00 +00:00
Rossen Stoyanchev fb040479eb Update Javadoc of MultipartFile#getOriginalFilename
Closes gh-26299
2021-01-06 21:56:14 +00:00
Rossen Stoyanchev c040cd7b05 Parsed RequestPath is recalculated on Forward
Closes gh-26318
2021-01-06 21:56:14 +00:00
Brian Clozel dcc8dcdff8 Set content length on ServletHttpResponse
Prior to this commit, the `ServletServerHttpResponse` would copy headers
from the `HttpHeaders` map and calls methods related to headers exposed
as properties (content-type, character encoding).

Unlike its reactive variant, this would not set the content length.
Depending on the Servlet container implementation, this could cause
duplicate Content-Length response headers in the actual HTTP response.

This commit aligns both implementations and ensures that the
`setContentLengthLong` method is called if necessary so that the Servlet
container can ensure a single header for that.

Fixes gh-26330
2021-01-06 20:38:45 +01:00
Rossen Stoyanchev faa749934b Minor refactoring
- Remove unused clone() code left-over from previous way of cloning.
- Lazy instantiation of ServerCodecConfigurer in
  HttpWebHandlerAdapter since in most cases the configurer instance
  is set externally.

Closes gh-26263
2021-01-05 17:20:26 +00:00
Rossen Stoyanchev e1385090e4 Cached codec instances in DefaultCodecs
Closes gh-26263
2021-01-05 17:20:26 +00:00
Rossen Stoyanchev 994a35d691 Mutated ServerHttpRequest returns native request correctly
Closes gh-26304
2021-01-04 21:40:25 +00:00
Rossen Stoyanchev 499be70a71 Update async dispatch check in OncePerRequestFilter
We no longer need to rely on an indirect check since Servlet 3.0 is expected
so we can just check the DispatcherType of the request.

Closes gh-26282
2020-12-17 17:33:39 +00:00
Rossen Stoyanchev 0cf5005a3d Apply abortOnCancel in JettyClientHttpConnector
This new option allows a cancel signal to abort the request, which is
how we expect a connection to be aborted in a reactive chain that
involves the WebClient.

Closes gh-26287
2020-12-17 17:18:38 +00:00
Rossen Stoyanchev f07fc76cf3 Limit scheme/host check in fromUriString to HTTP URLs
Closes gh-26258
2020-12-17 14:49:57 +00:00
Juergen Hoeller fbd2ffdd23 Consistent declarations and assertions in MockMultipartFile
See gh-26261
2020-12-16 22:27:33 +01:00
Brian Clozel 83c19cd60e Fix NPE when calling NettyHeadersAdapter.add()
Prior to this commit, the `NettyHeadersAdapter` would directly delegate
the `add()` and `set()` calls to the adapted
`io.netty.handler.codec.http.HttpHeaders`. This implementation rejects
`null` values with exceptions.

This commit aligns the behavior here with other implementations, by not
rejecting null values but simply ignoring them.

Fixes gh-26274
2020-12-15 13:23:53 +01:00
izeye 17e6cf1cc1 Replace AtomicReference<Boolean> with AtomicBoolean in AbstractServerHttpResponse.writeWith() 2020-12-12 10:40:05 +01:00
Rossen Stoyanchev 25101fb034 Additional fixes for discarding data buffers
Closes gh-26232
2020-12-08 21:33:50 +00:00
Rossen Stoyanchev cb44ae62e9 Additional DataBuffer hints
See gh-26230
2020-12-08 18:43:54 +00:00
Juergen Hoeller 1195b3a0b0 Polishing 2020-12-08 10:39:56 +01:00
Rossen Stoyanchev 7418c4b7b7 Fix buffer leak in AbstractServerHttpResponse
See gh-26232
2020-12-07 22:52:08 +00:00
Rossen Stoyanchev ad42010785 Correlate data buffers to request log messages
HttpMessageWriter implementations now attach the request log prefix
as a hint to created data buffers when the logger associated with
the writer is at DEBUG level.

Closes gh-26230
2020-12-07 22:29:07 +00:00
Rossen Stoyanchev 7ef3257b03 Correctly determine HttpServletMapping for INCLUDE
Closes gh-26216
2020-12-07 17:44:22 +00:00
VonUniGE ec7425c1f4 Fix typo in javadoc for ResponseExtractor 2020-12-04 16:18:59 +00:00
Rossen Stoyanchev 8ac39a50fe ServletServerHttpResponse reflects Content-Type override
Closes gh-25490
2020-12-03 18:41:18 +00:00
Brian Clozel 9776929a9d Mention security considerations in Forwarded filters
This commit improves the Javadoc for the `ForwardedHeaderFilter`
(Servlet Filter) and `ForwardedHeaderTransformer` (reactive variant) so
as to mention security considerations linked to Forwarded HTTP headers.

Closes gh-26081
2020-12-03 15:40:31 +01:00
Arjen Poutsma a1320cd450 Add SSE support to WebMvc.fn
This commit adds support for sending Server-Sent Events in WebMvc.fn,
through the ServerResponse.sse method that takes a SseBuilder DSL.
It also includes reference documentation.

Closes gh-25920
2020-12-02 15:14:47 +01:00
Rossen Stoyanchev 5328184f3a ContentCachingResponseWrapper skips contentLength for chunked responses
Closes gh-26182
2020-12-01 17:46:12 +00:00
Rossen Stoyanchev 0c825621b8 Avoid use of Optional wrapper to get List<MediaType>
See gh-26170
2020-11-30 17:30:45 +00:00
Сергей Цыпанов 42216b77df Remove unused package-private class o.s.w.u.p.SubSequence 2020-11-26 15:31:21 +01:00
Sébastien Deleuze 43faa439ab Refine kotlinx.serialization support
This commit introduces the following changes:
 - Converters/codecs are now used based on generic type info.
 - On WebMvc and WebFlux, kotlinx.serialization is enabled along
   to Jackson because it only serializes Kotlin @Serializable classes
   which is not enough for error or actuator endpoints in Boot as
   described on spring-projects/spring-boot#24238.

TODO: leverage Kotlin/kotlinx.serialization#1164 when fixed.

Closes gh-26147
2020-11-26 12:36:35 +01:00
Juergen Hoeller 73e1f24ac1 Restore HttpHeaders-based constructor for binary compatibility
Closes gh-26151
2020-11-25 11:36:12 +01:00
Rossen Stoyanchev 80701082cd Set favorPathExtension to false by default
Applies a change that was intended in #23915 but wasn't.

Closes gh-26119
2020-11-24 17:31:28 +00:00
Arjen Poutsma 3612990344 Polishing 2020-11-24 14:41:39 +01:00
Arjen Poutsma dea2029e94 Only write non-default charset in MultipartWriterSupport
This commit only writes the 'charset' parameter in the written headers
if it is non-default (not UTF-8), since RFC7578 states that the only
allowed parameter is 'boundary'.

Closes gh-25885
2020-11-24 14:41:39 +01:00
Juergen Hoeller 4fb5d59c64 Declare resolvedCharset as transient (restoring serializability)
Closes gh-26127
2020-11-20 18:40:10 +01:00
Rossen Stoyanchev 8c3a05bbcf Allow "*" for Access-Control-Expose-Headers
Closes gh-26113
2020-11-19 09:20:55 +00:00
Juergen Hoeller 4cc831238c Revise Servlet 4 HttpServletMapping check
Closes gh-26112
2020-11-18 15:30:20 +01:00
Marten Deinum c9b27af64f Reduce overhead of char[] creation
There are more locations which could benefit from not using a
toCharArray on a String, but rather use the charAt method from
the String itself. This to prevent an additional copy of the
char[] being created.
2020-11-17 11:57:09 +01:00
Juergen Hoeller 7206a23d33 Consistent attribute value spelling for PATH_ATTRIBUTE
See gh-24945
2020-11-16 17:40:39 +01:00
Rossen Stoyanchev 204a7fe91f UrlPathHelper.removeJsessionid correctly appends remainder
Closes gh-26079
2020-11-12 21:28:18 +00:00
Rossen Stoyanchev ba9325446c Optimize WebClientUtils
Use constant Predicate for exception wrapping.
Use ResponseEntity constructor instead of builder.

See gh-26069
2020-11-12 18:43:36 +00:00
Juergen Hoeller 6825287360 Polishing 2020-11-09 18:18:33 +01:00
izeye 0c347769a2 Fix wrong reference in UrlPathHelper.removeSemicolonContentInternal()
This commit also changes to short-circuit when `slashIndex` is -1.
2020-11-09 13:08:44 +01:00
Rossen Stoyanchev 6e51370490 AbstractJackson2Encoder support for MappingJacksonValue
Closes gh-26035
2020-11-06 20:46:35 +00:00
Juergen Hoeller 19911af30a Polishing 2020-11-05 19:09:58 +01:00
Juergen Hoeller f2f84bfa7a Polishing 2020-11-05 00:04:33 +01:00
Juergen Hoeller 990a9c74b9 Restore removal of trailing semicolon content
See gh-26012
2020-11-04 23:42:28 +01:00
Сергей Цыпанов 0015fd6734 Improve URI/query strings sanitization 2020-11-04 16:28:51 +01:00
Rossen Stoyanchev 0f6038af70 Log can[Se]Deserialize error in Jackson codecs
Closes gh-25892
2020-11-02 17:25:57 +00:00
Rossen Stoyanchev 7be7e5beb4 Ensure response not closed by MappingJackson2HttpMessageConverter
Closes gh-25987
2020-10-30 18:31:30 +00:00
Nick Hitchan 6e936a4081 Remove absolute URI check from ReactorClientHttpConnector
This allows maknig use of the Unix Domain Socket support in Reactor 1.0.

Closes gh-25929
2020-10-27 12:54:18 +00:00
Sébastien Deleuze 5b910a87c3 Polishing 2020-10-26 20:10:54 +01:00
Sam Brannen 705cf09ad7 Merge branch '5.2.x' 2020-10-26 15:05:35 +01:00
Sam Brannen 449377908f Fix JUnit 4 to AssertJ migration bugs
The migration from JUnit 4 assertions to AssertJ assertions resulted in
several unnecessary casts from int to long that actually cause
assertions to pass when they should otherwise fail.

This commit fixes all such bugs for the pattern `.isNotEqualTo((long)`.
2020-10-26 14:53:09 +01:00
Rossen Stoyanchev a40cc8bbe0 Polishing contribution
Closes gh-25647
2020-10-23 18:27:49 +01:00
Riley Park 6e640c806f Improve support for Content-Disposition types
See gh-25647
2020-10-23 18:16:05 +01:00
Rossen Stoyanchev e66e34766e Support Optional in UriComponentsBuilder#queryParam
Closes gh-25951
2020-10-23 18:09:22 +01:00
Rossen Stoyanchev 5644a7aebb Polishing contribution
Closes gh-25951
2020-10-23 17:43:17 +01:00
Robin Roos 7af726480f Add queryParamIfPresent to UriComponentsBuilder
See gh-25951
2020-10-23 17:07:39 +01:00
Juergen Hoeller 621295dbd8 Deprecate StringUtils.isEmpty(Object) and replace remaining usage
Closes gh-25945
2020-10-21 16:09:26 +02:00
Brian Clozel bd91dc70d5 Merge branch '5.2.x' 2020-10-20 15:41:02 +02:00