webdav

package
v2.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SabredavBadRequest maps to HTTP 400
	SabredavBadRequest code = iota
	// SabredavMethodNotAllowed maps to HTTP 405
	SabredavMethodNotAllowed
	// SabredavNotAuthenticated maps to HTTP 401
	SabredavNotAuthenticated
	// SabredavPreconditionFailed maps to HTTP 412
	SabredavPreconditionFailed
	// SabredavPermissionDenied maps to HTTP 403
	SabredavPermissionDenied
	// SabredavNotFound maps to HTTP 404
	SabredavNotFound
	// SabredavConflict maps to HTTP 409
	SabredavConflict
)

Variables

This section is empty.

Functions

func HandleWebdavError

func HandleWebdavError(w http.ResponseWriter, b []byte, err error)

func IsWebdavRequest

func IsWebdavRequest(r *http.Request) bool

This is a non exhaustive way to detect if a request is directed to a webdav server. This naïve implementation only deals with the set of methods exclusive to WebDAV. Since WebDAV is a superset of HTTP, GET, POST and so on are valid methods, but this implementation would require a larger effort than we can build upon in this file. This is needed because the proxy might need to create a response with a webdav body; such as unauthorized.

func Marshal

func Marshal(e Exception) ([]byte, error)

Marshal just calls the xml marshaller for a given Exception.

Types

type Exception

type Exception struct {
	Code    code
	Message string
	Header  string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL