Commit Graph

1614 Commits

Author SHA1 Message Date
Christophe Maillard
0c2c66b38b Add HttpHandlerDecoratorFactory
See gh-26502
2021-02-08 15:47:21 +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
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
Sam Brannen
99bd8115dd Clean up deprecation warnings in Gradle build output 2021-02-02 11:37:30 +01:00
Sam Brannen
c5284009a1 Fix UriComponentsBuilder examples in ref docs
Closes gh-26453
2021-01-27 15:16:15 +01:00
Rossen Stoyanchev
8aeae49f40 Support for servletPath prefix in ServletRequestPathUtils
Closes gh-26445
2021-01-26 17:30:16 +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
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
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
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
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
Rossen Stoyanchev
7418c4b7b7 Fix buffer leak in AbstractServerHttpResponse
See gh-26232
2020-12-07 22:52:08 +00:00
Rossen Stoyanchev
8ac39a50fe ServletServerHttpResponse reflects Content-Type override
Closes gh-25490
2020-12-03 18:41:18 +00:00
Rossen Stoyanchev
5328184f3a ContentCachingResponseWrapper skips contentLength for chunked responses
Closes gh-26182
2020-12-01 17:46:12 +00: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
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
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
Rossen Stoyanchev
204a7fe91f UrlPathHelper.removeJsessionid correctly appends remainder
Closes gh-26079
2020-11-12 21:28:18 +00: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
Сергей Цыпанов
0015fd6734 Improve URI/query strings sanitization 2020-11-04 16:28:51 +01:00
Rossen Stoyanchev
7be7e5beb4 Ensure response not closed by MappingJackson2HttpMessageConverter
Closes gh-25987
2020-10-30 18:31:30 +00: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
Rossen Stoyanchev
7e647ab1d8 HttpHeadResponseDecorator sets Content-Length for Mono only
See gh-25908
2020-10-13 23:45:51 +01:00
Rossen Stoyanchev
abd79d43af Merge branch '5.2.x' into master 2020-10-13 23:42:43 +01:00
Rossen Stoyanchev
431ec906c4 Ensure buffers released in HttpHeadResponseDecorator
See gh-25908
2020-10-13 23:38:59 +01:00
Rossen Stoyanchev
1d96f6a266 HttpHeaderResponseDecorator checks for "Transfer-Encoding"
This commit extends the fix from b86c11cc9b
by checking for both existing Content-Length and Transfer-Encoding.

Closes gh-25908
2020-10-13 23:06:06 +01:00
Juergen Hoeller
cd835b3124 Merge branch '5.2.x'
# Conflicts:
#	spring-web/src/test/java/org/springframework/http/converter/json/Jackson2ObjectMapperBuilderTests.java
#	spring-web/src/test/java/org/springframework/http/converter/json/Jackson2ObjectMapperFactoryBeanTests.java
2020-10-13 11:35:36 +02:00
Juergen Hoeller
7b6293fa05 Avoid outdated Jackson API in tests
See gh-25907
2020-10-13 11:13:54 +02:00
Juergen Hoeller
a6e48811c0 Compatibility with Jackson 2.12 (tested against 2.12.0-rc1)
Closes gh-25907
2020-10-13 11:04:55 +02:00
Juergen Hoeller
a9d458f5fc Merge branch '5.2.x' 2020-10-12 19:54:21 +02:00
Juergen Hoeller
e176c4e799 Polishing 2020-10-12 19:40:50 +02:00
Juergen Hoeller
ca2b412905 Merge branch '5.2.x' 2020-10-12 18:36:35 +02:00
Juergen Hoeller
69c330d905 Attempt fallback Part resolution even without StandardMultipartHttpServletRequest
Closes gh-25829
2020-10-12 18:25:55 +02:00
Juergen Hoeller
21f2863d8e ControllerAdvice resolution detects @Order declared on @Bean method as well
Closes gh-25872
2020-10-12 18:07:17 +02:00