Forum OpenACS Development: Re: rp_handler and host-node mapped subsites

Collapse
Posted by Dave Bauer on
Ryan,

Can you explain the case you are trying to fix?

Why is the "root a prefix of the URL?" I am not sure what that means in this context.

Ie: What URL is being requested and what URL is it redirect to? Why is a redirect happening on a POST?

Collapse
Posted by Ryan Gallimore on
Hi Dave,

The case is described in the RP code above.

I have mapped a hostname called subsite1 to a subsite at /subsite1

A confirmation template in acs-templating (path above) generates a return_url from [ad_conn url] of /subsite1/page.

Based on the RP logic above, the host name matches the subsite name, so the RP attempts to replace it, redirecting the request again.

But it does this for GET requests only. For my example, I post vars to the confirmation template, and these are lost. So in this case, my page does not work at all. See /packages/survey/www/admin/survey-create.tcl for an example. In a host-node mapped subsite, this page does not create a new survey at all.

Why is a redirect happening on a POST?

That's the problem I'm trying to solve. It seems the code was only written to handle GET.

Collapse
Posted by Dave Bauer on
Fix this, it is easier!

"A confirmation template in acs-templating (path above) generates a return_url from [ad_conn url] of /subsite1/page."

Collapse
Posted by Ryan Gallimore on
We want [ad_conn url] to be used for the generic case, don't we?

And shouldn't the RP "forward" POST requests too for mapped subsites?