|
From: Balazs Ree <ree@...>
Subject: Re: How is the KSS context determined? Newsgroups: gmane.comp.web.kss.devel Date: 2007-10-28 08:10:31 GMT (1 year, 5 weeks, 1 day, 17 hours and 6 minutes ago) On Sat, 27 Oct 2007 22:39:29 +0100, Martin Aspeli wrote: > Martin Aspeli wrote: >> How is the KSS context determined? That is, what is the base URL used >> when submitting a server-side request? > > *bump* - I'm happy to debug what goes on inside the namespace traversal > adapters, but I need to know where to start looking. How does KSS know > which base URL to submit to for an action-server? The base url is decided in the file kukit.js, in the function kukit.Engine.prototype.calculateBase . It is pretty complicated, and I actually have no remembering of neither a description of the supported use cases nor a written discussion about it. As I read from the code it tries to fetch the base in the following order: 1. if there is a link with rel="kss-base-url", it is using the href of that as base. This allows a manual override from the template. I cannot tell you why/when this is needed or used, since point 2. is meant to do exactly the same. 2. if there is a "base" tag in the html, it is using its href. In addition it strips the trailing "/" from it, if there is one. This is what happens normally, I believe also in your case. 3. If this is not present it uses window.location from javascript. I hope this helps something, please contact me when you want about this issue, I'd try to look at it deeper as well. We may need to improve this algorithm to cover the case you are using. Best wishes -- Balazs Ree |
|
|