Skip to content

net/http: Response.Write does not write Content-Length when 0 #5381

Closed
@titanous

Description

@titanous
What steps will reproduce the problem?

http://play.golang.org/p/XsUnTxPk6n

What is the expected output?

"HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n"

What do you see instead?

"HTTP/1.1 200 OK\r\n\r\n"

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

6g

Which operating system are you using?

OS X 10.8.2

Which version are you using?  (run 'go version')

go version devel +cdedb129e020 Tue Apr 30 14:01:05 2013 -0700 darwin/amd64

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeSuggestedIssues that may be good for new contributors looking for work to do.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions