-
Notifications
You must be signed in to change notification settings - Fork 266
wai-app-static: links in listings are broken when used in conjunction with UrlMap
#325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This bug report unfortunately doesn't surprise me. I'll look into this either today or tomorrow. |
I've pushed some commits to the 325-wip branch. There are two bugs here:
I'm not sure if I can actually release this change to UrlMap, however, since it breaks semantics. I'll need to think about it more tomorrow (running out of the house for the rest of the day now), but input would be appreciated. |
I am not sure if the UrlMap behavior is wrong. I think it depends on the usage pattern. |
I believe it is incorrect... but the reason for that is my fault. I've mentioned in various places the specification for I'm not sure if, at this point, it makes sense to codify this as required behavior. At the very least, it's worth pointing out as one original intention in the docs. Regarding UrlMap, I'm not sure if we should change it. We may need to introduce some parameter to control this behavior. But I still need to think about it a bit more. |
Would it be better named as redirectPath then? And also better to have special setter functions for it? Actually it would be best to have setters for both path fields. |
I think it's correctly named: it's the raw path submitted by the user. Setter functions would be great, but that ship has sailed (unless you're thinking of something different than abstract data types). |
well, we can create setter functions now and state that is the preferred way to operate on the fields, but you are right that we can't take away the existing ways to operate on the fields. |
Doh, I'm an idiot, I merged this to master by mistake. I'll undo the UrlMap change for now, but everything else can stay as-is I think. |
I have to confess that I cheated a bit on this issue, this actually came up in
(I'll leave this ticket open for the |
Cool thanks. I think in that case I'll update the wai docs to discuss this On Thu, Jan 15, 2015, 5:24 AM Sönke Hahn notifications@github.com wrote:
|
Great, much appreciated! |
Looks like I did put in some documentation, but it wasn't clear enough. I've expanded the comments on |
Yes, you did. And IIRC I read it and that's why Thanks for the releases! |
When using
UrlMap
to mount a fileserver (created withwai-app-static
) on a subpath,wai-app-static
does not return a redirect to add a trailing/
. This results in incorrect links in the file listing that is returned by default fromwai-app-static
.I've tried to demonstrate the issue in this failing test case: soenkehahn@5e45529.
It could be that I'm misunderstanding this. Or am I supposed to add the redirection myself around the fileserver app?
The text was updated successfully, but these errors were encountered: