Commit Graph

2870 Commits

Author SHA1 Message Date
Rossen Stoyanchev 69eba32284 Improved Part support in MultipartBodyBuilder
1. Add contentType and filename options to PartBuilder.

2. Revert recently committed #44659f since asyncPart can't properly
support Publisher of Part (only Mono, can't support filename), and
replace that with support for Part in the regular part method.

Closes gh-23083
2019-06-04 17:21:39 -04:00
Rossen Stoyanchev 8781c01edf Merge branch '5.1.x' 2019-06-04 16:42:13 -04:00
Rossen Stoyanchev 49e5c4dcf6 Polish MultipartBodyBuilder
Improve Javadoc
Consistently reject Publisher unless using asyncPart
Consistently set Content-Type when specified
2019-06-04 16:41:10 -04:00
Rossen Stoyanchev e89fd5c3be Merge branch '5.1.x' 2019-06-03 16:34:58 -04:00
Rossen Stoyanchev 4f05da7fed Support escape character in ContentDisposition
Closes gh-23077
2019-06-03 16:03:35 -04:00
Sebastien Deleuze 5b04b04b69 Merge branch '5.1.x' 2019-05-29 11:54:40 +02:00
Sebastien Deleuze 4523d01a50 Fix Javadoc for HttpHeaders#setContentLanguage
Closes gh-23051
2019-05-29 11:53:38 +02:00
Johnny Lim 83078eb6fd Add constants for application/cbor to MediaType
Closes gh-23042
2019-05-28 18:51:25 +02:00
Brian Clozel 1cfedb20b8 Add new constructor to JettyClientHttpConnector
This commit adds a new constructor to `JettyClientHttpConnector` and
deprecates another one. Jetty is not creating `HttpClient` instances
using a builder API, but rather setting immutable configuration at
constructor time and using setters for the rest.

This commit addresses that by deprecating the constructor variant
accepting a `Consumer` and just delegating to Spring's implementation
for setting the client resources as needed.

Closes gh-22977
2019-05-28 16:59:51 +02:00
Sam Brannen 141ef9082f Clean up Mockito usage
This commit migrates to the MockitoJUnitRunner where sensible, which
will later allow for an easier migration to Mockito's extension for
JUnit Jupiter.

In addition, this commit deletes unnecessary stubbing for various mocks
and polishes test fixture setup in various test classes.
2019-05-28 13:59:43 +02:00
Sebastien Deleuze bc205e0dbf Remove charset parameter from Spring MVC JSON content type
This change is a follow-up to the ones done as part of gh-22788.

Closes gh-22954
2019-05-27 18:14:19 +02:00
Phillip Webb 9d74da006c Migrate JUnit 4 assertions to AssertJ
Migrate all existing JUnit 4 `assert...` based assertions to AssertJ
and add a checkstyle rule to ensure they don't return.

See gh-23022
2019-05-23 15:52:49 -07:00
Phillip Webb 95a9d46a87 Migrate Hamcrest assertions to AssertJ
Migrate all existing `assertThat(..., Matcher)` assertions to AssertJ
and add checkstyle rules to ensure they don't return.

See gh-23022
2019-05-23 15:49:59 -07:00
Sam Brannen f806594e60 Introduce getOrEmpty(String) convenience method in HttpHeaders
This commit introduces a getOrEmpty(String) method in HttpHeaders that
returns an immutable, empty list if no values are present for the
specified header name. This is provided as a convenience over the
existing get(String) method which returns null in such cases.

Closes gh-22949
2019-05-22 15:26:45 +02:00
Sam Brannen 9ca7354146 Polishing 2019-05-22 15:22:29 +02:00
Sam Brannen 819097a07a Clean up warning in Gradle build 2019-05-22 14:48:40 +02:00
Juergen Hoeller 8a33ef2d14 Merge branch '5.1.x' 2019-05-21 21:06:38 +02:00
Juergen Hoeller 5aa0de7ac8 Upgrade to OkHttp 3.14.2, Joda-Time 2.10.2, OpenPDF 1.2.17, JRuby 9.2.7 2019-05-21 20:47:06 +02:00
Juergen Hoeller 3645281c35 Polishing 2019-05-21 19:26:39 +02:00
Juergen Hoeller c329bad42a Merge branch '5.1.x' 2019-05-21 00:16:35 +02:00
Juergen Hoeller 8cd3daad0d Polishing 2019-05-21 00:15:40 +02:00
Juergen Hoeller 171e8f56a3 Merge branch '5.1.x' 2019-05-20 22:27:37 +02:00
Juergen Hoeller 75d751d968 Polishing 2019-05-20 22:19:11 +02:00
Phillip Webb 02850f357f Migrate exception checking tests to use AssertJ
Migrate tests that use `@Test(expectedException=...)` or
`try...fail...catch` to use AssertJ's `assertThatException`
instead.
2019-05-20 10:47:53 -07:00
Phillip Webb fb26fc3f94 Polishing 2019-05-20 10:46:20 -07:00
Juergen Hoeller a363fed209 Merge branch '5.1.x' 2019-05-20 17:21:07 +02:00
Juergen Hoeller 4c334de850 Use Map.values() iteration within isMultipart check
Closes gh-22982
2019-05-20 17:17:51 +02:00
Rossen Stoyanchev ed2a3bd451 Take advantage of Encoder#encodeValue
EncoderHttpMessageWriter takes advantage of the Encoder#encodeValue
that's new in 5.2 in order to produce a Mono<DataBuffer> instead of
producing a Flux<DataBuffer> and then using flux.singleOrEmpty().

Closes gh-22952
2019-05-15 17:31:59 -04:00
Rossen Stoyanchev 013249757a Merge branch '5.1.x' 2019-05-15 16:44:05 -04:00
Rossen Stoyanchev ffd7cffa14 Fix typo in HttpHeaders
Closes gh-22976
2019-05-15 16:42:07 -04:00
Rossen Stoyanchev 0274752fe9 Use singleOrEmpty to avoid upstream cancel
Closes gh-22952
2019-05-15 16:02:28 -04:00
Rossen Stoyanchev 97c2de915a Add RouteMatcher
Closes gh-22642
2019-05-14 21:44:39 -04:00
Rossen Stoyanchev afc0ae3752 Add hasPatternSyntax method to PathPattern 2019-05-14 15:36:47 -04:00
Rossen Stoyanchev ac6c96a391 Polish 2019-05-13 13:45:25 -04:00
Sam Brannen 73dbd06361 Enforces static imports for JUnit 4 assertions and assumptions
This commit configures Checkstyle to enforces static imports for JUnit 4
assertions and assumptions.

See gh-22932
2019-05-12 15:13:07 +02:00
Sam Brannen deecab6311 Use assertThat from Hamcrest instead of JUnit 4
org.junit.Assert.assertThat() is deprecated as of JUnit 4.13.

See gh-22894
2019-05-12 14:46:55 +02:00
Sam Brannen 724c805211 Discontinue use of JUnit 3 APIs
This commit also ensures that the JSR-330 TCK is executed with the
normal build by adhering to naming conventions for test classes.

See gh-22894
2019-05-12 14:46:55 +02:00
Sam Brannen 9b61316c2e Clean up warnings in spring-web 2019-05-10 17:31:23 +02:00
Sam Brannen d8f1d56100 Fix broken test 2019-05-09 16:21:54 +02:00
Sebastien Deleuze c601ecf169 Merge branch '5.1.x' 2019-05-09 15:00:53 +02:00
Sebastien Deleuze c8d49ed284 Fix EncoderHttpMessageWriter.isStreamingMediaType()
Closes gh-22936
2019-05-09 14:57:15 +02:00
Sam Brannen 8e29eca1eb Merge branch '5.1.x' 2019-05-09 13:25:21 +02:00
Sam Brannen 59fdce1116 Fix bug in EncoderHttpMessageWriter.isStreamingMediaType() 2019-05-09 13:24:27 +02:00
Sam Brannen e465f51d56 Suppress deprecation warnings 2019-05-09 13:21:42 +02:00
Sam Brannen dc1c110288 Delete dead code 2019-05-09 13:21:27 +02:00
Juergen Hoeller 8b08b6812a Merge branch '5.1.x' 2019-05-09 02:26:23 +02:00
Juergen Hoeller 190b751147 Support any HttpEntity implementing ResolvableTypeProvider
Closes gh-22931
2019-05-09 02:09:31 +02:00
Phillip Webb 798b51f4a3 Migrate to BDD Mockito
Migrate all tests to consistently use BDD Mockito. Also add
checksyle rule to enforce going forwards.
2019-05-08 13:46:13 -07:00
Phillip Webb 816bbee8de Remove '.*' imports from tests
Organize test imports to expand all '.*' static imports into
fully qualified imports.

This update will allow us to use additional checkstyle rules in
the future, and will also help if we migrate fully to AssertJ.
2019-05-08 09:55:09 -07:00
Juergen Hoeller d3b713d5f0 Upgrade to Protobuf 3.7.1 and HtmlUnit 2.35 2019-05-08 17:52:56 +02:00
Juergen Hoeller 82d32f0875 Remove unused import 2019-05-08 17:51:54 +02:00
Rossen Stoyanchev 44659f4945 Unwrap Part content in asyncPart builder method
Closes gh-22876
2019-05-08 10:59:58 -04:00
Phil Webb d7320de871 Migrate away from ExpectedException (#22922)
* Add limited checkstyles to test code

Add a limited set of checkstyle rules to the test codebase to improve
code consistency.

* Fix checksyle violations in test code

* Organize imports to fix checkstyle for test code

* Migrate to assertThatExceptionOfType

Migrate aware from ExpectedException rules to AssertJ exception
assertions. Also include a checkstyle rules to ensure that the
the ExpectedException is not accidentally used in the future.

See gh-22894
2019-05-08 16:25:52 +02:00
Rossen Stoyanchev 7e6e3d7027 Switch writeAcceptCharset to false by default
Closes gh-22506
2019-05-08 09:56:52 -04:00
Rossen Stoyanchev a9f0eae4ab Merge branch '5.1.x' 2019-05-08 09:41:10 -04:00
Rossen Stoyanchev 6e0dfd6999 Check if Accept-Charset is present before adding it
Closes gh-22506
2019-05-08 09:40:32 -04:00
Arjen Poutsma dc01917dae Javadoc 2019-05-08 12:21:00 +02:00
Arjen Poutsma e7cca7792d Add way to override default multipartReader
This commit introduces a way to override the default multipart reader,
for instance to the SynchronossPartHttpMessageReader.
2019-05-08 12:10:20 +02:00
Arjen Poutsma 32915d8bf5 Add logging to DefaultMultipartMessageReader 2019-05-08 12:10:20 +02:00
Arjen Poutsma e625ace8c8 Add reference counting for UndertowDataBuffer
This commit adds proper reference counting to the UndertowDataBuffer.
2019-05-08 12:09:16 +02:00
Arjen Poutsma cdd346222c Add reference counting for UndertowDataBuffer
This commit adds proper reference counting to the UndertowDataBuffer.
2019-05-08 11:58:48 +02:00
Juergen Hoeller cdf51c3d51 Nullability refinements and related polishing 2019-05-08 00:27:56 +02:00
Arjen Poutsma fb642ce723 Introduce DefaultMultipartMessageReader
This commit introduces the DefaultMultipartMessageReader, a fully
reactive multipart parser that does have any third party dependencies.

Closes gh-21659
2019-05-07 12:14:45 +02:00
Juergen Hoeller 28c5d7b586 Merge branch '5.1.x' 2019-05-07 02:12:11 +02:00
Juergen Hoeller 053b95ceeb Refer to non-deprecated Jackson 2.5+ addMixIn method in javadoc 2019-05-07 02:06:40 +02:00
Juergen Hoeller f56c70d2f0 Merge branch '5.1.x' 2019-05-07 01:23:16 +02:00
Juergen Hoeller c841b62bb0 Consistent parameter retrieval across InvocableHandlerMethod variants
See gh-22900
2019-05-07 01:20:05 +02:00
Juergen Hoeller 4b06d8e511 Merge branch '5.1.x' 2019-05-07 00:59:56 +02:00
Juergen Hoeller 3f85a7db1b Consistent exception naming across InvocableHandlerMethod variants
See gh-22900
2019-05-07 00:48:27 +02:00
Sebastien Deleuze 2b3df1fa30 Merge branch '5.1.x' 2019-05-06 22:11:11 +02:00
Sebastien Deleuze 4b31feb243 Clarify Jackson2ObjectMapper.modules(ToInstall) semantics
Closes gh-22747
2019-05-06 22:09:56 +02:00
Sam Brannen d616e10dca Use assertThat from Hamcrest instead of JUnit 4
org.junit.Assert.assertThat() is deprecated as of JUnit 4.13.

See gh-22894
2019-05-05 19:26:04 +02:00
Johnny Lim d489227874 Use HttpHeaders constants where possible 2019-05-04 11:14:08 +02:00
Juergen Hoeller f0f6af2926 Merge branch '5.1.x' 2019-05-03 18:13:12 +02:00
Juergen Hoeller ea4a174583 Polishing 2019-05-03 18:10:41 +02:00
Juergen Hoeller a7949ac84a Consistent use of StringUtils.hasLength(String) vs isEmpty(Object) 2019-05-03 17:29:14 +02:00
Juergen Hoeller ec8689d1fc Merge branch '5.1.x' 2019-05-03 14:23:59 +02:00
Juergen Hoeller 4e10735e8f MockHttpServletRequest restores default locale for empty accept header
Closes gh-22877
2019-05-03 14:08:12 +02:00
Juergen Hoeller eaa9a78d5d Merge branch '5.1.x' 2019-05-03 00:23:57 +02:00
Juergen Hoeller 5b1b1bae37 Consistent use of try-with-resources for local resource closing 2019-05-03 00:11:47 +02:00
Juergen Hoeller 31c3b8a291 Avoid unguarded String concatenation for debug/trace logging
Closes gh-22874
2019-05-03 00:10:56 +02:00
Sebastien Deleuze 89454e69c3 Deprecate MediaType.APPLICATION_JSON_UTF8
This commit deprecates MediaType.APPLICATION_JSON_UTF8 and
MediaType.APPLICATION_PROBLEM_JSON_UTF8 in favor of
MediaType.APPLICATION_JSON and MediaType.APPLICATION_PROBLEM_JSON since
UTF-8 encoding is now handled correctly by most browsers
(related bug has been fixed in Chrome since September 2017).

MediaType.APPLICATION_JSON is now used as the default JSON content type.

Closes gh-22788
2019-04-30 16:11:50 +02:00
Sebastien Deleuze 5cd6763193 Add CBOR codec (single value only)
This commit adds CBOR reactive support for single value only in
order to allow CBOR usage in RSocket. Notice that no CBOR support
is configured on WebFlux, this will require gh-20513 to be resolved.

Closes gh-22767
2019-04-29 13:13:37 +02:00
Phillip Webb 55ac110f7b Fix LinkedCaseInsensitiveMap collection methods
Ensure that results returned from keySet, entrySet & values are tracked
to remove case insensitive keys from the source map.

Closes gh-22821
2019-04-26 11:17:51 -07:00
Juergen Hoeller 55418b256d Merge branch '5.1.x' 2019-04-26 16:56:04 +02:00
Juergen Hoeller e5e2d2d661 Polishing (includes minor performance refinements from master) 2019-04-26 16:51:18 +02:00
Juergen Hoeller ad497c259a Merge branch '5.1.x' 2019-04-25 14:55:04 +02:00
Juergen Hoeller 42fda0ba15 Upgrade to Tomcat 9.0.19, Jetty 9.4.17, Netty 4.1.35, OkHttp 3.14.1
Includes upgrade to Hibernate ORM 5.3.10 (for branch 5.1.x)
2019-04-25 14:32:37 +02:00
Sam Brannen e5d64e6680 Remove dead code in HttpHeadersTests 2019-04-21 15:33:53 +02:00
Sam Brannen e187a42bfc Introduce failing tests for HttpHeaders
See gh-22821
2019-04-21 15:20:24 +02:00
Rossen Stoyanchev c09e711eb2 Unwrap Optional for @RequestParam reverse resolution
Closes gh-22656
2019-04-18 22:40:12 -04:00
Rossen Stoyanchev 86835e8e5a Merge branch '5.1.x' 2019-04-17 14:23:44 -04:00
Rossen Stoyanchev 13c746ae9d Follow-up fix for #5b711a
Not only do we need to preserve Mono in writeWith in the base class
but also in ReactorServerHttpResponse where buffers are mapped.

See gh-22800
2019-04-17 13:18:01 -04:00
Rossen Stoyanchev de3238dbea Merge branch '5.1.x' 2019-04-16 21:08:54 -04:00
Rossen Stoyanchev 5b711a964b Pass Mono to Reactor Netty when feasible
Closes gh-22800
2019-04-16 20:52:19 -04:00
Rossen Stoyanchev 15b2fb1210 Polish
Replacing a couple of calls to Mono.fromCallable with Mono.just which
seems to work with doOnDiscard except when nested inside Flux.defer.
2019-04-16 20:52:19 -04:00
Rossen Stoyanchev 375090bb7c LeakAwareDataBuffer related fixes
Following on 3ebbfa2191 where the local
refCount was removed in favor of using the internal refCount of the
native data buffer, this commit ensures that LeakAwareDataBufferFactory
uses a PooledDataBufferFactory delegate by default.

There are also fixes for test issues with eager allocation uncovered by
these changes in StringDecoder and ResourceDecoder.
2019-04-16 20:52:19 -04:00
Rossen Stoyanchev ed650891ca Add filter to add exchange to Reactor Context
Closes gh-21746
2019-04-16 10:08:20 -04:00
Rossen Stoyanchev e4da7cb47f Merge branch '5.1.x' 2019-04-15 08:41:27 -04:00
Rossen Stoyanchev 0109231d8e Ensure Jackson generator flushed
Closes gh-22771
2019-04-15 08:40:19 -04:00
Juergen Hoeller 44df98c82d Merge branch '5.1.x' 2019-04-12 11:37:07 +02:00
Juergen Hoeller b07d46da99 MockCookie compares attributes in case-insensitive manner
Closes gh-22786
2019-04-12 11:10:02 +02:00
Rossen Stoyanchev 5fc18064f2 Use encode with an Object value where feasible
Closes gh-22782
2019-04-11 19:00:28 -04:00
Rossen Stoyanchev 181482fa15 Add option to encode with an Object value
See gh-22782
2019-04-11 19:00:28 -04:00
Rossen Stoyanchev f89d2ac148 Use decode from a DataBuffer where feasible
See gh-22782
2019-04-11 19:00:28 -04:00
Rossen Stoyanchev a912d8de1e Add option to decode from a DataBuffer
See gh-22782
2019-04-11 19:00:28 -04:00
Rossen Stoyanchev 2aae81ef0c Join buffers in decodeToMono for Jackson and Jaxb2
Closes gh-22783
2019-04-11 19:00:28 -04:00
Sam Brannen 6d7bf8050f Polishing 2019-04-10 13:15:16 +02:00
Rossen Stoyanchev d707d382b4 Merge branch '5.1.x' 2019-04-09 22:38:15 -04:00
Rossen Stoyanchev 28e206a946 Apply doOnDiscard for streaming mode
Use of Flux.just is problematic in that if the Flux is cancelled before
demand, the item may never be read, nor freed. Flux#just does not
even delegate cancellation signals.

Closes gh-22731
2019-04-09 22:30:26 -04:00
Rossen Stoyanchev b11e7feff6 Polish during review of DataBuffer handling 2019-04-09 22:19:05 -04:00
Rossen Stoyanchev bd956ed75a DataBuffer fixes in Protobuf codecs
Closes gh-22731
2019-04-09 17:00:26 -04:00
Rossen Stoyanchev f839c1f9cd Remove warning about empty @RequestMapping path
See gh-22543
2019-04-09 15:03:43 -04:00
Juergen Hoeller eb971690d2 Merge branch '5.1.x' 2019-04-09 18:09:20 +02:00
Juergen Hoeller 2835424f9d Jackson2Tokenizer creates fully configured DeserializationContext
Closes gh-22510
2019-04-09 17:59:10 +02:00
Juergen Hoeller c8609b83b6 Merge branch '5.1.x' 2019-04-08 20:19:03 +02:00
Juergen Hoeller 4ec9aff01d Polishing 2019-04-08 19:59:06 +02:00
Juergen Hoeller d1303affc8 Avoid expensive Stream API usage in HttpRange
See gh-22742
2019-04-08 19:42:21 +02:00
ladislav-bozek 4d17eb4f0e Fix typo in JavaDoc for UrlPathHelper.setUrlDecode()
Closes gh22768
2019-04-08 17:37:59 +02:00
Sebastien Deleuze 2e7ed915cd Merge branch '5.1.x' 2019-04-08 15:46:47 +02:00
Sebastien Deleuze a089027e7d Fix a regression in Jackson builder module registration
This commit brings back the support for registration of multiple
Jackson modules with a null typeId.

Closes gh-22740
2019-04-08 15:37:10 +02:00
Sam Brannen ab1b8dee58 Ensure XmlEventDecoder compiles on JDK 9 and 11 2019-04-06 16:00:33 +02:00
Sam Brannen 021909dac2 Merge branch '5.1.x' 2019-04-06 11:22:15 +02:00
Sam Brannen a1668ad1c2 Fix Javadoc for PathPattern 2019-04-06 11:21:39 +02:00
Rossen Stoyanchev 02da8486a3 Merge branch '5.1.x' 2019-04-05 21:53:55 -04:00
Rossen Stoyanchev 6cabb79f0f Decode resourcePath for classpath locations
Closes gh-22272
2019-04-05 16:23:33 -04:00
Sam Brannen d04a640baf Polish Javadoc for @RequestMapping 2019-04-05 14:03:10 +02:00
Juergen Hoeller b90e6ef8a0 Merge branch '5.1.x' 2019-04-05 12:48:34 +02:00
Juergen Hoeller da557e7415 Avoid expensive assertions in HttpRange
Closes gh-22742
2019-04-05 12:47:02 +02:00
Sam Brannen c0b52d09f5 Require explicit path mappings for @RequestMapping methods
Prior to this commit, handler methods in Spring MVC controllers were
not required to provide explicit path mappings via @RequestMapping (or
any of its specializations such as @GetMapping). Such handler methods
were effectively mapped to all paths. Consequently, developers may have
unwittingly mapped all requests to a single handler method.

This commit addresses this by enforcing that @RequestMapping methods
are mapped to an explicit path. Note, however, that this is enforced
after type-level and method-level @RequestMapping information has been
merged.

Developers wishing to map to all paths should now add an explicit path
mapping to "/**" or "**".

Closes gh-22543
2019-04-04 17:33:59 +02:00
Sam Brannen de69871354 Removed unused import 2019-04-04 17:13:08 +02:00
Juergen Hoeller 1741b6dcd9 Merge branch '5.1.x' 2019-04-04 16:12:07 +02:00
stsypanov 383f18e214 Use StringJoiner where possible to simplify String joining 2019-04-04 16:11:32 +02:00
Juergen Hoeller 95232d5bf8 Upgrade to Apache HttpClient 4.5.8 and Jetty Reactive HttpClient 1.0.3 2019-04-04 16:10:16 +02:00
Rossen Stoyanchev 254f06e1a1 Request attribute cache for resolved lookupPath
See gh-22644
2019-04-03 14:56:30 -04:00
Sebastien Deleuze a63d23492a Optimize Jackson2Tokenizer
See gh-22727
2019-04-03 18:02:27 +02:00
Juergen Hoeller 2e63c66b0d Merge branch '5.1.x' 2019-04-02 20:13:29 +02:00
Juergen Hoeller 0babc1fb64 Polishing 2019-04-02 20:04:07 +02:00
Juergen Hoeller 95a84bbad1 Clarify case-insensitive nature of HttpHeaders
Closes gh-22723
2019-04-02 20:04:00 +02:00
Rossen Stoyanchev 89a29598d5 Merge branch '5.1.x' 2019-04-02 11:05:30 -04:00
Rossen Stoyanchev 4c08863776 Add test case for writeFunction error signal
See gh-22720
2019-04-02 11:00:58 -04:00
Sebastien Deleuze d2fa5536db Use more efficient Reactor operators
Use handle/flatMapIterable instead of flatMap/flatMapMany
when possible.

Closes gh-22727
2019-04-02 15:49:59 +02:00
Violeta Georgieva 9bd0ec33f8 Release cached item in ChannelSendOperator when server error
Related to gh-22720
2019-04-02 16:42:52 +03:00
Juergen Hoeller 4a5b9d39d4 Consistent java.time setters on HttpHeaders and CorsConfiguration
Closes gh-22546
2019-04-02 14:56:20 +02:00
Juergen Hoeller 03bda29032 Revert "AnnotationConfigRegistry exposes registerBean with supplier/qualifiers"
This reverts commit 18f2e6a1
2019-04-02 14:55:13 +02:00
Rossen Stoyanchev 20742c74dc Merge branch '5.1.x' 2019-04-01 17:16:17 -04:00
Rossen Stoyanchev 9c48d63082 Release cached item in ChannelSendOperator
1. If the write Subscriber cancels with the item cached, release it.

2. If the write Publisher emits an error while the item is cached, when
the write Subscriber subscribes, release the cached item and emit the
error signal.

Closes gh-22720
2019-04-01 17:15:16 -04:00
Sebastien Deleuze d27b5d0ab6 Improve CORS handling
This commit improves CORS support by:
 - Using CORS processing only for CORS-enabled endpoints
 - Skipping CORS processing for same-origin requests
 - Adding Vary headers for non-CORS requests

It introduces an AbstractHandlerMapping#hasCorsConfigurationSource
method in order to be able to check CORS endpoints efficiently.

Closes gh-22273
Closes gh-22496
2019-04-01 17:42:51 +02:00
Rossen Stoyanchev 8dc535c15c Match declared parameters on produces condition
Closes gh-21670
2019-03-29 17:03:40 -04:00
Sam Brannen 3f85530efd URL Cleanup - polishing 2019-03-28 17:23:13 +01:00