Opened 15 years ago
Closed 14 years ago
#625 closed defect (wontfix)
dojo.uri.Uri not playing well with djConfig.baseRelativePath
Reported by: | Owned by: | jkuhnert | |
---|---|---|---|
Priority: | high | Milestone: | 0.9 |
Component: | Core | Version: | 0.2 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
The supplied patch fixes a problem which may only affect tapestry, but is rather large in impact if someone else is relying on this behaviour. I've tested the basic test_*.html files, but the one uri.js test source is of course broken as this patch changes the way paths are interpreted.
Problem:My uses require setting a djConfig.baseRelativePath string so that dojo can correctly resolve paths. For example, one case of this path might be baseRelativePath:"javascript/dojo". That's all fine and well, but when you have a more complicated path (such as the case with tapestry), the baseRelativePath may look something more like baseRelativePath:"http://host/app?query=valueetclkjsfal". In this instance I need the entire baseRelativePath given to be used to resolve all resources.
The problem is that the dojo.uri.Uri() initializer constructs a new Uri object out of the base path and then only picks off the path parts that create the basic "scheme:authority//host/a/b/" portions, leaving all query strings and such stripped off. So, the resulting baseRelativePath doesn't end up actually being what you specified, it instead turns into the shorter form.
Solution: The soltion used was to more or less cut out a lot of code in the initializer. It doesn't try and re-construct the url using portions of the original baseRelativePath and incoming relative path strings anymore. (at least not in the core it was happening in).
I can't think of a use case where this would break someones functionality, unless they wanted to be able to pass in a URL string to baseRelativePath and have it auto-cleaned for them.
The other possible solution might be to replace dojo.uri.dojoUri with a new implementation that doesn't destrory baseRelativePath, but leaves the existing functionality in the Uri initializer in order to not risk breaking something for somebody. (though it's very hard to tell who might be using it this way as it seems fairly counter-intuitive to me)
This is a complete blocker for me adding dojo into tapestry. I could patch Uri.js but I'm sort of against doing weird local patches of libraries.
Attachments (1)
Change History (6)
Changed 15 years ago by
Attachment: | dojo-uri-patch.txt added |
---|
comment:1 Changed 15 years ago by
Milestone: | 0.3.1 → 0.4 |
---|
comment:2 Changed 15 years ago by
Owner: | changed from anonymous to jkuhnert |
---|
comment:3 Changed 15 years ago by
Milestone: | 0.4 → 0.5 |
---|---|
Status: | new → assigned |
comment:4 Changed 14 years ago by
Jesse, this has been idle for 11 months. Is it still valid? What's the plan?
comment:5 Changed 14 years ago by
Resolution: | → wontfix |
---|---|
Status: | assigned → closed |
Ugh...There are still problems actually - but I have no idea if they exist in 0.9 or not. I guess we could close it out for now and if I hit it whenever I do dojo 0.9 then I'll re-address it then.
The referenced patch