mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
h2: data: frame header already parsed out
This commit is contained in:
parent
31dc6f0410
commit
5f31ff8383
1 changed files with 8 additions and 2 deletions
|
@ -2187,16 +2187,22 @@ lws_h2_parser(struct lws *wsi, unsigned char *in, lws_filepos_t _inlen,
|
|||
__func__, lws_wsi_tag(h2n->swsi));
|
||||
}
|
||||
|
||||
/*
|
||||
* in + length may cover multiple frames, we
|
||||
* can only consider the length of the DATA
|
||||
* in front of us
|
||||
*/
|
||||
|
||||
if (lws_hdr_total_length(h2n->swsi,
|
||||
WSI_TOKEN_HTTP_CONTENT_LENGTH) &&
|
||||
h2n->swsi->http.rx_content_length &&
|
||||
h2n->swsi->http.rx_content_remain <
|
||||
lws_ptr_diff_size_t(iend, in) + 1 - 9 && /* last */
|
||||
h2n->length && /* last */
|
||||
h2n->inside < h2n->length) {
|
||||
|
||||
lwsl_warn("%s: %lu %lu %lu %lu\n", __func__,
|
||||
(unsigned long)h2n->swsi->http.rx_content_remain,
|
||||
(unsigned long)(lws_ptr_diff_size_t(iend, in) + 1 - 9),
|
||||
(unsigned long)(lws_ptr_diff_size_t(iend, in) + 1),
|
||||
(unsigned long)h2n->inside, (unsigned long)h2n->length);
|
||||
|
||||
/* unread data in frame */
|
||||
|
|
Loading…
Add table
Reference in a new issue