webdav

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2025 License: Apache-2.0 Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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