Uploaded image for project: 'Lucee Development'
  1. LDEV-1988

first POST request after startup results in a 302

    Details

    • Type: Bug
    • Status: Being Investigated/Triaged
    • Priority: New
    • Resolution: Unresolved
    • Affects Version/s: 5.3.2.33
    • Fix Version/s: None
    • Labels:
      None
    • Sprint:

      Description

      It seems the first request processed by Lucee results in a 302 redirect

      Lucee 5.3.1.62, Apache 2.4.27, latest mod_cfml and Tomcat 8.5.31.0 (installed via the installer)

      Attached is a test case which should be dropped into an existing Apache 2.4 install with mod_cfml
      enabled.

      1. Extract the zip into C:\lucee\tomcat\webapps\ROOT\request
      2. Add the httpd.conf configuration to the existing apache install (exposes C:\lucee\tomcat\webapps\ROOT\ on port 84)
      3. Open an Administrator command prompt (use cmd.exe not powershell)
      4. Run C:\lucee\tomcat\webapps\ROOT\request\test.bat which will stop and start lucee (which is why it needs to be run as administrator), then make two http requests via curl (sample output below)

      the problem is that the first request results in a 302 Location response, subsequent requests don't

      C:\lucee\tomcat\webapps\ROOT\request>net stop lucee
      The Lucee service is stopping...
      The Lucee service was stopped successfully.
      
      C:\lucee\tomcat\webapps\ROOT\request>net start lucee
      The Lucee service is starting.
      The Lucee service was started successfully.
      
      C:\lucee\tomcat\webapps\ROOT\request>curl -m 30 -H "Content-Type: application/x-www-form-urlencoded" -X POST http://localhost:84/request/test.cfm -v
      *   Trying ::1...
      * TCP_NODELAY set
      * Connected to localhost (::1) port 84 (#0)
      > POST /request/test.cfm HTTP/1.1
      > Host: localhost:84
      > User-Agent: curl/7.55.1
      > Accept: */*
      > Content-Type: application/x-www-form-urlencoded
      >
      < HTTP/1.1 302 302
      < Date: Thu, 06 Sep 2018 11:00:50 GMT
      < Server: Apache/2.4.27 (Win32) OpenSSL/1.0.2l
      < Location: /request/test.cfm
      < Content-Length: 0
      <
      * Connection #0 to host localhost left intact
      
      C:\lucee\tomcat\webapps\ROOT\request>curl -m 30 -H "Content-Type: application/x-www-form-urlencoded" -X POST http://localhost:84/request/test.cfm -v
      *   Trying ::1...
      * TCP_NODELAY set
      * Connected to localhost (::1) port 84 (#0)
      > POST /request/test.cfm HTTP/1.1
      > Host: localhost:84
      > User-Agent: curl/7.55.1
      > Accept: */*
      > Content-Type: application/x-www-form-urlencoded
      >
      < HTTP/1.1 200 200
      < Date: Thu, 06 Sep 2018 11:00:57 GMT
      < Server: Apache/2.4.27 (Win32) OpenSSL/1.0.2l
      < Set-Cookie: cfid=9fc36602-7b00-4fe8-a44e-e9ee5932f45f;Path=/;Expires=Wed, 26-Sep-2018 12:39:02 UTC;HTTPOnly
      < Set-Cookie: cftoken=0;Path=/;Expires=Wed, 26-Sep-2018 12:39:02 UTC;HTTPOnly
      < Content-Type: text/html;charset=UTF-8
      < Content-Length: 69
      <
      
      
      hello from C:\lucee\tomcat\webapps\ROOT\request\test.cfm POST* Connection #0 to host localhost left intact
      C:\lucee\tomcat\webapps\ROOT\request>
      

        Attachments

          Activity

            People

            • Assignee:
              michael1 Michael Offner
              Reporter:
              zac.spitzer Zac Spitzer
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: