1. 20 7月, 2015 5 次提交
  2. 17 7月, 2015 2 次提交
  3. 15 7月, 2015 2 次提交
  4. 14 7月, 2015 2 次提交
  5. 13 7月, 2015 2 次提交
    • J
      8fdbf428
    • S
      Avoid rejecting same-origin requests detected as CORS requests · 84138abf
      Sebastien Deleuze 提交于
      Browsers like Chrome or Safari include an Origin header for same-origin
      POST/PUT/DELETE requests, not only for cross-origin requests.
      
      Before this commit, these same-origin requests would have been detected
      as potential cross-origin requests, and rejected if the same-origin domain
      is not part of the configured allowedOrigins.
      
      This commit avoid to reject same-origin requests by reusing the logic
      introduced in Spring 4.1 for detecting reliably Websocket/SockJS
      same-origin requests with the WebUtils.isValidOrigin() method. This
      logic has been extracted in a new WebUtils.isSameOrigin() method.
      
      Issue: SPR-13206
      84138abf
  6. 10 7月, 2015 2 次提交
    • S
      Polish CORS support · 882fe129
      Sebastien Deleuze 提交于
      882fe129
    • S
      Introduce CorsFilter and CorsConfigurationMapping · cd9b3903
      Sebastien Deleuze 提交于
      This commit introduces the following changes:
       - The new CorsConfigurationMapping class allows to share the mapped
         CorsConfiguration logic between AbstractHandlerMapping and CorsFilter
       - In AbstractHandlerMapping, the Map<String, CorsConfiguration>
         corsConfiguration property has been renamed to corsConfigurations
       - CorsFilter allows to process CORS requests at filter level, using any
         CorsConfigurationSource implementation (for example
         CorsConfigurationMapping)
      
      Issue: SPR-13192
      cd9b3903
  7. 07 7月, 2015 5 次提交
  8. 06 7月, 2015 2 次提交
  9. 04 7月, 2015 1 次提交
  10. 01 7月, 2015 2 次提交
  11. 30 6月, 2015 4 次提交
  12. 29 6月, 2015 1 次提交
    • B
      Fix conditional requests support for HttpEntity · 39d689da
      Brian Clozel 提交于
      Prior to this commit, `HttpEntityMethodProcessor` would rely on
      `ServletWebRequest` to process conditional requests and with incoming
      `"If-Modified-Since"` / `"If-None-Match"` request headers.
      
      This approach is problematic since in that class:
      
      * response is wrapped in a `ServletServerHttpResponse`
      * this wrapped response does not write response headers right away
      * `ServletWebRequest.checkNotModified` methods can't apply their
      logic with incomplete response headers
      
      This solution adds some minimal code duplication and applies
      the conditional request logic within the Processor.
      
      A possible alternative would be to improve the
      `ServletServerHttpResponse$ServletResponseHttpHeaders` implementation
      with write methods - but this solution would only work for Servlet 3.x
      applications.
      
      Issue: SPR-13090
      39d689da
  13. 27 6月, 2015 1 次提交
  14. 26 6月, 2015 3 次提交
  15. 25 6月, 2015 1 次提交
    • S
      Call type aware canWrite() when using a GenericHttpMessageConverter · 289f35da
      Sebastien Deleuze 提交于
      This commit introduces the following changes:
       - In AbstractMessageConverterMethodProcessor, the type aware variant of
         canWrite() is now called when the converter implements
         GenericHttpMessageConverter.
       - The Javadoc has been updated in GenericHttpMessageConverter to make it clear
         that the type aware canRead() and canWrite() methods should perform the same
         checks than non type aware ones.
        - AbstractGenericHttpMessageConverter now implements default type aware
          canRead() and canWrite() methods than just call the non type aware variants.
          Due to this, if subclasses just override the non type aware variants,
          they still have the right behavior.
      
      Issue: SPR-13161
      289f35da
  16. 24 6月, 2015 1 次提交
    • S
      Uses Charset instead of String in MimeType.equals() · 89e504c2
      Sam Brannen 提交于
      Prior to this commit, Spring's MimeType checked for equality between
      two MIME types based on the equality of their properties maps; however,
      the properties maps contain string representations of the "charset"
      values. Thus, "UTF-8" is never equal to "utf-8" which breaks the
      contract for character set names which must be compared in a
      case-insensitive manner.
      
      This commit addresses this issue by ensuring that "charset" properties
      in MimeType instances are compared as Java Charset instances, thereby
      ignoring case when checking for equality between charset names.
      
      Issue: SPR-13157
      89e504c2
  17. 23 6月, 2015 1 次提交
  18. 22 6月, 2015 1 次提交
    • S
      Make @ResponseBody method return type available for message converters · 31a5434e
      Sebastien Deleuze 提交于
      This commit adds canWrite() and write() methods to the
      GenericHttpMessageConverter interface. These are type aware variants
      of the methods available in HttpMessageConverter, in order to keep
      parametrized type information when serializing objects.
      
      AbstractMessageConverterMethodProcessor now calls those type aware
      methods when the message converter implements GenericHttpMessageConverter.
      
      AbstractJackson2HttpMessageConverter and GsonHttpMessageConverter uses
      these new methods to make @ResponseBody method return type available
      for type resolution instead of just letting the JSON serializer trying
      to guess the type to use from the object to serialize.
      
      Issue: SPR-12811
      31a5434e
  19. 20 6月, 2015 1 次提交
    • S
      Polish CORS support classes · de9f2787
      Sam Brannen 提交于
      - Simplified "check" algorithms in CorsConfiguration
      
      - Improved robustness of setter methods in CorsConfiguration in order to
        avoid attempts to modify immutable lists
      
      - Improved CORS documentation and fixed typo
      
      - Introduced constants in CorsConfiguration
      
      - Removed auto-boxing in CorsRegistration
      de9f2787
  20. 19 6月, 2015 1 次提交