Closed kbaribeau closed 10 years ago
Hey,
So this used to be pull request #59, but somehow that says it was merged, but it never was.
So here's a new pull request :)
When changing the path of a request, be sure to change :path-info as well as :uri.
Ring actually looks at :path-info first. See https://github.com/ring-clojure/ring/blob/1.2/ring-core/src/ring/middleware/file.clj#L21 and https://github.com/ring-clojure/ring/blob/1.2/ring-core/src/ring/util/request.clj#L32-L36
So, when we're running on a server that supplies :path-info, we have to be sure it is correct, or else we'll end up either 404'ing (bad) or serving the unaltered content (possibly worse).
Hey,
So this used to be pull request #59, but somehow that says it was merged, but it never was.
So here's a new pull request :)
When changing the path of a request, be sure to change :path-info as well as :uri.
Ring actually looks at :path-info first. See https://github.com/ring-clojure/ring/blob/1.2/ring-core/src/ring/middleware/file.clj#L21 and https://github.com/ring-clojure/ring/blob/1.2/ring-core/src/ring/util/request.clj#L32-L36
So, when we're running on a server that supplies :path-info, we have to be sure it is correct, or else we'll end up either 404'ing (bad) or serving the unaltered content (possibly worse).