Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Plack::Hanlder::FCGI Bug?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Josef Chladek  
View profile  
 More options Oct 25 2011, 9:25 am
From: Josef Chladek <josef.chla...@gmail.com>
Date: Tue, 25 Oct 2011 06:25:23 -0700 (PDT)
Local: Tues, Oct 25 2011 9:25 am
Subject: Plack::Hanlder::FCGI Bug?
Hi,

we run the latest of Catalyst (5.90005), have our app mounted under /
myapp attached to apache2 via fastcgi. The problem just occurred after
upgrading from the non-plack-catalyst (5.80027).

the problem now is, that rewrite rules (PassThrough) for apache result
in bad paths in catalyst. for example:

/foo has the rewrite rule in apache to /myapp/somecontroller/method

gets correctly rewritten in apache but gets transformed to /foo in
Plack/Handler/FCGI.pm. The reason for this are the lines around
linenumber 110:

# lighttpd munges multiple slashes in PATH_INFO into one. Try
recovering it
my $uri = URI->new("http://localhost" .  $env->{REQUEST_URI});
$env->{PATH_INFO} = uri_unescape($uri->path);
$env->{PATH_INFO} =~ s/^\Q$env->{SCRIPT_NAME}\E//;

If I comment this block out, the correct PATH_INFO somecontroller/
method is called.
An if around this block
 if ($env->{SERVER_SOFTWARE} && $env->{SERVER_SOFTWARE} =~ m!
lighttpd!)
would be the solution, I guess

thanks
josef


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tatsuhiko Miyagawa  
View profile  
 More options Oct 25 2011, 5:44 pm
From: Tatsuhiko Miyagawa <miyag...@gmail.com>
Date: Tue, 25 Oct 2011 14:44:36 -0700
Local: Tues, Oct 25 2011 5:44 pm
Subject: Re: Plack::Hanlder::FCGI Bug?
Hi,

there's a related ticket on Apache2 handler as well:
https://github.com/miyagawa/Plack/issues/254

This is related to the whole "trust PATH_INFO from web server or
resurrect from REQUEST_URI" issue. In Plack, we try to resurrect the
correct PATH_INFO based on REQUEST_URI because most web servers
squeezes multiple slashes (//) into one slash.

In Catalyst, there's a config flag use_request_uri_for_path, which is
false by default, but if it's on, use the raw (undecoded) REQUEST_URI
for path, which is not exactly the same as what Plack does.

We will revert the PATH_INFO resurrection in Plack by default, and
include the middleware to do so - Catalyst can in turn resurrect the
PATH_INFO using undecoded REQUEST_URI in its
apply_default_middlewares.

--
Tatsuhiko Miyagawa

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »