aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/net/http/transfer.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/net/http/transfer.go')
-rw-r--r--src/pkg/net/http/transfer.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pkg/net/http/transfer.go b/src/pkg/net/http/transfer.go
index 0f2b7854f5..7f63686528 100644
--- a/src/pkg/net/http/transfer.go
+++ b/src/pkg/net/http/transfer.go
@@ -155,7 +155,9 @@ func (t *transferWriter) WriteHeader(w io.Writer) error {
// function of the sanitized field triple (Body, ContentLength,
// TransferEncoding)
if t.shouldSendContentLength() {
- io.WriteString(w, "Content-Length: ")
+ if _, err := io.WriteString(w, "Content-Length: "); err != nil {
+ return err
+ }
if _, err := io.WriteString(w, strconv.FormatInt(t.ContentLength, 10)+"\r\n"); err != nil {
return err
}