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

Collapse
Posted by Ryan Gallimore on
I see your point, Torben. But not all POSTs are made to the same directory. See my permissions example above.

The problem, as Eduardo pointed out, lies with when to set ad_conn url, and the hack for mapped subsites that is already in place in rp_filter.

# 2. handle special case: if the root is a prefix of the URL,
# remove this prefix from the URL, and redirect.

Collapse
Posted by Torben Brosten on
Ryan,

Perhaps you missed the second point in that post.

It begins with: "For apps that require processing between a hostnode-mapped domain and the main-domain"..

Also, see my previous post to Eduardo regarding building return_url in ad_get_login_url.

You should be able to build a proc that returns the absolute reference you need, without messing with the request processor or redirecting.

Are you trying to hide a form processing url from the web? If so, put the form processing in an index.vuh page. No redirect required.

Collapse
Posted by Eduardo Santos on
Hi Torben,

Thanks for the reply. I understand your suggestion and I've implemented it sometimes. However, it's an workaround and it doesn't solve the real problem.

The case is: you should point an URL to /subsite/page and it should just work on host node maped subsite. Try to map all the places in the system where this call appears is very difficult, and it can always lead to some fail.

Take a look at this link: http://fisheye.openacs.org/browse/OpenACS/openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl?r=1.105#to542

Somebody knew about this problem and fixed it for GET requests, but it stays for POST requests.

As you can see, ad_conn -set comes a little bit later: http://fisheye.openacs.org/browse/OpenACS/openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl?r=1.105#to631

I've tried a lot of different patches without success. What I've been doing until know is try to fix the symptom, not the disease. I would like very much to see a real fix for this problem, but I couldn't find any yet.