Commit Graph

444 Commits

Author SHA1 Message Date
Juergen Hoeller
42c090efa4 Polishing
Issue: SPR-12079
(cherry picked from commit 92bd240)
2014-08-13 15:28:36 +02:00
Juergen Hoeller
f2eea9d911 Polishing
(cherry picked from commit 8f484d3)
2014-07-29 11:50:50 +02:00
Juergen Hoeller
9ad6618207 Polishing 2014-07-28 22:47:22 +02:00
Juergen Hoeller
6e95b2613e Polishing 2014-07-24 18:35:49 +02:00
Juergen Hoeller
5342d92db7 ResourceHttpMessageConverter does not call contentLength() on InputStreamResource
Issue: SPR-12017
(cherry picked from commit f0bcb77)
2014-07-24 17:50:31 +02:00
Brian Clozel
a3a76d8c15 Fix UriComponentsBuilder.fromUriString parsing error
This commit fixes cases where part of the URI was mistaken for the
userinfo when:
* the URI did not contain any path
* the query string contained the "@"

Issue: SPR-11970
(cherry picked from commit a4484bb)
2014-07-10 16:46:33 +02:00
Juergen Hoeller
60d3a7f300 RestTemplate accepts getMessageConverters() List on setMessageConverters again
Issue: SPR-11962
(cherry picked from commit 1222ca3)
2014-07-07 20:37:35 +02:00
Juergen Hoeller
ede2150544 Polishing 2014-07-02 17:32:43 +02:00
Juergen Hoeller
86ea3059b6 Polishing 2014-07-01 15:11:36 +02:00
Juergen Hoeller
48f753f368 Polishing (backported from master) 2014-07-01 12:12:42 +02:00
Juergen Hoeller
c16032b98a Consistent declaration of private static final logger variables
Issue: SPR-11905
(cherry picked from commit 18131bf)
2014-07-01 12:09:29 +02:00
Juergen Hoeller
c73ac075c4 UriComponentBuilder allows for multiple independent build() calls on same builder instance
Issue: SPR-11885
(cherry picked from commit d239016)
2014-07-01 11:57:45 +02:00
Juergen Hoeller
9054f4fb58 HttpHeaders fails getAllow if set to EmptyCollection
Prior to this commit, calls to getAllow would fail is setAllow was set
to an EmptyCollection right before.

    java.lang.IllegalArgumentException: No enum constant
    org.springframework.http.HttpMethod

This commit fixes this by testing the header value for an empty value
before trying to use it to get a value from the Enum.

Issue: SPR-11917
(cherry picked from commit 9919a98)
2014-07-01 11:46:53 +02:00
Juergen Hoeller
e3e71ba92a Servlet 3 multipart request implements getParameterMap defensively as well
Issue: SPR-11074
(cherry picked from commit c7d1c49)
2014-05-20 11:11:56 +02:00
Juergen Hoeller
d4e1b9eb4c Polishing
(cherry picked from commit 6fef8b9)
2014-05-20 11:11:33 +02:00
Rossen Stoyanchev
44ee51a6c9 Disable URL resolution in DTD declarations
Issue: SPR-11768
2014-05-19 22:23:51 -04:00
Juergen Hoeller
54636b3f7c Further UriComponentsBuilder javadoc revision 2014-05-20 01:13:18 +02:00
Juergen Hoeller
545c28fd4e Minor UriComponentsBuilder javadoc revision 2014-05-20 00:47:03 +02:00
Juergen Hoeller
95a7bfd327 Consistent use of IllegalStateException instead of InternalError for UnsupportedEncodingException cause
(cherry picked from commit d9b39ad)
2014-05-20 00:42:48 +02:00
Juergen Hoeller
1bbc032071 Backported proper updateAccessedAttributes test
Issue: SPR-11738
(cherry picked from commit 6188550)
2014-05-19 16:42:42 +02:00
Juergen Hoeller
c70a81a805 Javadoc fixes 2014-05-19 00:08:46 +02:00
Juergen Hoeller
3c709a763d Servlet 3 multipart request implements getParameterNames defensively (for WebLogic 12 compatibility)
This commit also includes lazy resolution support for StandardServletMultipartResolver, along the lines of existing lazy mode in CommonsMultipartResolver.

