Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-17393

Remove transfer-encoding check in EncoderHttpMessageWriter and related workaround in ReactorServerHttpResponse

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 5.1.1
    • Fix Version/s: 5.1.2
    • Component/s: Reactive, Web
    • Labels:
      None
    • Last commented by a User:
      true

      Description

      EncoderHttpMessageWriter computes and sets the content-length for Mono values since 5.0.5, see SPR-16542, but also checks to make sure there is no "transfer-encoding" header set already. Since Reactor Netty sets "transfer-encoding: chunked" by default int the beginning, this became and issue, after the recent changes in 5.1.1, see SPR-17250, to wrap the headers of the underlying server, in turn requiring a workaround in ReactorServerHttpResponse.

      While the check for whether transfer-encoding is set isn't an issue in itself, it should not be necessary. It's not a header set by the application typically. Arguably it's better to remove this check in order to be able to remove the workaround in ReactorServerHttpResponse, and essentially leave the decision for transfer-encoding to Reactor Netty. 

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              rstoya05-aop Rossen Stoyanchev
              Reporter:
              rstoya05-aop Rossen Stoyanchev
              Last updater:
              Spring Issuemaster
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                1 year, 37 weeks ago