Skip to content
代码片段 群组 项目
提交 20f87b49 编辑于 作者: Jacob Vosmaer's avatar Jacob Vosmaer
浏览文件

Document serving files with %2F

上级 ae0dc143
No related branches found
No related tags found
无相关合并请求
...@@ -16,6 +16,9 @@ const ( ...@@ -16,6 +16,9 @@ const (
CacheExpireMax CacheExpireMax
) )
// BUG/QUIRK: If a client requests 'foo%2Fbar' and 'foo/bar' exists,
// handleServeFile will serve foo/bar instead of passing the request
// upstream.
func handleServeFile(documentRoot *string, cache CacheMode, notFoundHandler serviceHandleFunc) serviceHandleFunc { func handleServeFile(documentRoot *string, cache CacheMode, notFoundHandler serviceHandleFunc) serviceHandleFunc {
return func(w http.ResponseWriter, r *gitRequest) { return func(w http.ResponseWriter, r *gitRequest) {
file := filepath.Join(*documentRoot, r.relativeURIPath) file := filepath.Join(*documentRoot, r.relativeURIPath)
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册