Commit Graph

591 Commits

Author SHA1 Message Date
Chris Beams 41c405998e Convert CRLF=>LF on files missed earlier
Complete pass with `dos2unix` found additional files missed on earlier
related commit.

Issue: SPR-5608
2011-12-22 14:06:44 +01:00
Chris Beams 88913f2b23 Convert CRLF (dos) to LF (unix)
Prior to this change, roughly 5% (~300 out of 6000+) of files under the
source tree had CRLF line endings as opposed to the majority which have
LF endings.

This change normalizes these files to LF for consistency going forward.

Command used:

$ git ls-files | xargs file | grep CRLF | cut -d":" -f1 | xargs dos2unix

Issue: SPR-5608
2011-12-21 14:52:47 +01:00
Chris Beams e158f61e93 Increment version to 3.1.1.BUILD-SNAPSHOT 2011-12-16 11:59:06 +01:00
Chris Beams ac107d0c2a Release Spring Framework 3.1.0.RELEASE 2011-12-13 16:35:49 +00:00
Juergen Hoeller 1c45c51fe1 overhaul of support package arrangements for handler method processing; added missing package-info files 2011-12-12 23:20:03 +00:00
Juergen Hoeller 450a3d7eee polishing 2011-12-12 15:04:11 +00:00
Chris Beams 23e58aa718 Preserve programmatically set context config locations
Prior to this fix, ContextLoader(Listener)'s would overwrite any
value set directly against a WebApplicationContext's #setConfigLocation
method. This is a likely scenario when using Spring 3.1's new
WebApplicationInitializer support.

Now a check is performed to ensure that the ContextLoader init-param
value is non-null before doing the overwriting.

Added tests to ensure that all expected precedence, overwriting and
defaulting of context config locations works as expected.

Issue: SPR-8510
2011-12-12 14:42:24 +00:00
Chris Beams ec1b016602 Improve unsupported operation messages in GenericWAC 2011-12-12 14:41:37 +00:00
Juergen Hoeller 8f69e81197 polishing 2011-12-11 22:07:37 +00:00
Juergen Hoeller d8e640d708 polishing 2011-12-11 22:07:12 +00:00
Juergen Hoeller e648245eb3 added MethodValidationInterceptor/PostProcessor for Hibernate Validator 4.2 based method validation; renamed Spring's variant of @Valid to @Validated 2011-12-09 18:09:14 +00:00
Arjen Poutsma 3beef9a92e SPR-8883 - RestTemplate.headForHeaders throws "IllegalArgumentException: No InputStream specified" on server resource which status code are 4xx 2011-12-08 19:17:48 +00:00
Rossen Stoyanchev c472a163f1 SPR-8572 Support Void.class as response type in RestTemplate. 2011-12-08 03:59:28 +00:00
Arjen Poutsma f9144ea1ea SPR-8367 - 3.1.0.M2 update of the RestTemplate for Apache HTTP Components will default to sending 2 requests on authentication and doesn't support HttpContext parameters without significant extention/rewrite 2011-12-07 01:22:07 +00:00
Juergen Hoeller 426863f790 avoid swallowing of IOException 2011-12-06 22:51:57 +00:00
Chris Beams c2c224958d Polish WebApplicationInitializer Javadoc
Issue: SPR-8897
2011-12-06 12:17:42 +00:00
Juergen Hoeller bea5016e53 fixed validation test failures 2011-12-03 17:03:33 +00:00
Juergen Hoeller 00133179df added SmartValidator interface with general support for validation hints; added custom @Valid annotation with support for JSR-303 validation groups; JSR-303 SpringValidatorAdapter and MVC data binding provide support for validation groups (SPR-6373) 2011-12-03 15:46:31 +00:00
Juergen Hoeller 49a2aaf023 added SmartValidator interface with general support for validation hints; added custom @Valid annotation with support for JSR-303 validation groups; JSR-303 SpringValidatorAdapter and MVC data binding provide support for validation groups (SPR-6373) 2011-12-03 15:44:33 +00:00
Rossen Stoyanchev 4bfcb79ae3 SPR-8892 Add String constants to MediaType. 2011-12-02 18:58:41 +00:00
Arjen Poutsma 53cb529162 SPR-8809 - RestTemplate headers not sent when bufferRequestBody is false 2011-12-02 11:29:47 +00:00
Rossen Stoyanchev 9f98f77c3e SPR-8863 Add RequestContext.getPathToServlet() method.
This method allows a view to access the combined context path and
servlet mapping path for prefixing URLs without having to specify
the literal part of a servlet mapping such as "/main/*") 
explicitly everywhere. For example:

${requestContext.pathToServlet}/css/main.css
2011-12-01 22:56:51 +00:00
Juergen Hoeller 45a0ae3fb9 polishing 2011-12-01 15:11:32 +00:00
Juergen Hoeller f75e832e7c polishing 2011-12-01 13:34:12 +00:00
Arjen Poutsma 91c14bd1fe SPR-8809 - RestTemplate headers not sent when bufferRequestBody is false 2011-11-30 11:07:38 +00:00
Rossen Stoyanchev a9a068e678 SPR-8867 Fix issue with Content-Length header and UTF-8 charset.
The AbstractHttpMessageConverter was using the requested Content-Type
rather than the actual response Content-Type to determine the length
of the content. This can lead to a problem when a controller returns
a ResponseEntity with a Content-Type header that ignores (overrides)
the requested Content-Type. The fix ensures that actual response 
Content-Type is the one used both to write to the response and to 
determine the length of the content.
2011-11-28 18:42:57 +00:00
Juergen Hoeller b55040cf02 Servlet/PortletContextResource's getFile prefers "file:" URL resolution over calling getRealPath (SPR-8461) 2011-11-28 16:51:42 +00:00
Juergen Hoeller 3f7dccddd2 added getObjectMapper() accessor to MappingJacksonHttpMessageConverter (SPR-8605) 2011-11-28 14:34:59 +00:00
Rossen Stoyanchev 947b5fefff SPR-8851 Switch to logging debug messages in AbstractWebArgumentResolverAdapter 2011-11-18 16:18:55 +00:00
Rossen Stoyanchev 60ee0bb8f4 SPR-8020 Support UriComponentsBuilder as a controller method argument.
The UriComponentsBuilder instance passed into the method is initialized
with current request information including host, scheme, port, context
path, and the servlet mapping's literal part.

