Hi,

On Tue, Mar 29, 2022 at 12:55 AM LemonBoy <[email protected]> wrote:
>
> @LemonBoy commented on this pull request.
>
> ________________________________
>
> In src/channel.c:
>
> > +    payload_len = atoi((char *)line_start + 16);
> +
> + if ((line_start + 2) == p && line_start[0] == '\r' &&
> + line_start[1] == '\n')
> +    // reached the empty line
> +    break;
> +    }
> +
> +    if (payload_len == -1)
> + // Content-Length field is not present in the header
> + return FAIL;
> +
> +    hdr_len = p - reader->js_buf;
> +
> +    // if the entire payload is not received, wait for more data to arrive
> +    if (jsbuf_len < hdr_len + payload_len)
>
> The parser should only consume payload_len bytes from the request, the 
> remaining data shall be interpreted as the beginning of a new one.
>

The reader->js_end field is adjusted a few lines below the above line
so that only the
payload_len bytes are consumed from the request.

- Yegappan

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/CAAW7x7n5MfvE8Goash9BWdNHRgzEZudEmgi1w-bk8TGcuc6ZLQ%40mail.gmail.com.

Raspunde prin e-mail lui