Skip to content

net/http: Request Body error should not be ignored #7521

Closed
@bancek

Description

@bancek
What does 'go version' print?
go version go1.2.1 linux/amd64

What steps reproduce the problem?
If possible, include a link to a program on play.golang.org.

1. Do a HTTP POST request for body with error and no content

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

What happened?
Body error is ignored if body has no content (error happends on first Read call)

What should have happened instead?
Request should be aborted.

Please provide any additional information below.
Error is ignored when reading first byte.
https://code.google.com/p/go/source/browse/src/pkg/net/http/transfer.go#56

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions