mirror of
https://github.com/distribution/distribution.git
synced 2025-09-15 22:59:24 +00:00
use http consts for request methods
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -22,7 +22,7 @@ import (
|
||||
func TestHTTPSink(t *testing.T) {
|
||||
serverHandler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
defer r.Body.Close()
|
||||
if r.Method != "POST" {
|
||||
if r.Method != http.MethodPost {
|
||||
w.WriteHeader(http.StatusMethodNotAllowed)
|
||||
t.Fatalf("unexpected request method: %v", r.Method)
|
||||
return
|
||||
|
Reference in New Issue
Block a user