mqtt: improve the state machine

To handle PUBLISH before SUBACK and more.

Updated the existing tests and added three new ones.

Reported-by: Christoph Krey
Bug: https://curl.haxx.se/mail/lib-2020-04/0021.html
Closes #5246
This commit is contained in:
Daniel Stenberg 2020-04-16 13:20:52 +02:00
parent d1a2816b41
commit 5811beba39
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
11 changed files with 402 additions and 99 deletions

View file

@ -46,7 +46,7 @@ s/^(.* 00044d5154540402003c000c6375726c).*/$1/
</strippart>
<protocol>
client CONNECT 18 00044d5154540402003c000c6375726c
server CONACK 2 20020000
server CONNACK 2 20020000
client SUBSCRIBE 9 000100043131393000
server SUBACK 3 9003000100
server PUBLISH c 300c00043131393068656c6c6f0a