Skip to content
Snippets Groups Projects
Commit 606d4a38 authored by Ross Light's avatar Ross Light Committed by Russ Cox
Browse files

net/http: ensure Request.Body.Close is called once and only once

Makes *Request.write always close the body, so that callers no longer
have to close the body on returned errors, which was the trigger for
double-close behavior.

Fixes #40382

Change-Id: I128f7ec70415f240d82154cfca134b3f692191e3
Reviewed-on: https://go-review.googlesource.com/c/go/+/257819


Reviewed-by: default avatarDamien Neil <dneil@google.com>
Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
Trust: Damien Neil <dneil@google.com>
Trust: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Damien Neil <dneil@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
parent dfee3332
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment