mirror of https://github.com/golang/go.git
net/http: use method constant in check
This commit is contained in:
parent
d08c9a075c
commit
94fc031814
|
|
@ -333,7 +333,7 @@ func serveContent(w ResponseWriter, r *Request, name string, modtime time.Time,
|
|||
|
||||
w.WriteHeader(code)
|
||||
|
||||
if r.Method != "HEAD" {
|
||||
if r.Method != MethodHead {
|
||||
if sendSize == size {
|
||||
// use Copy in the non-range case to make use of WriterTo if available
|
||||
io.Copy(w, sendContent)
|
||||
|
|
|
|||
Loading…
Reference in New Issue