From 4c4e0c690c8ea621d185f97875a1051144a455fe Mon Sep 17 00:00:00 2001 From: Nick Treleaven Date: Fri, 12 Jul 2019 17:42:14 +0100 Subject: [PATCH] Fix missing rename of pos -> hpos; move `s` next to use site --- vlib/http/http_win.v | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vlib/http/http_win.v b/vlib/http/http_win.v index cafe2c82f2..9141cf1eaa 100644 --- a/vlib/http/http_win.v +++ b/vlib/http/http_win.v @@ -21,7 +21,6 @@ import const ( ) fn (req &Request) do() Response { - mut s := '' emptyresp := Response{} mut url := req.url //println('\n\nhttp.do() WIN URL="$url" TYP=$req.typ data="$req.data" headers.len=req.headers.len"') @@ -137,6 +136,7 @@ fn (req &Request) do() Response { // } // # printf("dwread=%d\n", dwRead); // # while ((InternetReadFile(request, buf, BUF_MAX, &nr_read)) && nr_read > 0) + mut s := '' for { ok := C.InternetReadFile(request, buf, BUF_MAX, &nr_read) @@ -176,7 +176,7 @@ fn (req &Request) do() Response { // println(h) vals := h.split(':') hpos := h.index(':') - if pos == -1 { + if hpos == -1 { continue } key := h.left(hpos)