Commit Graph

15773 Commits

Author SHA1 Message Date
Juergen Hoeller
05988193b7 Upgrade to Jackson 2.9.3 and Netty 4.1.18 2017-12-13 17:55:50 +01:00
sdeleuze
6a7b197af7 Improve Jackson codecs documentation 2017-12-13 12:07:43 +01:00
sdeleuze
73a81f98d4 Allow interceptors to add existing header values
Additional commit to provide support of requests
that have a body.

Issue: SPR-15066
2017-12-13 10:08:24 +01:00
Rossen Stoyanchev
583201b02c MappingJackson2MessageConverter uses generic type
Issue: SPR-16252
2017-12-12 22:32:33 -05:00
Rossen Stoyanchev
f05175586e Refine behavior on error after response committed
If the response is set and we can't change the status through
ServerHttpResponse any more, allow the error signal to propagate and
let the individual server adapters handle it. Ultimately that should
result in closing the connection.

On Servlet containers, we check one last time if the response is
committed (we may not have filled the buffer). If not then save
the exception as a request attribute, dispatch, and re-throw it on the
container thread.

On Undertow access the connection and close it.

On Netty just let the error through to Reactor Netty.

Issue: SPR-16051
2017-12-12 14:51:24 -05:00
Juergen Hoeller
9d421841d5 Merge pull request #1622 from dreis2211/SPR-16293
Improve performance of some string operations

Issue: SPR-16293
2017-12-12 18:36:07 +01:00
Christoph Dreis
260ebeca3a Improve performance of some string operations
Issue: SPR-16293
2017-12-12 17:14:24 +01:00
Rossen Stoyanchev
f736b665bd Fix compile issue from previous commit 2017-12-11 16:37:11 -05:00
Rémi Alvergnat
76dcde9e31 Fix Stomp Broker Relay ignoring destination prefixes in some cases
Issue: SPR-16265
2017-12-11 13:25:29 -08:00
sdeleuze
554662ebab Allow interceptors to add existing header values
Provide a fully mutable HttpHeaders to ClientHttpRequestInterceptors
of a RestTemplate when headers are set using HttpEntity. This avoids
UnsupportedOperationException if both HttpEntity and
ClientHttpRequestInterceptor add values for the same HTTP header.

Issue: SPR-15066
2017-12-11 15:01:20 +01:00
sdeleuze
ac00d8a215 Use JCenter first to resolve plugins
This is a workaround for Kotlin/dokka#146.
2017-12-11 12:07:17 +01:00
sdeleuze
769ea1b106 Fix Kdoc regression to show only Kotlin API
As of Gradle Kotlin plugin 1.1.60,
project.sourceSets.main.kotlin.srcDirs contains
Java source directories in addition to Kotlin
ones. This commit filter out Java sources to
retain only Kotlin ones.

Issue: SPR-16268
2017-12-11 11:28:39 +01:00
Stephane Nicoll
206a5e02dd Merge pull request #1615 from gro-gg:patch-1
* pr/1615:
  Fix exception message
2017-12-09 15:46:55 -08:00
Philipp Grogg
591429e538 Fix exception message
initialDelayString is parsed into long, not integer.

Closes gh-1615
2017-12-09 15:46:28 -08:00
Juergen Hoeller
d198626618 Upgrade to Gradle 4.4 (and Apache HttpClient 4.5.4)
Issue: SPR-16237
2017-12-07 07:28:07 +01:00
Sam Brannen
767ea9db83 Fix minor logic error in SocketUtils 2017-12-06 17:00:29 -08:00
Tony Mitchell
9f36d170be Support identical minPort and maxPort in SocketUtils (#1612)
This commit fixes a bug where an IllegalStateException was
thrown if the minPort and maxPort values supplied to
SocketUtils.findAvailableTcpPort(int, int) were identical.
2017-12-06 16:38:46 -08:00
Sam Brannen
f9689dfe48 Polishing 2017-12-06 15:54:02 -08:00
Juergen Hoeller
bf8831157d Merge pull request #1614 from dreis2211/SPR-16264
Reduce access on user in SimpleBrokerMessageHandler.handleMessageInternal
2017-12-06 00:40:38 +01:00
Christoph Dreis
f4e9fb52a8 Reduce access on user in SimpleBrokerMessageHandler.handleMessageInternal
Issue: SPR-16264
2017-12-05 11:18:02 +01:00
ugultopu
04ab93ceb4 Add missing verb on the note about relays 2017-12-04 11:20:39 -05:00
Juergen Hoeller
0ef117ff11 Upgrade to Tomcat 8.5.24 and Jetty 9.4.8 2017-12-03 16:03:02 +01:00
Rossen Stoyanchev
fda08852ba Take content-type from ResponseEntity unconditionally
From #9a894a we began using the content-type from the ResponseEntity
but cross-checking it still against the requested content type.

Arguably there isn't any purpose in cross-checking. The only possible
outcomes are: a) it's compatible or b) it's not, which would result in
406 (NOT_ACCEPTABLE). As we've been given explicitly the media type to
use, it makes little sense to send 406, ignoring the wish to use that
content type.

Issue: SPR-16251
2017-12-02 00:43:43 -05:00
Rossen Stoyanchev
203370a810 Handle absolute URI in Reactor request.uri()
The request URI returned from HttpServerRequest.uri() typically
contains contains an absolute path but could also contain an
absolute URI. This commit adds handling for the latter, effectively
taking only the absolute path portion.

