cleanup
This commit is contained in:
@@ -5,8 +5,7 @@ func Directory(path string) Response {
|
||||
Href: customPathEscape(path),
|
||||
Propstat: PropStat{
|
||||
Prop: Prop{
|
||||
ResourceType: ResourceType{Collection: &struct{}{}},
|
||||
ContentType: "httpd/unix-directory",
|
||||
ResourceType: ResourceType{Value: "<d:collection/>"},
|
||||
},
|
||||
Status: "HTTP/1.1 200 OK",
|
||||
},
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package dav
|
||||
|
||||
import "encoding/xml"
|
||||
import (
|
||||
"encoding/xml"
|
||||
)
|
||||
|
||||
type MultiStatus struct {
|
||||
XMLName xml.Name `xml:"d:multistatus"`
|
||||
@@ -19,13 +21,12 @@ type PropStat struct {
|
||||
}
|
||||
|
||||
type Prop struct {
|
||||
ResourceType ResourceType `xml:"d:resourcetype,omitempty"`
|
||||
ResourceType ResourceType `xml:"d:resourcetype"`
|
||||
ContentLength int64 `xml:"d:getcontentlength,omitempty"`
|
||||
CreationDate string `xml:"d:creationdate,omitempty"`
|
||||
LastModified string `xml:"d:getlastmodified,omitempty"`
|
||||
ContentType string `xml:"d:getcontenttype,omitempty"`
|
||||
}
|
||||
|
||||
type ResourceType struct {
|
||||
Collection *struct{} `xml:"d:collection,omitempty"`
|
||||
Value string `xml:",innerxml"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user