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

Collapse
Posted by Dave Bauer on
I don't believe you can send a file in a GET query variable.

Why are you doing a redirect in this case?

Is someone going to http://domain.com/subsite when you want them to go to http://subsite.com ?

Collapse
Posted by Ryan Gallimore on
You can't send a file but according to the ns_getform code, when called, it copies all files to temp locations and adds the path, mime type and size to the ns_set. So by mapping the ns_getform to GET variables, this should work for files too. I have confirmed that it works for other POST vars.

RP is doing the redirect in rp_filter - for the case you mention. In survey is there is confirmation template that uses ad_conn url to retrieve the return_url. I want to preserve that core code so as to avoid forking acs-templating.

See survey/www/admin/survey-create.tcl

Collapse
Posted by Ryan Gallimore on
The confirmation template is at packages/acs-templating/resources/forms/confirm-button.*

It calls ad_conn url which returns /subsite/page even if we are operating from a mapped subsite. So the RP redirects to /page losing the POST vars when we come from a form.

Collapse
Posted by Gustaf Neumann on
Note that there are implementation limits on the maximum size of URIs in various user agents, depending on their versions. Ignoring these limits can lead to crashes, hanging requests and truncated URLs. Therefore mapping arbitrary POST requests into GET requests with query variables is not a good idea if you want to support an open set of user agents, especially, when large files might be involved.

http://classicasp.aspfaq.com/forms/what-is-the-limit-on-querystring/get/url-parameters.html
http://www.boutell.com/newfaq/misc/urllength.html

Collapse
Posted by Ryan Gallimore on
Thanks Gustaf, I'd forgotten about that. Can you suggest an alternate method of handling this case? It seems a shortcoming that the redirect only supports GET requests.
Collapse
Posted by Gustaf Neumann on
have you looked at rp_internal_redirect?