Skip to content

net/http: connection never closes #1967

Closed
@gopherbot

Description

@gopherbot

by probablyadam:

What steps will reproduce the problem?
1. Create http.Request with Close set to true.
2. Download file.
3. Close http.Response.Body before reaching EOF.

What is the expected output?

Connection closes with http.Response.Body.Close().

What do you see instead?

Connection remains open.

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

8g

Which operating system are you using?

linux 386

Which revision are you using?  (hg identify)

001f5f776015

Please provide any additional information below.

Run the attached code and use netstat to verify that the connection remains open.

Attachments:

  1. x.go (1795 bytes)

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