Forum OpenACS Q&A: Response to host / site-node map

Collapse
Posted by Ben Adida on
the bugs are small and hard to detect:

1) say your host site node map maps foo.acme.com to /foo. It turns out that when you send the /foo/rest_of_url request to foo.acme.com, it is "smart" enough to notice that you goofed, and actually that you want /rest_of_url, since you're already within /foo given your hostname. My impression is that this is a quick-fix hack to an incomplete host site-node map implementation. I have not "fixed" this given that if everything else works correctly, this matters little and I'm not interested in breaking anyone's code.

2) say you request /bar and actually bar is a directory. The request process redirects you to /bar/ automatically. BUT, if you're on foo.acme.com with host site node mapping as above, it will actually redirect you to /foo/bar/, which will then get redirected to /bar/ by hack 1) above. So you don't notice the issue, but you actually just went through 2 redirects for no reasons.

3) same thing happens for internal redirection of directory index files. It will prepend the whole path without considering the host site node map, and then quick hack 1) will fix this issue.

My fixes involve making 2) and 3) host site node map aware. But I'm not all that happy about this. Basically, host site node map needs a total rewrite where the entire ad_conn structure takes into account all host site node map issues.