Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^4: Mason via Poet+Plack (FCGI): Request path gets lost

by flowdy (Scribe)
on Jun 26, 2014 at 12:53 UTC ( [id://1091354]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Mason via Poet+Plack (FCGI): Request path gets lost
in thread Mason via Poet+Plack (FCGI): Request path gets lost

Hi Monk,

Changing it to <LocationMatch "^/"> has no effect. But I found a work-around (that is, not quite a solution I would call one) which is tweaking the subroutine returned by the builder call in bin/app.psgi that way:

builder { # [...] sub { my $psgi_env = shift; /^\/$/ and $_ = "" for $psgi_env->{SCRIPT_NAME}; $psgi_env->{PATH_INFO} ||= trim( @{$psgi_env}{'SCRIPT_FILENAME', 'DOCUMENT_ROOT'}, ". +html" ); $poet->app_class('Mason')->handle_psgi($psgi_env); }; }; sub trim { my ($string, $head, $tail) = @_; $string =~ s{ \A \Q$head\E (.+?) \Q$tail\E \z }{$1}xmsr; }

What concerns the SCRIPT_NAME line added as well, however, it still does not work.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1091354]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2024-04-25 05:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found