sukria/Dancer — Issue #718: POST parameters lost under Apache2/CGI
Author: neniu
Created: 2011-12-29 20:10:27+00:00
State: open

I have a Dancer app with a login form.
I have the app deployed as CGI under Apache and everything seems to be working except that POST variables are not arriving at the handler code.

The login form has the default enc-type and fields 'uname' and 'pword'.
Firebug confirms that the parameters are present in the POST.
If I run a logging proxy of my desktop machine, it confirms that the content is 'uname=aa&pword=aa' and that the content length is 17.
In the route handler code, request->params() returns nothing. Dumping the Dancer::Request object shows params to be empty ( {} ).
The content_length attribute of the Dancer::Request object is 17 though. The content gets as far as the server but is not making it to my code.

When running the Dancer app.pl stand-alone, this works perfectly. It is only when running it under the main web server that it fails.

None of the deployment instructions have worked for me, under CGI or otherwise.
The closest I have managed is
ScriptAlias /members /www/domains/thegsa.org/cgi-bin/dispatch.cgi
in the section of the config file.
(Only the /members section of the site is Dancer, the rest is served statically.)

I have not tried this with any other form in the application.

It took me so long to get this working under apache at all that feels like I have done the brain surgery successfully but can't remember how to stitch the incision shut.

Thank you.