[dancer-users] dancer-users Digest, Vol 59, Issue 6

Andreas Renner an48 at gmx.de
Fri Jan 9 01:38:07 GMT 2015


Hi,

I do not know if I was able to really cover your problem.

> I have a page that responds to a POST request:
> 
> post '/checkout' => sub { ... };

> a normal user
> goes through
> /flypage => /cart => /checkout
> 
> an Admin user would go through
> 
> get /order/new => post /order/new => /checkout
> 
> I got this working with a "forward" operation at the end of my interstitial
> page,
> 
> forward '/checkout', { ... several parameters here ... };
> 

> but the only drawback here is that the
> admin user ends up looking at a URL that is not "/checkout", even though the
> page contents are what they would see at "/checkout".

So you have done some session management. As you have not told anyone what you 
have done there, it's hard to follow your intentions.

> I can get the URL right if I replace "forward" with "redirect":
> 
> redirect uri_for '/checkout', { ... several parameters here ... }
> 
> which leaves the browser at
> 
> .../checkout?foo=...&bar=...&blah=...
> 
> Ugly. I just want to end up on "/checkout", with my parameters hidden away.
> Is there any hope?

So maybe there is some 'work around' in your server configuration leading you 
to wrong interpretations. You've not told anyone what server you are using. 
'forward' is a internal forwarding to another route while 'redirect' generates 
a new http-request wich is following rules defined in the server configuration 
or an .htaccess.

Hope is always there.


> -- 
> Jeff Boes <><
> jeff at endpoint.com
> 269-408-0811



More information about the dancer-users mailing list