Issue: SPR-11074
Issue: SPR-11730
(cherry picked from commit 82336c3)
2014-05-18 20:27:44 +02:00
Juergen Hoeller
a87c9b8c5c Test for base package specified as config location
Issue: SPR-11647
(cherry picked from commit 8e6e6c2)
2014-04-28 23:47:14 +02:00
Juergen Hoeller
c97c246940 Polishing 2014-04-28 00:29:04 +02:00
Juergen Hoeller
4dbc0c296c Polishing
(cherry picked from commit ec7d80b)
2014-04-24 10:31:39 +02:00
Juergen Hoeller
d71d38bfaf ServletServerHttpResponse specifically checks for Servlet 3.0's HttpServletResponse.getHeader(String) method
Issue: SPR-11712
(cherry picked from commit 21f9ca0)
2014-04-24 10:31:29 +02:00
Juergen Hoeller
7ae6a60f43 checkNotModified leniently handles IE-10-style If-Modified-Since values and silently proceeds if header value cannot be parsed at all
Issue: SPR-11727
(cherry picked from commit 794e859)
2014-04-24 10:30:49 +02:00
Juergen Hoeller
2f15f72fcc ShallowEtagHeaderFilter writes body early on sendError/sendRedirect and interprets setContentLength/setBufferSize as a hint for capacity increase
Issue: SPR-11705
Issue: SPR-11717
(cherry picked from commit 3f392e3)
2014-04-24 10:28:42 +02:00
Juergen Hoeller
52f580149f Polishing 2014-04-17 22:42:33 +02:00
Juergen Hoeller
f014bbb5cf Revised ByteArrayOutputStream handling in MarshallingView and co
Issue: SPR-11646
(cherry picked from commit 8006696)
2014-04-02 21:29:37 +02:00
Juergen Hoeller
d628025f13 Polishing
Issue: SPR-11262
2014-04-02 21:28:42 +02:00
Juergen Hoeller
074590730b Polishing 2014-03-25 00:54:02 +01:00
Juergen Hoeller
53352882ca Polishing 2014-03-24 22:58:33 +01:00
Juergen Hoeller
dd7f54c3c0 Revised ResizableByteArrayOutputStream as an actual subclass of ByteArrayOutputStream, and consistently applied appropriate ByteArrayOutputStream initial capacities across the codebase
Issue: SPR-11594
2014-03-24 22:57:38 +01:00
Brian Clozel
ae012ae6e2 ShallowEtagHeaderFilter use specified contentlength
Prior to this commit, the ShallowEtagHeaderFilter did not use the
content length given by the content generator to set the
ByteArrayOutputStream's buffer size.
This can lead to performance issues for large content since the buffer
grows as the content is being written.

This commit adds a new ByteArrayOutputStream variant called
ResizableByteArrayOutputStream. This implementation has public methods
for modifying the internal buffer size and does not synchronize on
buffer access.
This commit also make use of this new variant in
ShallowEtagHeaderFilter.

Issue: SPR-8271
2014-03-24 12:11:59 +01:00
Juergen Hoeller
90e3dbb0f5 BufferedImageHttpMessageConverter ignores empty MIME types
Issue: SPR-11581
2014-03-21 14:43:03 +01:00
Stephane Nicoll
4cd818b9e4 Harmonize log configuration
Prior to this commit, the codebase was using a mix of log4j.xml
and log4j.properties for test-related logging configuration. This
can be an issue as log4j takes the xml variant first when looking
for a default bootstrap configuration.

In practice, some modules declaring the properties variant were
taking the xml variant configuration from another module.

The general structure of the configuration has also been
harmonized to provide a standard console output as well as an
easy way to enable trace logs for the current module.
2014-03-20 09:43:29 -07:00
Juergen Hoeller
e0757e7ed6 Detect ControllerAdvice beans in ancestor contexts as well
Issue: SPR-11570
2014-03-18 22:29:50 +01:00
Sam Brannen
9dcd03d862 Clean up imports and warnings 2014-03-14 17:34:21 +01:00
Juergen Hoeller
791f58e6be Polishing 2014-03-13 17:31:39 +01:00
Rossen Stoyanchev
6b31074e4a Add HTTP series check shortcut methods to HttpStatus
Issue: SPR-11424
2014-03-12 17:04:16 -04:00
Juergen Hoeller
4d3ca4319e Polishing 2014-03-11 22:09:46 +01:00
Juergen Hoeller
bbcb1837c5 Polishing
Issue: SPR-11442
2014-03-10 18:31:03 +01:00
Stephane Nicoll
7a6ec69523 Fix custom config with older HttpClient
Since HttpClient 4.3, custom configuration such as the connection
timeout and the socket timeout are set in a RequestConfig object
stored in the HttpContext.

Unfortunately, older HttpClients are not supporting this
infrastructure and new clients throw an exception when the
deprecated API is used.

This commit detects if the client is an "old" implementation and
set the configuration through the deprecated means to restore
full backward compatibility with these features.

Issue: SPR-11442
2014-03-10 17:42:09 +01:00
Juergen Hoeller
3080ff3890 Polishing 2014-03-06 14:18:26 +01:00
Rossen Stoyanchev
49d7bda722 Improve CORS handling in AbstractSockJsService
After this change, AbstractSockJsService does not add CORS headers if
the response already contains an "Access-Control-Allow-Origin" header.
Essentially it backs off assuming CORS headers are handled centrally
e.g. through a Filter.

In order to support this, the ServletServerHttpResponse now returns an
instance of HttpHeaders that also provides access to headers already
present in the HttpServletResponse.

Issue: SPR-11443
2014-03-05 21:06:46 -05:00
Sam Brannen
9891bdc7b4 Clean up "abstract" test issues
- Deleted empty AbstractWebSocketClientTests class.

 - AbstractServletHandlerMethodTests and AbstractHttpRequestTests are
   now actually declared as abstract.

 - The following classes are not abstract but currently have an
   "Abstract" prefix and therefore get ignored by the Gradle build.
   This commit renames each of these by deleting the "Abstract" prefix.

   - AbstractFlashMapManagerTests
   - AbstractMappingContentNegotiationStrategyTests
   - AbstractSockJsServiceTests
   - AbstractWebSocketHandlerRegistrationTests
2014-03-05 12:41:26 +01:00
Juergen Hoeller
9b771573ec Log4jWebConfigurer does not try to parse empty "log4jRefreshInterval" context-param
Issue: SPR-11507
2014-03-04 13:31:59 +01:00
Rossen Stoyanchev
c553d681f1 Add Servlet 3.1 methods to mock request
Issue: SPR-11492
2014-02-28 12:28:17 -05:00
Rossen Stoyanchev
c4000727ef Move customize(Un)Marshaller methods to abstract class
Issue: SPR-11488
2014-02-28 11:54:34 -05:00