Commit Graph

15100 Commits

Author SHA1 Message Date
Rossen Stoyanchev d7a7b08b08 Find the last plus for suffix MediaType
Issue: SPR-15795
2017-07-25 10:45:59 +02:00
Rossen Stoyanchev 7e232f989b Improve check for "Broken pipe" error message
Issue: SPR-15802
2017-07-25 10:30:11 +02:00
Sebastien Deleuze ed6fe2b723 Upgrade to Kotlin 1.1.4-eap-33
Issue: SPR-15814
2017-07-24 17:29:02 +02:00
Rossen Stoyanchev 14ccb38523 Handle nested w/o top-level array in Jackson2JsonTokenizer
Issue: SPR-15803
2017-07-21 13:43:38 +02:00
Rossen Stoyanchev bd0de7086e Jackson2JsonTokenizer unwraps top level array only
When the input stream is a JSON array the tokenizer skips over the
start and end array tokens in order to decode into an array of
top-level objects. However in this mode it also skips over nested
start and end array tokens which prevents proper parsing of JSR-310
dates (represented with an array syntax) as well as any fields that
are collections.

Issue: SPR-15803
2017-07-21 12:41:20 +02:00
Rossen Stoyanchev c3e3df57f8 Polish 2017-07-21 12:08:06 +02:00
Rossen Stoyanchev 3009e29489 Remove contentDispositionFormData with charset method
The method was orginally added under SPR-14547 but the example in it
was probably intended for use with Content-Disposition server response
header (file dowonload) and not for a Content-Disposition header
within the body of a multipart request.

In a Spring application a multipart request is typically serialized
by the FormHttpMessageConverter and hence the Content-Disposition is
not explicitly set by the application.

Issue: SPR-15205
2017-07-20 17:49:59 +02:00
Sebastien Deleuze d8a80fc0db Rename RouterFunction Kotlin DSL files 2017-07-20 16:05:00 +02:00
Sebastien Deleuze 0720f9e978 Fix an eventual IndexOutOfBoundsException in RequestPredicates 2017-07-20 16:05:00 +02:00
Brian Clozel f1abcba4eb Support ipV6 Host addresses in HttpHeaders
This commit parses the "Host" HTTP request header as an
`InetSocketAddress`, while supporting IPv6 addresses like `[::1]`.

This host string contains `:` chars even though it has no port
information.

Issue: SPR-15799
2017-07-20 15:21:46 +02:00
Rossen Stoyanchev bb684ce60b Improve decoding support for multipart filename
StandardMultipartHttpServletRequest now properly decodes RFC-5987
encoded filenames (i.e. filename*) by delegating to ContentDisposition
and also support RFC-2047 syntax through javax.mail MimeUtility.

Issue: SPR-15205
2017-07-20 14:26:20 +02:00
Sebastien Deleuze 2437500cfe Ignore DataBufferUtilsTests#writeAsynchronousFileChannel
Issue: SPR-15798
2017-07-20 13:51:13 +02:00
Juergen Hoeller e4651d6b50 XmlEventDecoder uses common defensive XMLInputFactory (now in StaxUtils)
Issue: SPR-15797
2017-07-20 13:17:27 +02:00
Juergen Hoeller 40df7b6eca Polishing
Issue: SPR-15673
2017-07-20 13:16:50 +02:00
Sebastien Deleuze fa4d139684 Support instantiating Kotlin classes with optional parameters
This commit updates BeanUtils class in order to add Kotlin optional
parameters with default values support to the immutable data classes
support introduced by SPR-15199.

Issue: SPR-15673
2017-07-20 10:44:06 +02:00
Brian Clozel 5cac619e23 Fix host+port resolution in ReactorServerHttpRequest
Prior to this commit, the host+port information of the incoming request
where taken from the remoteAddress, which is actually the socket address
of the HTTP client (i.e. not the server).

This commit resolves this information from the "Host" HTTP request
header, if available, or the actual local address of the channel if no
header is available.

Issue: SPR-15084
2017-07-20 01:45:13 +02:00
Juergen Hoeller 6d6d772f31 Polishing 2017-07-20 00:14:56 +02:00
Rossen Stoyanchev 378c72e9b6 Polish + minor refactoring of ResourceUrlProvider 2017-07-19 23:04:39 +02:00
Juergen Hoeller 118d1470fd Ignore (Auto)Closeable for interface-based proxy decisions
Issue: SPR-15779
2017-07-19 22:40:45 +02:00
Juergen Hoeller 13080f04f4 UriUtils.extractFileExtension properly handles all fragments
Issue: SPR-15786
2017-07-19 22:40:24 +02:00
Juergen Hoeller ac1d3b22c9 Polishing 2017-07-19 22:22:27 +02:00
Juergen Hoeller 46eba3dbfa Nullability fine-tuning around declaration inconsistencies
Issue: SPR-15720
Issue: SPR-15792
2017-07-19 22:22:20 +02:00
Rossen Stoyanchev 68e6b148cb Refactor relative redirect filter support
Issue: SPR-15717
2017-07-19 18:46:16 +02:00
Rob Winch fadf04e4b4 Add RelativeRedirectFilter 2017-07-19 17:15:33 +02:00
Rob Winch 5f868b493a Add ForwardedHeaderFilter requestOnly
Add an option for ForwardedHeaderFilter to only process the
HttpServletRequest. This means that HttpServletResponse.sendRedirect will
only work when the application is conifgured to use relative redirects
using Servlet Container specific setup.

