mirror of
https://github.com/1f349/go-webdav.git
synced 2024-12-22 08:14:15 +00:00
caldav: return proper HTTP 501 instead of panicing
It seems like e.g. Apples reminders likes to send `PropPatch`, and currently this just fills up my logs because of the panic. I thought it would be better to signal that this isn't supported yet, which should hopefully make it easier to dig through the logs.
This commit is contained in:
parent
fbcd08d64a
commit
12d8b4bf62
@ -661,7 +661,7 @@ func (b *backend) propFindAllCalendarObjects(ctx context.Context, propfind *inte
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (b *backend) PropPatch(r *http.Request, update *internal.PropertyUpdate) (*internal.Response, error) {
|
func (b *backend) PropPatch(r *http.Request, update *internal.PropertyUpdate) (*internal.Response, error) {
|
||||||
panic("TODO")
|
return nil, internal.HTTPErrorf(http.StatusNotImplemented, "caldav: PropPatch not implemented")
|
||||||
}
|
}
|
||||||
|
|
||||||
func (b *backend) Put(r *http.Request) (*internal.Href, error) {
|
func (b *backend) Put(r *http.Request) (*internal.Href, error) {
|
||||||
@ -702,15 +702,15 @@ func (b *backend) Delete(r *http.Request) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (b *backend) Mkcol(r *http.Request) error {
|
func (b *backend) Mkcol(r *http.Request) error {
|
||||||
panic("TODO")
|
return internal.HTTPErrorf(http.StatusNotImplemented, "caldav: Mkcol not implemented")
|
||||||
}
|
}
|
||||||
|
|
||||||
func (b *backend) Copy(r *http.Request, dest *internal.Href, recursive, overwrite bool) (created bool, err error) {
|
func (b *backend) Copy(r *http.Request, dest *internal.Href, recursive, overwrite bool) (created bool, err error) {
|
||||||
panic("TODO")
|
return false, internal.HTTPErrorf(http.StatusNotImplemented, "caldav: Copy not implemented")
|
||||||
}
|
}
|
||||||
|
|
||||||
func (b *backend) Move(r *http.Request, dest *internal.Href, overwrite bool) (created bool, err error) {
|
func (b *backend) Move(r *http.Request, dest *internal.Href, overwrite bool) (created bool, err error) {
|
||||||
panic("TODO")
|
return false, internal.HTTPErrorf(http.StatusNotImplemented, "caldav: Move not implemented")
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://datatracker.ietf.org/doc/html/rfc4791#section-5.3.2.1
|
// https://datatracker.ietf.org/doc/html/rfc4791#section-5.3.2.1
|
||||||
|
Loading…
Reference in New Issue
Block a user