Brian Clozel
e4cb25f365
Reject "/path/**/other" patterns in PathPatternParser
...
Prior to this commit, patterns like `"/path/**/other"` would be treated
as `"/path/*/other"` (single wildcard, i.e. matching zero to many chars
within a path segment). This will not match multiple segments, as
expected by `AntPathMatcher` users or by `PathPatternParser` users when
in patterns like `"/resource/**"`.
This commit now rejects patterns like `"/path/**/other"` as invalid.
This behavior was previously warned against since gh-24958.
Closes gh-24952
2020-05-11 19:08:21 +02:00
Rossen Stoyanchev
94824e30a4
Avoid parse cookies when mutating request or response
...
When mutating a ServerHttpRequest or ClientResponse, the respective
builders no longer access cookies automatically which causes them to
be parsed and does so only if necessary. Likewise re-applying the
read-only HttpHeaders wrapper is avoided.
See gh-24680
2020-05-11 08:49:28 +01:00
Rossen Stoyanchev
c908ec1937
Wrappers for native headers on the client side
...
Native server request headers have been wrapped rather than copied
since 5.1. This commit applies the same change to the client side
where, to make matters worse, headers were copied repeatedly on every
access, see also previous commit ca897b95.
For Netty and Jetty the wrappers are the same as on the server side
but duplicated in order to remain package private.
See gh-24680
2020-05-11 08:49:28 +01:00
Rossen Stoyanchev
df99889aa6
Avoided repeated creation of ReadOnlyHttpHeaders wrapper
...
See gh-24680
2020-05-11 08:49:28 +01:00
Rossen Stoyanchev
3276f81851
Avoid one layer of HttpHeaders wrapping
...
See gh-24680
2020-05-11 08:49:28 +01:00
Rossen Stoyanchev
7f59381c7d
Add support for RxJava 3
...
Closes gh-24170
2020-05-11 08:48:48 +01:00
Rossen Stoyanchev
8a59a63ade
Merge branch '5.2.x'
2020-05-08 09:38:50 +01:00
Rossen Stoyanchev
19ba9087f5
HttpHeaders#equals handles wrapping correctly
...
Closes gh-25034
2020-05-08 09:37:37 +01:00
Rossen Stoyanchev
1da903dd59
Add PartHttpMessageWriter
...
Closes gh-24535
2020-05-08 07:54:50 +01:00
Sam Brannen
12e05280ad
Upgrade to AssertJ 3.16
2020-05-06 15:22:23 +02:00
Rossen Stoyanchev
f28e08eceb
Improving contribution
...
See gh-24406
2020-05-06 10:50:51 +01:00
Parviz ROzikov
816466e492
#24406 - Add String based URI template variants
2020-05-06 10:50:51 +01:00
Rossen Stoyanchev
d1708460e7
Log message for unused @ModelAttribute name
...
Closes gh-23877
2020-05-06 10:37:44 +01:00
Rossen Stoyanchev
66bb145247
Fix typo
...
See gh-23915, gh-25018
2020-05-06 06:35:43 +01:00
Rossen Stoyanchev
a7c736915a
Polishing and completing contribution
...
See gh-24866
2020-05-05 18:20:45 +01:00
Rossen Stoyanchev
147b8fb755
Turn off use of path extensions by default
...
Closes gh-23915
2020-05-05 08:04:40 +01:00
Rossen Stoyanchev
153690e717
Merge branch '5.2.x'
2020-05-04 10:55:25 +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
Arjen Poutsma
7bd524e9d7
Add ClientHttpConnector test suite
...
This commit introduces a test suite for ClientHttpConnector
implementations, as well as fixes that resolve issues identified by
these tests.
Closes gh-24941
2020-04-29 15:21:22 +02:00
martin-tarjanyi
3bc1d42dcd
Integrate Apache http client with WebClient
...
This commit introduces a ClientHttpConnector implementation backed by
Apache HttpComponents HttpClient 5.0.
Fixes gh-24700
2020-04-29 15:02:09 +02: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
Sam Brannen
b8835c9f32
Copy MockHttpServletRequest changes to spring-web
...
See gh-24916
2020-04-17 16:20:42 +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
陈其苗
13970ae528
Use autoboxing instead of explicit wrapping in tests
...
Closes gh-24801
2020-04-01 14:34:20 +02: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
ddaf0029ae
Polishing
2020-03-31 16:31:34 +02:00
Sam Brannen
329f08ad08
Suppress warnings in Gradle build
2020-03-31 12:17:58 +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
Qimiao Chen
7c831d2ef4
Replace anonymous inner classes with lambdas in tests
...
Closes gh-24808
2020-03-30 12:02:23 +02:00
Rossen Stoyanchev
3175f0771e
Remove dumpString from DataBufferTestUtils
...
See gh-24786
2020-03-26 21:42:12 +00:00
Rossen Stoyanchev
7aa06b8610
Polishing contribution
...
See gh-24786
2020-03-26 21:42:12 +00:00
Сергей Цыпанов
f17b0125ff
Simplify conversion of DataBuffer to String
...
See gh-24786
2020-03-26 21:42:12 +00:00
Rossen Stoyanchev
dd3dd5d67d
UriComponentsBuilder.cloneBuilder copies uriVariables
...
Closes gh-24772
2020-03-26 16:31:25 +00:00