[cgiapp] CAP::Authentication

fREW Schmidt frioux at gmail.com
Tue Mar 17 10:29:44 EDT 2009


On Mon, Mar 16, 2009 at 1:11 PM, Terrence Brannon <
tbrannon at insuranceagents.com> wrote:

> On Mon, Mar 16, 2009 at 12:14 PM, fREW Schmidt <frioux at gmail.com> wrote:
>
> >
> >
> > Clearly I am not doing anything very special,
>
>
> it looks like you are using some sort of REST url plugin. I am using
> CAP::Auth with great success but with 'ugly' query string URLs.
>

Indeed.  Sorry about that; I am using CGI::Application::Dispatch.


> > but for some reason I am
> > getting a 404 error.
>
>
> Does cgiapp throw 404 errors? I've never seen it do that. What exactly does
> your webserver log say?
>

Indeed.  And maybe this has something to do with the dispatcher...  Here's
the error:

[Tue Mar 17 09:21:58 2009] [error] [client 127.0.0.1] [Dispatch] ERROR for
request '/ACD/controller_auth/roles': RM 'roles' not found, referer:
http://localhost:8080/ACD

Yet that runmode is found if I disable CAP::Auth.


> It would be nice if there were a verbose trace option for cgiapp's
> resolution of request into runmode.
>

Agreed.   OTOH here is the output of CA::Dispatch when you turn on it's
debugging:

[Tue Mar 17 09:30:50 2009] [error] [client 127.0.0.1] [Dispatch] Trying to
match '/controller_auth/roles/' against rule '' using regex '/'\r, referer:
http://localhost:8080/ACD
[Tue Mar 17 09:30:50 2009] [error] [client 127.0.0.1] [Dispatch] Trying to
match '/controller_auth/roles/' against rule ':app/:rm?' using regex
'/([^/]*)/?([^/]*)?/'\r, referer: http://localhost:8080/ACD
[Tue Mar 17 09:30:50 2009] [error] [client 127.0.0.1] [Dispatch] Matched!\r,
referer: http://localhost:8080/ACD
[Tue Mar 17 09:30:50 2009] [error] [client 127.0.0.1] [Dispatch] Named args
from match: $VAR1 = {\r, referer: http://localhost:8080/ACD
[Tue Mar 17 09:30:50 2009] [error] [client 127.0.0.1]           'rm' =>
'roles',\r, referer: http://localhost:8080/ACD
[Tue Mar 17 09:30:50 2009] [error] [client 127.0.0.1]           'app' =>
'controller_auth'\r, referer: http://localhost:8080/ACD
[Tue Mar 17 09:30:50 2009] [error] [client 127.0.0.1]         };\r, referer:
http://localhost:8080/ACD
[Tue Mar 17 09:30:50 2009] [error] [client 127.0.0.1] \r, referer:
http://localhost:8080/ACD
[Tue Mar 17 09:30:50 2009] [error] [client 127.0.0.1] [Dispatch] loading
module ACD::Controller::Auth\r, referer: http://localhost:8080/ACD
[Tue Mar 17 09:30:50 2009] [error] [client 127.0.0.1] [Dispatch] Final args
to pass to new(): $VAR1 = {, referer: http://localhost:8080/ACD
[Tue Mar 17 09:30:50 2009] [error] [client 127.0.0.1]           'PARAMS' =>
{}, referer: http://localhost:8080/ACD
[Tue Mar 17 09:30:50 2009] [error] [client 127.0.0.1]         };, referer:
http://localhost:8080/ACD
[Tue Mar 17 09:30:50 2009] [error] [client 127.0.0.1] , referer:
http://localhost:8080/ACD
[Tue Mar 17 09:30:50 2009] [error] [client 127.0.0.1] [Dispatch] creating
instance of ACD::Controller::Auth, referer: http://localhost:8080/ACD

Again, that's as it should be...
Does anyone have any ideas?

-- 
fREW Schmidt
http://blog.afoolishmanifesto.com


More information about the cgiapp mailing list