Refine the comment for the dav.
This commit is contained in:
parent
27d6234409
commit
5e01dd1639
@ -417,34 +417,7 @@ func (this *DavService) HandleMove(writer http.ResponseWriter, request *http.Req
|
|||||||
|
|
||||||
//复制文件/文件夹
|
//复制文件/文件夹
|
||||||
func (this *DavService) HandleCopy(w http.ResponseWriter, r *http.Request, user *User, subPath string) {
|
func (this *DavService) HandleCopy(w http.ResponseWriter, r *http.Request, user *User, subPath string) {
|
||||||
|
this.PanicBadRequest("暂不支持COPY方法")
|
||||||
fmt.Printf("COPY %s\n", subPath)
|
|
||||||
|
|
||||||
//解析出目标路径。
|
|
||||||
destinationUrl := r.Header.Get("Destination")
|
|
||||||
if destinationUrl == "" {
|
|
||||||
this.PanicBadRequest("Header Destination必填")
|
|
||||||
}
|
|
||||||
u, err := url.Parse(destinationUrl)
|
|
||||||
this.PanicError(err)
|
|
||||||
|
|
||||||
if u.Host != r.Host {
|
|
||||||
this.PanicBadRequest("Destination Host不一致")
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
//destinationPath := u.Path
|
|
||||||
//
|
|
||||||
//
|
|
||||||
////寻找符合条件的matter.
|
|
||||||
//var matter *Matter
|
|
||||||
////如果是空或者/就是请求根目录
|
|
||||||
//if subPath == "" || subPath == "/" {
|
|
||||||
// matter = NewRootMatter(user)
|
|
||||||
//} else {
|
|
||||||
// matter = this.matterDao.checkByUserUuidAndPath(user.Uuid, subPath)
|
|
||||||
//}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//处理所有的请求
|
//处理所有的请求
|
||||||
@ -473,6 +446,7 @@ func (this *DavService) HandleDav(writer http.ResponseWriter, request *http.Requ
|
|||||||
|
|
||||||
} else if method == "MKCOL" {
|
} else if method == "MKCOL" {
|
||||||
|
|
||||||
|
//创建文件夹
|
||||||
this.HandleMkcol(writer, request, user, subPath)
|
this.HandleMkcol(writer, request, user, subPath)
|
||||||
|
|
||||||
} else if method == "COPY" {
|
} else if method == "COPY" {
|
||||||
|
Loading…
Reference in New Issue
Block a user