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

wrong conversion for response time when requested in seconds

    XMLWordPrintable

Details

    • Hide

      Tested with EAP 7.0.1:
      1. Start EAP and connect to CLI
      2. /subsystem=undertow/server=default-server/host=default-host/setting=access-log:add(extended=true,pattern="time-taken")
      3. /subsystem=undertow/server=default-server/http-listener=default:write-attribute(name=record-request-start-time,value=true)
      4. reload
      5. deploy attached testing war app long-running-servlet.war
      6. perform request on server, e.g.: http://localhost:8080/long-running-servlet/HeavyProcessing?duration=6000 and see content in EAP_HOME/standalone/log/access_log.log file

      Show
      Tested with EAP 7.0.1: 1. Start EAP and connect to CLI 2. /subsystem=undertow/server=default-server/host=default-host/setting=access-log:add(extended=true,pattern="time-taken") 3. /subsystem=undertow/server=default-server/http-listener=default:write-attribute(name=record-request-start-time,value=true) 4. reload 5. deploy attached testing war app long-running-servlet.war 6. perform request on server, e.g.: http://localhost:8080/long-running-servlet/HeavyProcessing?duration=6000 and see content in EAP_HOME/standalone/log/access_log.log file

    Description

      There is a bug in Undertow's way of converting response time to seconds format for access log. In milis variable is expected to be time in milliseconds but as timeUnit is TimeUnit.SECONS actually, there are just seconds after such conversion.

      You can see it for example when use 'time-taken' identifier in access log and perform some long running request - see 'Steps to Reproduce' section.

      Attachments

        Issue Links

          Activity

            People

              sdouglas1@redhat.com Stuart Douglas
              jstourac@redhat.com Jan Stourac
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: