Skip to content

cmd/godoc: logs noise on HEAD requests #5451

@gopherbot

Description

@gopherbot

by fuzxxl:

What steps will reproduce the problem?

$ godoc -http=:8080 &
$ telnet localhost 8080
HEAD / HTTP/1.0

What is the expected output?
$ telnet localhost 8080
HTTP/1.0 200 OK
Content-Type: text/html; charset=utf-8
Connection: close

What do you see instead?
2013/05/13 12:25:28 godocHTML.Execute: template: godoc.html:1:0: executing
"godoc.html" at <"<!DOCTYPE html>\n<h...>: http: request
method or response status code does not allow body
HTTP/1.0 200 OK
Connection: close
Date: Mon, 13 May 2013 10:25:28 GMT

Connection closed by foreign host.


Which compiler are you using (5g, 6g, 8g, gccgo)?
6g

Which operating system are you using?
$ uname -a
Linux t520 3.8.0-19-generic #30-Ubuntu SMP Wed May 1 16:35:23 UTC 2013 x86_64 x86_64
x86_64 GNU/Linux

Which version are you using?  (run 'go version')
go version devel +bea6199b09ea Tue Apr 30 17:47:39 2013 -0700 linux/amd64

Please provide any additional information below.
Apparently godoc ignores whatever request method was used by the client.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions