[Catalyst] $c->req->base doesn't actually return base
vti
mbit at ukr.net
Wed Jan 24 13:28:04 GMT 2007
Matt S Trout(dbix-class at trout.me.uk)@Wed, Jan 24, 2007 at 01:00:48PM +0000:
>
> On 24 Jan 2007, at 12:38, vti wrote:
>
> >Matt S Trout(dbix-class at trout.me.uk)@Wed, Jan 24, 2007 at
> >12:05:11PM +0000:
> >>
> >>On 24 Jan 2007, at 09:04, vti wrote:
> >>
> >>>Hello
> >>>
> >>>I wish you could help me.
> >>>
> >>>When I switched from mod_perl engine to CGI engine (due to some
> >>>circumstanses) $c->req->base stopped returning actually base url.
> >>>Instead it is same as $c->req->uri.
> >>
> >>(1) Switch to FastCGI if you possibly can, Catalyst isn't optimised
> >>for CGI performance
> >
> >Well, I understand that :) I have no choice in the current
> >application.
>
> I doubt that, and since you won't explain why I can only assume
> you're wrong.
I am limited to the hosting that doesn't support neigher mod_perl nor fastcgi.
> >Others are working under mod_perl and are feeling alright.
> >
> >>>Have any suggestions about that? Or am I missing something?
> >>
> >>(2) Not without some more information, like the webserver and app
> >>config etc. and logs. A full dump of %ENV from within the app would
> >>probably help as well.
> >
> >Webserver is apache2.
> >
>
> (1) you should be using the pickup_cgi.pl Catalyst generated, not
> your own
> (2) You still haven't provided %ENV
(1) I've change to that script.
(2) Here is %ENV
ENV => {
CATALYST_ENGINE => "CGI",
DOCUMENT_ROOT => "/var/www/pickup/htdocs",
GATEWAY_INTERFACE => "CGI/1.1",
HTTP_ACCEPT => "text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5",
HTTP_ACCEPT_CHARSET => "windows-1251,utf-8;q=0.7,*;q=0.7",
HTTP_ACCEPT_ENCODING => "gzip,deflate",
HTTP_ACCEPT_LANGUAGE => "ru-ru,ru;q=0.8,en-us;q=0.5,en;q=0.3",
HTTP_CACHE_CONTROL => "max-age=0",
HTTP_CONNECTION => "keep-alive",
HTTP_HOST => "pick-up.com.ua",
HTTP_KEEP_ALIVE => 300,
HTTP_USER_AGENT => "Mozilla/5.0 (X11; U; Linux i686; ru; rv:1.8.1.1) Gecko/20070102 BonEcho/2.0.0.1",
PATH => "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/4.1.1:/usr/qt/3/bin",
QUERY_STRING => "dump_info=1",
"REDIRECT_QUERY_STRING" => "dump_info=1",
REDIRECT_STATUS => 200,
REDIRECT_URL => "/ru/pages/view/bio",
REMOTE_ADDR => "127.0.0.1",
REMOTE_PORT => 40_877,
REQUEST_METHOD => "GET",
REQUEST_URI => "/ru/pages/view/bio?dump_info=1",
SCRIPT_FILENAME => "/var/www/pickup/cgi-bin/pickup.pl",
SCRIPT_NAME => "/cgi-bin/pickup.pl",
SERVER_ADDR => "127.0.0.1",
SERVER_ADMIN => "hostmaster\@localhost",
SERVER_NAME => "pick-up.com.ua",
SERVER_PORT => 80,
SERVER_PROTOCOL => "HTTP/1.1",
SERVER_SIGNATURE => "<address>Apache Server at pick-up.com.ua Port 80</address>\n",
SERVER_SOFTWARE => "Apache",
}
Thanks for your patience.
--
vti -- Viacheslav Tikhanovskii
More information about the Catalyst
mailing list