1. 24 3月, 2017 7 次提交
  2. 23 3月, 2017 4 次提交
    • A
      Return null from MockServletContext.getMimeType for unknown type · e2aa8803
      Arjen Poutsma 提交于
      ServletContext.getMimeType() returns `null` for unknown mime types; not
      `application/octet-stream`.
      
      Issue: SPR-14908
      e2aa8803
    • A
      Change MediaTypeFactory to return Optional · fd1db57e
      Arjen Poutsma 提交于
      This commit changes the `MediaTypeFactory` to return
      `Optional<MediaType>` (instead of a plain `MediaType`) for the
      `getMediaType` methods.
      
      Issue: SPR-14908
      fd1db57e
    • R
      String encoding for any MIME type · 3d68c496
      Rossen Stoyanchev 提交于
      CharSequenceEncoder now supports all MIME types, however since encoding
      Flux<String> can overlap with other encoders (e.g. SSE) there are now
      two ways to create a CharSequenceEncoder -- with support for text/plain
      only or with support for any MIME type.
      
      In WebFlux configuration we insert one CharSequenceEncoder for
      text/plain (as we have so far) and a second instance with support for
      any MIME type at the very end.
      
      Issue: SPR-15374
      3d68c496
    • R
      Revise "streaming" MediaType support · 2896c5d2
      Rossen Stoyanchev 提交于
      Push the knowledge of what media types represent "streaming" down to
      the Encoder level where knowledge is required (e.g. to encode a
      JSON array vs a stream of JSON elements).
      2896c5d2
  3. 22 3月, 2017 12 次提交
  4. 21 3月, 2017 14 次提交
  5. 20 3月, 2017 1 次提交
    • R
      ResourceHttpMessageWriter refactoring · 76fe5f6f
      Rossen Stoyanchev 提交于
      Fold ResourceRegionHttpMessageWriter into ResourceHttpMessageWriter.
      The latter was a private helper (not meant to be exposed) and the two
      have much in common now sharing a number of private helper methods.
      
      The combined class does not extend AbstractServerHttpMessageConverter
      from which it was not using anything.
      
      Internally the combined class now delegates directly to ResourceEncoder
      or ResourceRegionEncoder as needed. The former is no longer wrapped
      with EncoderHttpMessageWriter which is not required since "resource"
      MediaType determination is a bit different.
      
      The consolidation makes it easy to see the entire algorithm in one
      place especially for server side rendering (and HTTP ranges). It
      also allows for consistent determination of the "resource" MediaType
      via MediaTypeFactory for all use cases.
      76fe5f6f
  6. 18 3月, 2017 2 次提交