Skip to content

Commit f84685f

Browse files
committed
fix ranges of headers. thanks to @thinca.
1 parent 862fa82 commit f84685f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

autoload/webapi/http.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ function! webapi#http#get(url, ...)
173173
let content = res[pos+2:]
174174
endif
175175
return {
176-
\ "header" : split(res[0:pos], '\r\?\n'),
176+
\ "header" : split(res[:pos-1], '\r\?\n'),
177177
\ "content" : content
178178
\}
179179
endfunction
@@ -240,7 +240,7 @@ function! webapi#http#post(url, ...)
240240
let content = res[pos+2:]
241241
endif
242242
return {
243-
\ "header" : split(res[0:pos], '\r\?\n'),
243+
\ "header" : split(res[:pos-1], '\r\?\n'),
244244
\ "content" : content
245245
\}
246246
endfunction

0 commit comments

Comments
 (0)