Also added shortcut methods to buildAndExpand in UriComponentsBuilder.
2011-11-18 14:36:44 +00:00
Rossen Stoyanchev 01cc76f8e3 SPR-8697 Flag '*/subtype' as illegal. 2011-11-17 20:15:49 +00:00
Rossen Stoyanchev 63e235f215 SPR-8750 Refine 'Content-Type' update in MockHttpServletRequest/Response.
The initial solution kept these three in full sync at all times:
contentType field, characterEncoding field, 'Content-Type' header.
That is correct behavior, however it breaks existing tests that rely
on contentType and characterEncoding being equal to exactly what 
they were set to.

For example, consider:
response.setContentType("text/plain");
response.setCharacterEncoding("UTF-8");

Ideally both contentType and the 'Content-Type' header would now be
"text/plain;charset=UTF-8". However, existing tests would expect 
that contentType is equal to "text/plain".

To avoid breaking existing tests, contentType and characterEncoding
will continue to be equal to exactly what they were set to while
the 'Content-Type' header will always include both the content 
type and the charset.

The only exception to this rule is when a 'Content-Type' header
is set explicitly, the contentType and characterEncoding fields will 
be updated accordingly, possibly overriding the existing values.
2011-11-17 15:07:15 +00:00
Rossen Stoyanchev 7918810366 SPR-8750 Update MockHttpServletRequest/Response handling of contentType.
The Content-Type header and the contentType field in HttpServletRequest/Response
are now always in sync. When a header is added the contentType field is updated
as well and vice versa. 

Similarly when the Content-Type header or the contentType field includes a charset 
field, the character encoding is updated and vice versa.
2011-11-16 23:28:48 +00:00
Chris Beams 70c28a0bc5 Add Apache license header where missing in src/main 2011-11-16 18:23:56 +00:00
Rossen Stoyanchev 2a39f34d33 SPR-8803 Refine UriComponentsBuilder.replaceQueryParam().
If no values are given, the query parameter is removed.
2011-11-10 15:08:24 +00:00
Rossen Stoyanchev c9acaaf9d8 SPR-8823 ServletUriComponentsBuilder polish and reference doc update. 2011-11-08 17:49:38 +00:00
Rossen Stoyanchev d1d48ac940 SPR-8823 Add ServletUriComponentsBuilder. 2011-11-07 21:04:23 +00:00
Rossen Stoyanchev bef75aab07 Polish synchronization of model attributes with the session. 2011-11-04 22:14:13 +00:00
Rossen Stoyanchev d3f4c69f00 SPR-8803 Add UriComponentsBuilder methods to replace path/query. 2011-11-04 16:43:03 +00:00
Arjen Poutsma 78fbceff82 Added check for illegal characters when creating an encoded UriComponents object 2011-11-03 11:57:25 +00:00
Arjen Poutsma e8dd35ce5e Added check for expanding already encoded UriComponents object 2011-11-02 11:49:45 +00:00
Rossen Stoyanchev 1164f5a9fc SPR-8782 Raise helpful error when RedirectAttributes is used with old infrastructure classes. 2011-11-01 11:46:09 +00:00
Juergen Hoeller 2fdc2b5822 fixed StandardServlet/PortletEnvironment to check for JNDI (for Google App Engine compatibility) 2011-10-20 10:46:16 +00:00
Juergen Hoeller ca5f38c5e4 marked Apache HttpComponents dependency as optional (SPR-8788); cleanup of conversation dependencies 2011-10-20 09:55:09 +00:00
Chris Beams f60a40be44 Polish Environment subsystem Javadoc 2011-10-11 18:51:26 +00:00
Juergen Hoeller 0d02ef5fe5 removed conversation prototype from 3.1 codebase 2011-10-11 16:22:15 +00:00
Rossen Stoyanchev b08c7f6e00 SPR-6801 @ModelAttribute instantiation refinement.
Instantiate the model attribute from a URI var or a request param only
if the name matches and there is a registered Converter<String, ?>.
2011-09-27 22:48:12 +00:00
Arjen Poutsma 5afe139285 SPR-8706 - UriUrils.decode() not properly rejecting invalid escaped URLs 2011-09-27 08:55:07 +00:00
Arjen Poutsma 67fda70cb8 SPR-8713 - DefaultResponseErrorHandler IOException Bug 2011-09-27 08:16:33 +00:00
Rossen Stoyanchev 48f7dcc464 POLISH CREATION OF DATA BINDERS FOR @RequestMapping METHODS
Make it possible to hook in custom ServletRequestDataBinderFactory
by overriding RequestMappingHandlerAdapter. 

Create ExtendedServletRequestDataBinder to add URI template vars
to the binding values taking advantage of a new extension hook in
ServletRequestDataBinder to provide additional values to bind.
2011-09-26 09:27:09 +00:00