Issue: SPR-15717
2017-07-19 17:15:33 +02:00
Rossen Stoyanchev 147368eccc Proactively reject URLs without target address
Issue: SPR-15782
2017-07-19 12:37:32 +02:00
Rossen Stoyanchev cbe5a67687 Polish 2017-07-19 12:37:32 +02:00
Juergen Hoeller 9fc4fb10b0 Nullability fine-tuning around bean properties
Issue: SPR-15720
Issue: SPR-15792
2017-07-19 11:43:58 +02:00
Stephane Nicoll 06fc092be2 Polish 2017-07-19 10:11:06 +02:00
Stephane Nicoll 19c88f2cfa Polish components indexer doc
Issue: SPR-15793
2017-07-19 10:05:09 +02:00
Sebastien Deleuze fb4ddb0746 Make getters and setters null-safety consistent
This commit ensure that null-safety is consistent between
getters and setters in order to be able to provide beans
with properties with a common type when type safety is
taken in account like with Kotlin.

It also add a few missing property level @Nullable
annotations.

Issue: SPR-15792
2017-07-19 09:07:56 +02:00
Sebastien Deleuze ff85726fa9 Fix warnings in Kotlin tests 2017-07-19 08:12:48 +02:00
Sebastien Deleuze e2fd04dff3 Add a [] Kotlin extension for PropertyResolver#getRequiredProperty 2017-07-19 08:12:32 +02:00
Sebastien Deleuze f72e0daa54 Add an env accessor to BeanDefinitionContext
Issue: SPR-15755
2017-07-19 07:57:19 +02:00
Juergen Hoeller c292a89b24 Http(Async)Client not actually nullable, plus MethodInterceptor nullability
Issue: SPR-15720
2017-07-19 00:15:37 +02:00
Sam Brannen 1e66191cbd Upgrade to JUnit Jupiter 5.0 M6
Issue: SPR-15791
2017-07-18 22:21:34 +02:00
Rossen Stoyanchev 43f2de4671 Defensive checks in WebClient and Reactor connector
Since there is no reason for an exchange to ever complete without a
ClientResponse I've added a switchIfEmpty check at the WebClient level.

Also, temporarily a second check closer to the problem in the
ReactorClientHttpConnector suggesting a workaround and providing a
reference to the Reactor Netty issue #138.

Issue: SPR-15784
2017-07-18 18:13:47 +02:00
Rossen Stoyanchev 56903581d9 ResponseEntity declared as Object in WebFlux controller
Issue: SPR-15785
2017-07-18 17:09:24 +02:00
Rossen Stoyanchev 57221ab15c ContentVersionStrategy has non-blocking contract
Issue: SPR-15773
2017-07-18 15:57:49 +02:00
Rossen Stoyanchev efb5ba5a95 Refactor VersionStrategy in WebFlux
Collapse the base interface VersionPathStrategy into its extension
VersionStrategy and then turn the prefix nad fliename based
implementations into abstract base classes (vs delegate strategies).

It is simpler to have one VersionStrategy hierarchy vs that plus a
separate VersionPathStrategy as a delegate. In practice each
VersionStrategy is suited to be prefix or filename based. Also none
of our code cares about the distinction between those two interfaces.
2017-07-18 15:57:49 +02:00
Juergen Hoeller 704d4c34be Upgrade to Reactor Bismuth M3 (and JavaMail 1.6 final)
Issue: SPR-15787
2017-07-18 13:14:07 +02:00
Brian Clozel a06da0019f Remove PathPatternParser from PatternsRequestCondition
Since `PathPattern.combine` now returns another `PathPattern` instance
(it was previously returning a String instance), we can now safely
remove the parser instance included in `PatternsRequestCondition`.

Issue: SPR-15663
2017-07-18 11:40:30 +02:00
Rossen Stoyanchev 7a0e5a378a Update for reactor-core change 2017-07-18 04:09:25 +02:00
Rossen Stoyanchev b0422d02dc Resource transformers use AsynchronousFileChannel
Issue: SPR-15773
2017-07-18 03:58:21 +02:00
Juergen Hoeller bca5a36216 Explicit error message for bean name clash with containing configuration class
Issue: SPR-15775
2017-07-18 00:54:49 +02:00
Juergen Hoeller 12114a9d4c Consistent use of NIO.2 for file read/write interactions
Issue: SPR-15748
2017-07-18 00:54:41 +02:00
Rossen Stoyanchev d56fedc226 Methods for reading a Resource in DataBufferUtils
Currently ResourceEncoder and ResourceRegionEncoder use DataBufferUtils
to read resource with an AsynchronousFileChannel if it is a file or
otherwise fallback on getting the channel from the resource.

The same is now required in other places where a Resource needs to be
read and is also generally useful.

Issue: SPR-15773
2017-07-17 12:25:25 +02:00
Rossen Stoyanchev ee91e52c3a Polish 2017-07-17 11:39:32 +02:00
Rossen Stoyanchev e2ee23bfc5 WebSession supports changeSessionId
Issue: SPR-15571
2017-07-17 11:09:38 +02:00
Rossen Stoyanchev 70252a7335 Add tests for SPR-15777 2017-07-17 08:35:58 +02:00