We're updating the issue view to help you get more done. 

first POST request after startup results in a 302

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 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>

Environment

Status

Assignee

Michael Offner

Reporter

Zac Spitzer

Affects versions

5.3.2.33

Priority

Minor