[cgiapp] Redirect Question

2009-06-02 Thread Stephen Carville
I've written a simple wireless gateway app using CGI:Application. It works well and is in limited use internally. One thing stil vexes me. The login page POSTs to a new URL for authorization check. Depending on the results, The authcheck routine then redirects to the splash page or an error

Re: [cgiapp] Redirect Question

2009-06-02 Thread Michael Peters
Stephen Carville wrote: The login page POSTs to a new URL for authorization check. Depending on the results, The authcheck routine then redirects to the splash page or an error page. This keeps the history clean but seems to require I append the ?rm=runmode to the redirect URL. You could

Re: [cgiapp] Redirect Question

2009-06-02 Thread Stephen Carville
On Tue, Jun 2, 2009 at 1:49 PM, Michael Peters mpet...@plusthree.com wrote: You could just not do a redirect (which uses HTTP and makes the browser go fetch another URL). You could instead just return the run mode you want. Something like this:    return $ok ? $self-splash : $self-error;

Re: [cgiapp] Redirect question

2005-01-07 Thread Michael Graham
I am using CGI::App in a mod_perl environment. I typically have run_modes submit back to themselves for validation, etc. If the form information passes, I return $self-next_run_mode (just an example). I have made a couple of changes to my previous coding style. First, I am using path_info

Re: [cgiapp] Redirect question

2005-01-07 Thread Sean Davis
On Jan 7, 2005, at 12:59 PM, Michael Graham wrote: I am using CGI::App in a mod_perl environment. I typically have run_modes submit back to themselves for validation, etc. If the form information passes, I return $self-next_run_mode (just an example). I have made a couple of changes to my

Re: [cgiapp] Redirect question

2005-01-07 Thread Sean Davis
For an example, I wrote a quick database for gene expression profiles. We have a quirky access for it (you apply to via email submission rather than automatic), but it is available. As you can see from the URL, it is not mod_perl based and has somewhat limited functionality compared to what

Re: [cgiapp] redirect() question...

2003-02-03 Thread Brett Sanger
return $cgi_query-redirect(login.pl); I forget if it is browser or server dependent (browser, I suspect), but try sending a fully qualified URL (e.g. http://www.myserver.com/path/login.pl) -- SwiftOne [EMAIL PROTECTED] - Web

Re: [cgiapp] redirect() question...

2003-02-03 Thread John Lawton
I see two potential problems in your code. 1. Do not use the redirect method of the CGI.pm object from withing CGI::App to do a redirect. Use something similar to the code below. $self-header_type( redirect ); $self-header_props( -uri = $redirect_url ); 2. Be sure to indicate at least the