fix client parse error

This commit is contained in:
Prabir Shrestha
2021-06-10 21:12:05 -07:00
parent 9ecbe24af9
commit 293e8ae932

View File

@@ -73,6 +73,8 @@ function! s:on_header(ctx, data) abort
if l:header_offset < 4 if l:header_offset < 4
call add(a:ctx['headers'], a:data) call add(a:ctx['headers'], a:data)
return v:false return v:false
elseif l:header_offset == strlen(a:data)
call add(a:ctx['headers'], a:data)
else else
call add(a:ctx['headers'], strpart(a:data, 0, l:header_offset)) call add(a:ctx['headers'], strpart(a:data, 0, l:header_offset))
call add(a:ctx['contents'], strpart(a:data, l:header_offset)) call add(a:ctx['contents'], strpart(a:data, l:header_offset))