changeset 20:d6bb66c7ae14

Close request bodies so we can use keepalive
author Lewin Bormann <lbo@spheniscida.de>
date Sat, 08 Oct 2016 14:11:44 +0200
parents 507354ead285
children 33f31940385e
files http/server.go
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/http/server.go	Sat Oct 08 14:10:37 2016 +0200
+++ b/http/server.go	Sat Oct 08 14:11:44 2016 +0200
@@ -105,6 +105,7 @@
 func (h ParticipantHandler) parseRequest(target interface{}, r *http.Request) error {
 	body := bytes.NewBuffer(nil)
 	n, err := body.ReadFrom(r.Body)
+	r.Body.Close()
 
 	if err != nil || n == 0 {
 		return con.NewError(con.ERR_IO, "Couldn't read request", err)