Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mongoose
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
esp
mongoose
Commits
abf89d32
Commit
abf89d32
authored
Sep 01, 2017
by
Наше вам с кисточкой
Committed by
Cesanta Bot
Sep 01, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make C ws client work with Go
PUBLISHED_FROM=263553121b992ec0f66b0275b4e10f4176281812
parent
177e05de
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
mongoose.c
mongoose.c
+3
-2
No files found.
mongoose.c
View file @
abf89d32
...
...
@@ -8036,7 +8036,7 @@ struct mg_connection *mg_connect_http_opt(
mg_printf
(
nc
,
"%s %.*s HTTP/1.1
\r\n
Host: %.*s
\r\n
Content-Length: %"
SIZE_T_FMT
"
\r\n
%.*s%s
\r\n
%s"
,
(
post_data
[
0
]
==
'\0'
?
"GET"
:
"POST"
),
(
int
)
path
.
len
,
path
.
p
,
(
int
)
host
.
len
,
host
.
p
,
strlen
(
post_data
),
(
int
)
auth
.
len
,
(
int
)
(
path
.
p
-
host
.
p
)
,
host
.
p
,
strlen
(
post_data
),
(
int
)
auth
.
len
,
(
auth
.
buf
==
NULL
?
""
:
auth
.
buf
),
extra_headers
,
post_data
);
mbuf_free
(
&
auth
);
...
...
@@ -9511,7 +9511,8 @@ void mg_send_websocket_handshake3v(struct mg_connection *nc,
/* TODO(mkm): take default hostname from http proto data if host == NULL */
if
(
host
.
len
>
0
)
{
mg_printf
(
nc
,
"Host: %.*s
\r\n
"
,
(
int
)
host
.
len
,
host
.
p
);
int
host_len
=
(
int
)
(
path
.
p
-
host
.
p
);
/* Account for possible :PORT */
mg_printf
(
nc
,
"Host: %.*s
\r\n
"
,
host_len
,
host
.
p
);
}
if
(
protocol
.
len
>
0
)
{
mg_printf
(
nc
,
"Sec-WebSocket-Protocol: %.*s
\r\n
"
,
(
int
)
protocol
.
len
,
...
...
Write
Preview
Markdown
is supported
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