Permalink
Browse files

ignore HEAD requests

  • Loading branch information...
bradfitz committed Apr 24, 2012
1 parent a7b6796 commit bf30085df9c315a21bf1e458aa694a3a6cb751d5
Showing with 5 additions and 1 deletion.
  1. +5 −1 battd/battd.go
View
@@ -2,8 +2,8 @@ package main
import (
"bytes"
- "crypto/rand"
"crypto/hmac"
+ "crypto/rand"
"crypto/sha1"
"errors"
"flag"
@@ -97,6 +97,10 @@ type homeTemplateData struct {
}
func home(w http.ResponseWriter, r *http.Request) {
+ if r.Method == "HEAD" {
+ w.Header().Set("Content-Type", "text/html; charset=utf-8")
+ return
+ }
err := homeTemplate.Execute(w, homeTemplateData{
Platforms: platforms(),
})

0 comments on commit bf30085

Please sign in to comment.