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

@ -42,7 +42,7 @@ s/^(.* 00044d5154540402003c000c6375726c).*/$1/
</strippart>
<protocol>
client CONNECT 18 00044d5154540402003c000c6375726c
server CONACK 2 20020000
server CONNACK 2 20020000
client PUBLISH f 000431313931736f6d657468696e67
client DISCONNECT 0 e000
</protocol>