Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-30988

[GSS](8.1.z) UNDERTOW-2605 - FixedLengthStreamSourceConduit does not clean up ReadTimeoutStreamSourceConduit after an exact Content-Length read

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • 8.1 Update 2
    • None
    • Undertow
    • None
    • False
    • Hide

      None

      Show
      None
    • False
    • Hide
      1. Deploy attached quickstart helloworld.war
      2. Set short timeouts on your listener:
                      <http-listener name="default" socket-binding="http" read-timeout="1000" write-timeout="1000" redirect-socket="https" enable-http2="true"/> 

              3. Test posting some moderate date like 30+kb:

      $ curl -v -k -H "Expect: " -F "file_upload=@filename" localhost:8080/helloworld/HelloWorld  
      Show
      Deploy attached quickstart helloworld.war Set short timeouts on your listener:               <http-listener name= " default " socket-binding= "http" read-timeout= "1000" write-timeout= "1000" redirect-socket= "https" enable-http2= " true " />         3. Test posting some moderate date like 30+kb: $ curl -v -k -H "Expect: " -F "file_upload=@filename" localhost:8080/helloworld/HelloWorld

      If an application reads POST data such that the content length is read exactly (so there's no further read attempted beyond the content length for a -1 read return), then we never reach this block here for the finish listener to be called since the read is never attempted again with the remaining length seen as 0 from the state value.  We would need this called to trigger ReadTimeoutStreamSourceConduit.terminateRequest/cleanup and remove the read timeout from the exchange.  But since an exact length read doesn't hit this, the ReadTimeoutStreamSourceConduit is never cleaned up after the full request read.  This means the read time-out will still fail and close any connection for request processing that exceeds the read-timeout even after the complete read.

              flaviarnn Flavia Rainone
              rhn-support-aogburn Aaron Ogburn
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: