Skip to content

Commit cc9afa5

Browse files
committed
net/http: use method constant in check
1 parent 3556617 commit cc9afa5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/net/http/fs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ func serveContent(w ResponseWriter, r *Request, name string, modtime time.Time,
374374
}
375375
w.WriteHeader(code)
376376

377-
if r.Method != "HEAD" {
377+
if r.Method != MethodHead {
378378
if sendSize == size {
379379
// use Copy in the non-range case to make use of WriterTo if available
380380
io.Copy(w, sendContent)

0 commit comments

Comments
 (0)