From 2353814821c848598115a4aad2bdabc99519f530 Mon Sep 17 00:00:00 2001 From: spaceface777 Date: Thu, 13 Aug 2020 19:55:33 +0200 Subject: [PATCH] vweb: fix body size calculation (#6122) --- vlib/vweb/vweb.v | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/vlib/vweb/vweb.v b/vlib/vweb/vweb.v index e70c1cf816..fdc3fc1108 100644 --- a/vlib/vweb/vweb.v +++ b/vlib/vweb/vweb.v @@ -255,7 +255,6 @@ fn handle_conn(conn net.Socket, mut app T) { mut body := '' mut in_headers := true mut len := 0 - mut body_len := 0 //for line in lines[1..] { for _ in 0..100 { //println(j) @@ -281,9 +280,8 @@ fn handle_conn(conn net.Socket, mut app T) { //println('GOT CL=$len') } } else { - body += sline + '\r\n' - body_len += body.len - if body_len >= len { + body += line + if body.len >= len { break } //println('body:$body')