Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Jochen Bauer
uWebSockets
Commits
d990bef9
Commit
d990bef9
authored
Jan 25, 2018
by
Arthur d'Avray
Committed by
Alex Hultman
Jan 25, 2018
Browse files
Add port info in HTTP Host header (#757)
parent
ff8dd6f5
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/Hub.cpp
View file @
d990bef9
#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
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment