miyagawa/Plack-Middleware-Debug — Issue #12: Javascript/CSS URLs are broken when running under FastCGI
Author: flussence
Created: 2012-01-20 13:28:05+00:00
State: open

Hi, found a small bug:

The URLs in the debug panel's inserted HTML have `$env->{SCRIPT_NAME}` prepended to them, which was ok under HTTP::Server::PSGI because that variable seems to be empty there. However with FastCGI (on Lighttpd) it gets set to the relative part of the current URL, so all paths end up wrong (e.g. I get `/login/debug_toolbar/jquery.js` instead of `/debug_toolbar/jquery.js`).

I've noticed `$PATH_INFO` and `$SCRIPT_NAME` seem to be swapped between the two servers, maybe that has something to do with it?