mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-03-24 10:21:46 -04:00
add the time formater to webdav
This commit is contained in:
@@ -5,4 +5,7 @@ type contextKey int
|
||||
const (
|
||||
ContextKeyID contextKey = iota
|
||||
ContextKeyPath
|
||||
|
||||
// RFC1123 time that mimics oc10. time.RFC1123 would end in "UTC", see https://github.com/golang/go/issues/13781
|
||||
RFC1123 = "Mon, 02 Jan 2006 15:04:05 GMT"
|
||||
)
|
||||
|
||||
@@ -9,6 +9,7 @@ import (
|
||||
"path"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1"
|
||||
merrors "go-micro.dev/v4/errors"
|
||||
@@ -191,7 +192,7 @@ func matchToPropResponse(ctx context.Context, match *searchmsg.Match) (*propfind
|
||||
})))
|
||||
}
|
||||
propstatOK.Prop = append(propstatOK.Prop, prop.Escaped("oc:name", match.Entity.Name))
|
||||
propstatOK.Prop = append(propstatOK.Prop, prop.Escaped("d:getlastmodified", match.Entity.LastModifiedTime.AsTime().Format(net.RFC1123)))
|
||||
propstatOK.Prop = append(propstatOK.Prop, prop.Escaped("d:getlastmodified", match.Entity.LastModifiedTime.AsTime().Format(time.RFC1123)))
|
||||
propstatOK.Prop = append(propstatOK.Prop, prop.Escaped("d:getcontenttype", match.Entity.MimeType))
|
||||
propstatOK.Prop = append(propstatOK.Prop, prop.Escaped("oc:permissions", match.Entity.Permissions))
|
||||
propstatOK.Prop = append(propstatOK.Prop, prop.Escaped("oc:highlights", match.Entity.Highlights))
|
||||
|
||||
Reference in New Issue
Block a user