Fix missing rename of pos -> hpos; move `s` next to use site

pull/1110/head
Nick Treleaven 2019-07-12 17:42:14 +01:00 committed by Alexander Medvednikov
parent d0e7d0070d
commit 4c4e0c690c
1 changed files with 2 additions and 2 deletions

View File

@ -21,7 +21,6 @@ import const (
) )
fn (req &Request) do() Response { fn (req &Request) do() Response {
mut s := ''
emptyresp := Response{} emptyresp := Response{}
mut url := req.url mut url := req.url
//println('\n\nhttp.do() WIN URL="$url" TYP=$req.typ data="$req.data" headers.len=req.headers.len"') //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); // # printf("dwread=%d\n", dwRead);
// # while ((InternetReadFile(request, buf, BUF_MAX, &nr_read)) && nr_read > 0) // # while ((InternetReadFile(request, buf, BUF_MAX, &nr_read)) && nr_read > 0)
mut s := ''
for for
{ {
ok := C.InternetReadFile(request, buf, BUF_MAX, &nr_read) ok := C.InternetReadFile(request, buf, BUF_MAX, &nr_read)
@ -176,7 +176,7 @@ fn (req &Request) do() Response {
// println(h) // println(h)
vals := h.split(':') vals := h.split(':')
hpos := h.index(':') hpos := h.index(':')
if pos == -1 { if hpos == -1 {
continue continue
} }
key := h.left(hpos) key := h.left(hpos)