Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions services/webdav/pkg/service/v0/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ var (
}
)

// register the REPORT method at init so it cannot race with concurrent route setup in other services.
func init() {
chi.RegisterMethod("REPORT")
}

// Service defines the extension handlers.
type Service interface {
ServeHTTP(w http.ResponseWriter, r *http.Request)
Expand Down Expand Up @@ -93,9 +98,6 @@ func NewService(opts ...Option) (Service, error) {
svc.thumbnailsClient = nil
}

// register method with chi before any routing is set up
chi.RegisterMethod("REPORT")

m.Route(options.Config.HTTP.Root, func(r chi.Router) {

if !svc.config.DisablePreviews {
Expand Down