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
6193b517
Commit
6193b517
authored
Oct 14, 2014
by
Sergey Lyubka
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #421 from mpromonet/master
transmit http answer code using http_client
parents
911115cc
ca3f5a32
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
0 deletions
+3
-0
http_client.c
examples/http_client/http_client.c
+1
-0
mongoose.c
mongoose.c
+2
-0
No files found.
examples/http_client/http_client.c
View file @
6193b517
...
...
@@ -36,6 +36,7 @@ static int ev_handler(struct mg_connection *conn, enum mg_event ev) {
case
MG_REPLY
:
// Send reply to the original connection
orig
=
(
struct
mg_connection
*
)
conn
->
connection_param
;
mg_send_status
(
orig
,
conn
->
status_code
);
mg_send_header
(
orig
,
"Content-Type"
,
"text/plain"
);
mg_send_data
(
orig
,
conn
->
content
,
conn
->
content_len
);
mg_send_data
(
orig
,
""
,
0
);
// Last chunk: mark the end of reply
...
...
mongoose.c
View file @
6193b517
...
...
@@ -2409,6 +2409,8 @@ static int parse_http_message(char *buf, int len, struct mg_connection *ri) {
}
else
{
if
(
is_request
)
{
ri
->
http_version
+=
5
;
}
else
{
ri
->
status_code
=
atoi
(
ri
->
uri
);
}
parse_http_headers
(
&
buf
,
ri
);
...
...
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