Finish the basic feature of Propfind.
This commit is contained in:
@ -140,16 +140,13 @@ func (this *DavService) Propstats(matter *Matter, propfind dav.Propfind) []dav.P
|
||||
}
|
||||
|
||||
//处理 方法
|
||||
func (this *DavService) HandlePropfind(writer http.ResponseWriter, request *http.Request, subPath string) {
|
||||
func (this *DavService) HandlePropfind(writer http.ResponseWriter, request *http.Request, user *User, subPath string) {
|
||||
|
||||
fmt.Printf("列出文件/文件夹 %s\n", subPath)
|
||||
|
||||
//获取请求的层数。暂不支持 infinity
|
||||
depth := this.ParseDepth(request)
|
||||
|
||||
//获取请求者
|
||||
user := this.checkUser(writer, request)
|
||||
|
||||
//读取请求参数。按照用户的参数请求返回内容。
|
||||
propfind, _, err := dav.ReadPropfind(request.Body)
|
||||
this.PanicError(err)
|
||||
@ -163,7 +160,6 @@ func (this *DavService) HandlePropfind(writer http.ResponseWriter, request *http
|
||||
matter = this.matterDao.checkByUserUuidAndPath(user.Uuid, subPath)
|
||||
}
|
||||
|
||||
|
||||
var matters []*Matter
|
||||
if depth == 0 {
|
||||
matters = []*Matter{matter}
|
||||
|
Reference in New Issue
Block a user