Commit d990bef9 authored by Arthur d'Avray's avatar Arthur d'Avray Committed by Alex Hultman

Add port info in HTTP Host header (#757)

parent ff8dd6f5
#include "Hub.h"
#include "HTTPSocket.h"
#include <openssl/sha.h>
#include <string>
namespace uWS {
......@@ -173,7 +174,7 @@ void Hub::connect(std::string uri, void *user, std::map<std::string, std::string
"Upgrade: websocket\r\n"
"Connection: Upgrade\r\n"
"Sec-WebSocket-Key: " + randomKey + "\r\n"
"Host: " + hostname + "\r\n" +
"Host: " + hostname + ":" + std::to_string(port) + "\r\n"
"Sec-WebSocket-Version: 13\r\n";
for (std::pair<std::string, std::string> header : extraHeaders) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment