Rossen Stoyanchev
15182b29a4
Add MockWebSession for use with MockServerWebExchange
...
Issue: SPR-16772
2018-05-11 10:53:28 -04:00
Rossen Stoyanchev
4da43de7e1
Remove individual detection of forwarded headers
...
This commit removes all places where forwarded headers are checked
implicitly, on an ad-hoc basis.
ForwardedHeaderFilter is expected to be used instead providing
centralized control over using or discarding such headers.
Issue: SPR-16668
2018-05-11 09:31:39 -04:00
Rossen Stoyanchev
d3f3b41f52
MockHttpServletResponse writer sets committed flag
...
Issue: SPR-16683
2018-05-10 16:22:54 -04:00
Rossen Stoyanchev
eef592d901
Add builder to MockServerWebExchange
...
Issue: SPR-16772
2018-05-10 15:16:13 -04:00
Sebastien Deleuze
af0cb53742
Support decoding Mono in Jaxb2XmlDecoder
...
Issue: SPR-16759
2018-05-02 12:10:46 +02:00
Juergen Hoeller
21fad8e205
SimpleClientHttpResponse catches any Exception on close
...
Issue: SPR-16773
2018-05-01 23:51:05 +02:00
Rossen Stoyanchev
85ee36b385
Uncomment tests that now work
2018-04-30 19:47:14 -04:00
Juergen Hoeller
a683472daa
Support for non-standard HTTP status in reactive ClientHttpResponse
...
Issue: SPR-16748
2018-04-27 18:25:11 +02:00
Rossen Stoyanchev
9bc4e70e93
Better assertion message in MockPart
...
Issue: SPR-16767
2018-04-25 09:59:06 -04:00
Brian Clozel
69e3fde295
Avoid duplicate Accept header values in RestTemplate
...
Prior to this commit, the various `HttpMessageConverter` instances
configured for a given `RestTemplate` instance could all contribute
`MediaType` values to the "Accept:" request header.
This could lead to duplicate media types in that request header,
cluttering for the HTTP request for no reason.
This commit ensures that only distinct values are added to the request.
Issue: SPR-16690
2018-04-12 22:28:31 +02:00
sdeleuze
89d069b09d
Add default ctor to Reactive UrlBasedCorsConfigurationSource
...
Issue: SPR-16712
2018-04-11 14:38:42 +02:00
Rossen Stoyanchev
4454ffd2b1
Replace remaining use of block operator
2018-03-31 11:18:38 -04:00
Stephane Maldini
b8d32095a9
workaround multipart integration test using blocking receive inside netty thread
2018-03-30 15:43:11 -07:00
Juergen Hoeller
b165475eb6
Polishing
2018-03-29 16:05:52 +02:00
Rossen Stoyanchev
f9e6ea5482
MvcResult returns asyncResult after asyncDispatch
...
Issue: SPR-16648
2018-03-28 22:15:16 -04:00
Juergen Hoeller
d95bbb6b1b
Test for hasError keeping body available in case of unknown status code
...
Issue: SPR-16604
2018-03-28 12:16:03 +02:00
Rossen Stoyanchev
5861e9685b
Always specify charset for form data requests
...
Issue: SPR-16613
2018-03-27 19:56:09 -04:00
Rossen Stoyanchev
f3994467c4
Refine ContentNegotiationStrategy contract
...
Consistently return "*/*" if no media types were requested rather than
an empty list. Existing code has to check for both in any case to see
if nothing was requested.
Issue: SPR-16624
2018-03-27 16:54:19 -04:00
Juergen Hoeller
ba5ef6456f
WebFluxResponseStatusExceptionHandler for @ResponseStatus introspection
...
The web.server package is quite low-level and should not depend on web.bind in order to avoid a dependency cycle. Extracting the introspection of the ResponseStatus annotation into a WebFlux-level subclass resolves the cycle.
Issue: SPR-16567
2018-03-21 16:12:32 +01:00
Rossen Stoyanchev
842c29103f
MultipartBodyBuilder supports PublisherEntity as input
...
Issue: SPR-16601
2018-03-16 16:18:05 -04:00
Rossen Stoyanchev
313c6cef32
Polish
2018-03-16 16:18:05 -04:00
Juergen Hoeller
f8588e364a
AcceptHeaderLocaleResolver keeps language match among supported locales
...
Issue: SPR-16599
2018-03-16 14:17:50 +01:00
Rossen Stoyanchev
7de2650a70
Drop @WebServlet annotation
...
Issue: SPR-16591
2018-03-16 00:14:54 -04:00
Rossen Stoyanchev
72bbb2619d
Commit actions are (properly) deferred
...
Issue: SPR-16597
2018-03-15 23:17:57 -04:00
Juergen Hoeller
d4a8f76bf9
Consistent volatile access to running flag in Lifecycle implementations
...
Issue: SPR-16488
2018-03-15 15:17:55 +01:00
Rossen Stoyanchev
b8d94f8a20
Improve WebFlux support for response status exceptions
...
Support @ResponseStatus annotated exceptions.
Supported root cause exceptions with response status information.
Issue: SPR-16567
2018-03-14 20:07:00 -04:00
Juergen Hoeller
41730220f4
InterceptingClientHttpRequest adapts to StreamingHttpOutputMessage
...
Issue: SPR-16582
2018-03-12 22:31:48 +01:00
sdeleuze
36a222acd5
Take into account the MimeType's charset in Jackson encoder
...
Notice that per specification, only Unicode is supported
(UTF8, UTF16_BE, UTF16_LE, UTF32_BE, UTF32_LE).
Issue: SPR-16539
2018-03-12 21:54:53 +01:00
Rossen Stoyanchev
7a8e0ff3c3
Update ServerWebExchangeTests
2018-03-06 18:12:37 -05:00
Juergen Hoeller
90d768bb7f
Overloaded convenience setters: setCacheControl(CacheControl), setExpires(ZonedDateTime)
...
Issue: SPR-16562
2018-03-06 23:06:04 +01:00
igor-suhorukov
06fef1e5a4
Polish: assertion arguments should be passed in the correct order
2018-03-03 16:14:45 +01:00
Rossen Stoyanchev
cef98e1125
FilePart uses correct flags when opening files
...
Issue: SPR-16546
2018-03-02 10:42:50 -05:00
Rossen Stoyanchev
e0e90ed006
SSE writer respects charset in MediaType
...
Issue: SPR-16516
2018-02-26 16:42:00 -05:00
Juergen Hoeller
2a379e099c
Polishing
2018-02-25 21:24:38 +01:00
Juergen Hoeller
a5cbf5fe24
Consistent use of Collection.toArray with zero-sized array argument
...
Includes consistent use of ClassUtils.toClassArray (as non-null variant)
Issue: SPR-16523
2018-02-22 11:29:46 +01:00
Rossen Stoyanchev
3bfa56dff2
Polish
2018-02-21 10:29:46 -05:00
Rossen Stoyanchev
6959e66b25
JsonEOFException is wrapped as DecodingError
...
Jackson2Tokenizer now also wraps JsonProcessingException's on
endOfInput(), as it also does in tokenize(DataBuffer). This ensures
treating those errors as 400 vs 500.
Issue: SPR-16521
2018-02-21 10:12:33 -05:00
Juergen Hoeller
0de36d2883
Consistent HttpMethod identity comparisons
2018-02-18 22:01:22 +01:00
Juergen Hoeller
d7cab23e6d
Consistent use of StringUtils.toStringArray
...
(cherry picked from commit 6d11b40 )
2018-02-16 20:49:17 +01:00
Rossen Stoyanchev
ac495d7380
Polish ForwardedHeaderFilter and related code
...
Issue: SPR-16506
2018-02-16 12:17:23 -05:00
Rossen Stoyanchev
6920a1f958
ForwardedHeaderFilter handles query+fragment correctly
...
Issue: SPR-16506
2018-02-16 11:10:50 -05:00
Juergen Hoeller
cd8a1bdb8b
AcceptHeaderLocaleContextResolver leniently handles invalid header value
...
Also falls back to language-only match among its supported locales now.
Issue: SPR-16500
Issue: SPR-16457
2018-02-15 13:14:49 +01:00
Sam Brannen
24adc7d3c6
Delete unused imports
2018-02-14 16:55:57 +01:00
Rossen Stoyanchev
8c37ad7ac5
Startup/shutdown log messages for AbstractHttpServer
...
Issue: SPR-16494
2018-02-13 14:58:10 -05:00
igor-suhorukov
0ee505b73e
Polish: assertion arguments should be passed in the correct order,
...
use assertNull instead of assertEquals(null, value),
declare delta as double value in assertEquals
2018-02-10 17:17:28 +01:00
Rossen Stoyanchev
1b98d09855
Fix copy+paste error
2018-02-06 15:43:05 -05:00
Rossen Stoyanchev
efdfe9ad8d
Minor Javadoc update
2018-02-06 11:23:53 -05:00
Rossen Stoyanchev
1653a32a04
Stabilize Flux.interval emissions in integration tests
...
After this commit the use of interval in tests is combined with
take(n).onBackpressureBuffer(n) to ensure emissions don't fail if the
fixed rate is exceeded (e.g. on slow CI server).
Tests that verify N number of items followed by verifyOnComplete()
should set the number of emissions to N.
Tests that verify N number of items followed by thenCancel() should
set the number of buffered to an arbitrary number greater than N.
2018-02-06 11:01:19 -05:00
Juergen Hoeller
817a836960
Consistent object type exposure for JSON rendering (workaround for Gson)
...
Issue: SPR-16461
2018-02-05 22:51:33 +01:00
Arjen Poutsma
609f173ebc
StringDecoder shouldn't chop off strings randomly
...
Issue: SPR-16337
2018-02-02 15:59:21 +01:00