Commit Graph

1584 Commits

Author SHA1 Message Date
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
Juergen Hoeller
83bfee9201 Return null in case of no matching part even for array/collection parameter
Closes gh-25819
2020-10-12 18:07:17 +02:00
Juergen Hoeller
50b9542402 Apply handleMissingValue in case of null conversion result as well
Closes gh-23939
2020-10-12 18:07:17 +02:00
Rossen Stoyanchev
fee8abfa5f Drop "[]" from parameter names in data binding
Closes gh-25836
2020-10-07 16:44:58 +01:00
Rossen Stoyanchev
1c1bc41e24 Merge branch '5.2.x' into master 2020-10-07 12:45:51 +01:00
Rossen Stoyanchev
eb11c6fa23 Reinstate removal of jsessionid from lookup path
Closes gh-25864
2020-10-07 11:31:52 +01:00
Rossen Stoyanchev
1cd8871d7f FormHttpMessageConverter preserves MediaType parameters
Closes gh-25839
2020-10-06 18:28:39 +01:00
Сергей Цыпанов
8a04910bdd Drop explicit zeroing at instantiation of Atomic* objects 2020-10-06 15:45:12 +02:00
Sam Brannen
ba94a1216c Deprecate HttpStatus.Series.valueOf(HttpStatus) and polish
See gh-22366
2020-09-26 16:06:31 +02:00
Nico Heller
97cc89630d Remove inefficiency in HttpStatus.series()
Prior to this commit, the Series value for an HttpStatus was always
evaluated which resulted in an allocation of a Series array by invoking
Series.values() which makes a defensive copy.

This commit addresses this issue by hardcoding the corresponding Series
within the HttpStatus constructor, thereby avoiding any unnecessary
computations. In addition, a unit test has been added to verify that
all HttpStatus enum constants have a properly configured Series.

Closes gh-22366
2020-09-26 15:04:15 +02:00
Brian Clozel
61d893257e Rewrite "performance" test to JMH benchmarks
This commit rewrites the remaining "fastEnough" performance tests into
proper JMH benchmarks.

See gh-24830
2020-09-25 13:43:38 +02:00
Rossen Stoyanchev
b50ad1b9aa AbstractServerHttpResponse skips commit actions on 2nd pass
Closes gh-25753
2020-09-13 21:21:07 +01:00
Brian Clozel
b2a0978c12 Prepare for Sinks API updates in Reactor
See reactor/reactor-core#2374
All usages of this API are in tests, which are not checking overflow or
concurrent emissions - so a simple replacement with `try***` equivalents
is fine.
2020-09-11 16:34:31 +02:00
Arjen Poutsma
3bd96a665f Merge branch '5.2.x' into master 2020-09-10 11:34:44 +02:00
Arjen Poutsma
07d2c08f48 Do not tokenize Forward header value
This commit remove the tokenization previously used in
UriComponentsBuilder#adaptFromForwardedHeaders, in order to support
Forwarded headers that have multiple, comma-separated 'for' elements.

Closes gh-25737
2020-09-09 16:31:24 +02:00
Rossen Stoyanchev
dd011c991c Merge branch '5.2.x' into master 2020-09-07 21:41:30 +01:00
Rossen Stoyanchev
899761f0a8 Avoid unnecessary parsing of path params
See gh-25690
2020-09-07 21:27:52 +01:00
Arjen Poutsma
d550d344d5 Respect context path in WebMvc.fn & WebFlux.fn
This commit makes several changes in both WebMvc.fn as well as
WebFlux.fn.

 - ServerRequest now exposes a RequestPath through requestPath(), and
   pathContainer() has been deprecated.

 - The PathPredicate and PathResourceLookupFunction now respects this
   RequestPath's pathInApplication() in their path-related
   functionality.

 - When nesting, the PathPredicate now appends the matched part of the
   path to the current context path, instead of removing the matched
   part (which was done previously). This has the same result: the
   matched part is gone, but now the full path stays the same.

Closes gh-25270
2020-09-03 15:10:56 +02:00
Johnny Lim
603d7e93b9 Copy httpHandlerDecorator in copy constructor for WebHttpHandlerBuilder
This commit also polishes its Javadoc and fixes its test along the way.
2020-09-01 10:09:34 +02:00
Rossen Stoyanchev
21d25b23d9 WebFlux extension point to decorate the HttpHandler
Closes gh-25633
2020-08-27 10:50:30 +01:00
Rossen Stoyanchev
a7f71f4d9b Support filename hint for client side too
Closes gh-25516
2020-08-14 15:18:39 +01:00
Sam Brannen
4d3dd9b9f6 Clean up warnings in Gradle build 2020-08-11 17:20:27 +02:00
Sam Brannen
d0cf90bb8e Update tests due to deprecations in Reactor 2020-08-08 12:40:23 +02:00
Brian Clozel
b6d2a2980d Update for Reactor API changes 2020-08-05 13:31:39 +02:00
Rossen Stoyanchev
683cc2eb7f Add NDJSON and deprecate application/stream+json
Closes gh-21283
2020-07-28 17:53:37 +03:00
Rossen Stoyanchev
354635ede0 Polishing 2020-07-28 17:53:37 +03:00
Sam Brannen
cdc234d7db Polish contribution
See gh-25446
2020-07-22 14:06:29 +02:00
XenoAmess
c547809e89 Use instanceof instead of Class#isInstance where feasible
Closes gh-25446
2020-07-22 14:06:29 +02:00
Juergen Hoeller
88394bff66 Merge branch '5.2.x' 2020-07-20 07:21:36 +02:00
Juergen Hoeller
65e601090f Copy queryParams MultiValueMap through addAll (for independent List entries)
Closes gh-25423
2020-07-20 07:07:17 +02:00
Rossen Stoyanchev
0e4e25d227 Updates to CORS patterns contribution
Closes gh-25016
2020-07-08 13:18:46 +03:00