Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

ignore HEAD requests

  • Loading branch information...
commit bf30085df9c315a21bf1e458aa694a3a6cb751d5 1 parent a7b6796
@bradfitz authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 battd/battd.go
View
6 battd/battd.go
@@ -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(),
})
Please sign in to comment.
Something went wrong with that request. Please try again.