Issue: SPR-16243
2017-12-01 23:34:35 -05:00
Rossen Stoyanchev
b9a1168580 Consistently return null if certificates not available
Issue: SPR-16244
2017-12-01 21:38:40 -05:00
Rossen Stoyanchev
e99b0038a0 Polish 2017-12-01 21:18:13 -05:00
Rossen Stoyanchev
91d3e4402f Add test case for SPR-16246 2017-12-01 15:40:35 -05:00
Rossen Stoyanchev
44c95a4736 Adjust logging to catch sporadic PERF build failure 2017-12-01 10:11:51 -05:00
sdeleuze
7368f58518 Upgrade to Kotlin 1.2
apiVersion and languageVersion options are set to 1.1
on production code in order to avoid incompatibilities
with Kotlin 1.1 based projects or libraries.

Issue: SPR-16239
2017-11-30 14:50:16 +01:00
Rossen Stoyanchev
63c2c08e01 Update advice on file extensions in URLs
Issue: SPR-16240
2017-11-29 15:09:13 -05:00
Rossen Stoyanchev
dd0d270ba2 Improve error handling when response is committed
ResponseStatusExceptionHandler lets the error through if it can't
change the status while HttpWebHandlerAdapter logs a more helpful
message (including status code) but without a full stack trace.

Issue: SPR-16231
2017-11-29 12:39:06 -05:00
Juergen Hoeller
873cb4e58b Remove unnecessary deprecation suppression 2017-11-29 15:44:08 +01:00
Juergen Hoeller
b55a2631ba NamedParameterJdbcTemplate provides accessor for classic JdbcTemplate
Issue: SPR-16241
2017-11-29 15:38:21 +01:00
Rossen Stoyanchev
6f73b8b200 Add WebTestClient to Web Servlet section 2017-11-29 08:45:07 -05:00
Sam Brannen
2b68212c20 Fix grammar 2017-11-29 14:44:21 +01:00
Rossen Stoyanchev
3650ecc3bb Polish 2017-11-28 22:16:07 -05:00
Rossen Stoyanchev
bec63fbb33 Update CORS chapters
- Add "Processing" section (also replaces Advanced Customizations)
- Add information on out-of-the-box behavior
- Add more deails on @CrossOririn default configuratio
- Add cross-references between Spring MVC and WebFlux
- Polish
2017-11-28 16:29:30 -05:00
Rossen Stoyanchev
375a63a041 Update README.md 2017-11-28 09:28:34 -05:00
Sam Brannen
773cd3241b Polishing 2017-11-28 14:11:21 +01:00
Juergen Hoeller
f2e8171bfb Latest dependency updates (RxJava 2.1.7, TestNG 6.13.1, Selenium HtmlUnit Driver 2.28.2) 2017-11-28 12:10:26 +01:00
Rossen Stoyanchev
dc3d834026 Refinements related to a committed response
1. setComplete checks the isCommitted flag to avoid an unnecessary
debug message. This method is meant to be safe to call many times.

2. setStatusCode lowers log message to TRACE, since the return value
communicates the outcome it's arguably much less critical.

3. Add comment and test case for ResponseStatusExceptionHandler.
A ResponseStatusException is clearly meant to be handled by this
handler so don't let it pass through even if the respones is
committed.

Issue: SPR-16231
2017-11-27 16:31:49 -05:00
Spring Buildmaster
e30f1fbe89 Next Development Version 2017-11-27 10:52:28 +00:00
Juergen Hoeller
b1c657fa4b Consistent nullability in DataAccessUtils through nullableSingleResult
Issue: SPR-16225
2017-11-26 17:16:39 +01:00
Juergen Hoeller
a8323f6a27 Latest dependency updates (OkHttp 3.9.1, JRuby 9.1.14, Rome 1.9) 2017-11-26 16:03:48 +01:00
Juergen Hoeller
81052cd27a Upgrade to Kotlin 1.1.61
Issue: SPR-16194
2017-11-24 23:23:38 +01:00
Juergen Hoeller
35dd8db892 Correct number of web-specific scopes
Issue: SPR-16230
2017-11-24 14:13:23 +01:00
Juergen Hoeller
edf22a3e25 Upgrade to Log4J 2.10 (and Groovy 2.4.13) 2017-11-24 12:04:08 +01:00
sdeleuze
3b96690e69 Add missing RestOperations extensions
Issue: SPR-16229
2017-11-23 22:12:03 +01:00
Rossen Stoyanchev
01a82b5291 Improve semantics writing currentData
Before this commit, the return value from write was interpreted as the
data being fully written and ready to be released via releaseData().

This is not true for WebSocketSession implementations where a true
return value simply means the message was sent with the full payload
but releas is not appropriate until a send confirmation.

Technically not an issue since WebSocketSession's extending this do
not use pooled buffers. Nevertheless this commit refines the semantics
of write, removes the releaseData() method, and makes sub-classes
responsible for releasing the buffer when fully written (and they
know best when that is). As a bonus currentData is now private.

Issue: SPR-16207
2017-11-23 10:55:03 -05:00
Rossen Stoyanchev
102a0ad792 Polish 2017-11-23 10:22:35 -05:00