]> Cypherpunks repositories - gostls13.git/commitdiff
http: disable sniffer for now.
authorDavid Symonds <dsymonds@golang.org>
Thu, 21 Jul 2011 12:20:09 +0000 (22:20 +1000)
committerDavid Symonds <dsymonds@golang.org>
Thu, 21 Jul 2011 12:20:09 +0000 (22:20 +1000)
Something is broken, and investigation is underway.
In the meantime, godoc is broken, so disable sniffing for now
by reverting to the pre-sniffer state.

R=r
CC=golang-dev
https://golang.org/cl/4809046

src/pkg/http/server.go

index dd4547c25f4a136ca3ecfc01b03bd29d4f195de6..b3fb8e101c3fa61d9632d14d0367a556018a5c29 100644 (file)
@@ -255,7 +255,9 @@ func (w *response) WriteHeader(code int) {
        } else {
                // If no content type, apply sniffing algorithm to body.
                if w.header.Get("Content-Type") == "" {
-                       w.needSniff = true
+                       // NOTE(dsymonds): the sniffing mechanism in this file is currently broken.
+                       //w.needSniff = true
+                       w.header.Set("Content-Type", "text/html; charset=utf-8")
                }
        }