Bug on setting extra headers. Now it loses the first string character. (#184)

Client code:

    ...

    ix::WebSocketHttpHeaders headers {
        {"Cookie", "ABC"}
    };

    ...

Expected header string on server:
    "Cookie: ABC"

Resulted header string on server:
    "Cookie: BC"

Solution:
    The easy way I found to solve the problem is to add a space where extra headers are set before sended to server.

Co-authored-by: Fco. Javier M. C <fcojavmc@todo-redes.com>
This commit is contained in:
Francisco Javier 2020-04-25 20:39:37 +02:00 committed by GitHub
parent 2802cad8c4
commit 953c680eee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -133,7 +133,7 @@ namespace ix
for (auto& it : extraHeaders) for (auto& it : extraHeaders)
{ {
ss << it.first << ":" << it.second << "\r\n"; ss << it.first << ": " << it.second << "\r\n";
} }
if (_enablePerMessageDeflate) if (_enablePerMessageDeflate)