MCPcopy
hub / github.com/perkeep/perkeep / BadRequestError

Function BadRequestError

internal/httputil/httputil.go:46–50  ·  view source on GitHub ↗
(rw http.ResponseWriter, errorMessage string, args ...interface{})

Source from the content-addressed store, hash-verified

44}
45
46func BadRequestError(rw http.ResponseWriter, errorMessage string, args ...interface{}) {
47 rw.WriteHeader(http.StatusBadRequest)
48 log.Printf("Bad request: %s", fmt.Sprintf(errorMessage, args...))
49 fmt.Fprintf(rw, "<h1>Bad Request</h1>")
50}
51
52func ForbiddenError(rw http.ResponseWriter, errorMessage string, args ...interface{}) {
53 rw.WriteHeader(http.StatusForbidden)

Callers 13

ServeHTTPMethod · 0.92
ServeHTTPMethod · 0.92
ServeCallbackMethod · 0.92
ServeCallbackMethod · 0.92
ServeCallbackMethod · 0.92
ServeHTTPMethod · 0.92
CreatePutUploadHandlerFunction · 0.92
handleMultiPartUploadFunction · 0.92
handleRemoveFunction · 0.92
handleStatFunction · 0.92
serveHTTPMethod · 0.92
unsupportedHandlerFunction · 0.92

Calls 2

PrintfMethod · 0.80
WriteHeaderMethod · 0.45

Tested by

no test coverage detected