ipkn / crow

Crow is very fast and easy to use C++ micro web framework (inspired by Python Flask)
BSD 3-Clause "New" or "Revised" License
7.46k stars 889 forks source link

Update websocket.h #360

Open chitownhart opened 4 years ago

chitownhart commented 4 years ago

There's a bug in the payload processing if you receive a message larger than the internal buffer size (4K). You need to move the doread down so that it keeps on reading (with state == Payload) until the entire message is processed and remaininglength == 0. Currently you only call do_read if reaminginglength == 0 on the first read and message fits in the buffer.