http_win: set status_code ,remove unused var

pull/1480/head
unknown-v 2019-08-05 09:59:07 +02:00 committed by Alexander Medvednikov
parent 01c2d25ae5
commit 22eaceb17c
1 changed files with 6 additions and 3 deletions

View File

@ -137,9 +137,13 @@ pub fn (req &Request) do() Response {
text: s text: s
headers: map[string]string{} headers: map[string]string{}
// headers: resp_headers // headers: resp_headers
//hard coded http version 'HTTP/1.1' + space - 9
//3-digit HTTP status codes - 9+3
//HTTP/1.1 200 OK
status_code: resp_headers.substr(9,12).int()
} }
for h in hh { for h in hh {
vals := h.split(':')
hpos := h.index(':') hpos := h.index(':')
if hpos == -1 { if hpos == -1 {
continue continue
@ -177,4 +181,3 @@ pub fn escape(s string) string {
} }
fn C.InternetReadFile(voidptr, voidptr, int, intptr) bool fn C.InternetReadFile(voidptr, voidptr, int, intptr) bool