Skip to content

Writing to http.ResponseWriter closes request.Body #4637

@cskr

Description

@cskr
http://play.golang.org/p/oUJ95CP-Gv

What is the expected output?

Request body must be copied to  response.

What do you see instead?

io.Copy() fails with "http: invalid Read on closed Body".

Which operating system are you using?

Ubuntu 12.10

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

go version devel +1399878c6731 Tue Jan 08 15:03:30 2013 -0800 linux/amd64

Reading complete request body into a buffer before beginning to write works. Copying to
os.Stdout works too.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions