MCPcopy Create free account
hub / github.com/asim/git-http-backend / renderMethodNotAllowed

Function renderMethodNotAllowed

server/server.go:384–392  ·  view source on GitHub ↗

HTTP error response handling functions

(w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

382// HTTP error response handling functions
383
384func renderMethodNotAllowed(w http.ResponseWriter, r *http.Request) {
385 if r.Proto == "HTTP/1.1" {
386 w.WriteHeader(http.StatusMethodNotAllowed)
387 w.Write([]byte("Method Not Allowed"))
388 } else {
389 w.WriteHeader(http.StatusBadRequest)
390 w.Write([]byte("Bad Request"))
391 }
392}
393
394func renderNotFound(w http.ResponseWriter) {
395 w.WriteHeader(http.StatusNotFound)

Callers 1

HandlerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…