Uploaded image for project: 'Undertow'
  1. Undertow
  2. UNDERTOW-2512

Empty response body regression with request body and delayed response

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a Bug
    • Icon: Minor Minor
    • None
    • 2.3.18.Final
    • None
    • None
    • Hide

      To reproduce the issue:

      • Import the attached Spring Boot project
      • Run the application in the IDE or with `./gradlew bootRun`
      • Send the requests defined in the `test.http` file, POST and PUT requests will likely return an empty response, GET will provide the expected response

      To see the regular behavior:

      • Comment/remove ext["undertow.version"] = "2.3.18.Final" in build.gradle.kts in order to use Undertow 2.3.17.Final 
      • Refresh Gradle configuration in the IDE
      • Run the application in the IDE or with `./gradlew bootRun`
      • Send the requests defined in the `test.http` file, all POST, PUT and GET requests will return the expected response
      Show
      To reproduce the issue: Import the attached Spring Boot project Run the application in the IDE or with `./gradlew bootRun` Send the requests defined in the `test.http` file, POST and PUT requests will likely return an empty response, GET will provide the expected response To see the regular behavior: Comment/remove ext ["undertow.version"] = "2.3.18.Final" in build.gradle.kts in order to use Undertow 2.3.17.Final  Refresh Gradle configuration in the IDE Run the application in the IDE or with `./gradlew bootRun` Send the requests defined in the `test.http` file, all POST, PUT and GET requests will return the expected response
    • Migration

      Hi,
       
      While preparing the next release of Spring Framework and Spring Boot, I think we discovered a regression introduced by Undertow 2.3.18.Final. It looks like Reactive endpoints where the request body is read and the response is delayed ends up with an empty response body most of the time while it is was working as expected with Undertow 2.3.17.Final and previous versions.
       
      I have attached a reproducer, but to give an idea, please find below the kind of endpoints that now fails:

      @RestControllerpublic
      class DemoController {
      
          @PostMapping("/post")
          Mono<String> post(@RequestBody String text)  {
              return Mono.just(text).delayElement(Duration.ofMillis(10));
          }
      } 

       
      Notice we are unsure if Undertow 2.3.18.Final is expected to be used as it is tagged and published on Maven Central but does not appear on https://github.com/undertow-io/undertow/releases and is mentioned in the bug tracker as a non-released version. The Spring team would appreciate some guidance on which versions we are expected to leverage.

              rhn-cservice-bbaranow Bartosz Baranowski
              sdeleuze Sébastien Deleuze
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: