[Catalyst] Problems with $c->req->base on lighttpd deployment
(Catalyst 5.9)
Javier Luque Tuason
javier at sixsideddevelopment.com
Thu Jan 17 15:09:47 GMT 2013
Following the instructions for lighttpd deployment:
http://wiki.catalystframework.org/wiki/deployment/lighttpd_fastcgi
As well as trying the static deployment here:
http://search.cpan.org/~hkclark/Catalyst-Manual-5.9006/lib/Catalyst/Manual/=
Deployment/lighttpd/FastCGI.pod
I noticed that styles and images on non-root pages were being incorrectly
parsed in the c.uri_for method.
For example in: http://myapp.com/foo/bar
[% c.uri_for('/css/main.css') %]
parsed to:
http://myapp.com/foo/bar/css/main.css (instead of
http://myapp.com/css/main.css)
Upon further inspection I noticed that the problem lied in $c->req->base not
returning the absolute path but instead it returned the relative path.
[% c.req.base %] parsed to: http://myapp.com/foo/bar/ (instead of
http://myapp.com <http://myapp.com/css/main.css>)
This problem does not occur when using the standalond deployment:
CATALYST_ENGINE=3D'HTTP::Prefork' script/yourapp_server.pl
Reverting to Catalyst 5.8 fixed this problem but unfortunately there are
other problems. Also not that
myapp_server.pl works perfectly and this only happens when myapp_fastcgi is
invoked.
Any else experiencing these problems?
Regards,
Jav
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20130117/3c5b0=
52d/attachment.htm
More information about the Catalyst
mailing list