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
df206bc0
Commit
df206bc0
authored
Oct 11, 2014
by
MPR
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
transmit http answer code using http_client
parent
531fec34
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
0 deletions
+4
-0
http_client.c
examples/http_client/http_client.c
+1
-0
mongoose.c
mongoose.c
+3
-0
No files found.
examples/http_client/http_client.c
View file @
df206bc0
...
...
@@ -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 @
df206bc0
...
...
@@ -2410,6 +2410,9 @@ static int parse_http_message(char *buf, int len, struct mg_connection *ri) {
if
(
is_request
)
{
ri
->
http_version
+=
5
;
}
else
{
ri
->
status_code
=
atoi
(
ri
->
uri
);
}
parse_http_headers
(
&
buf
,
ri
);
if
((
ri
->
query_string
=
strchr
(
ri
->
uri
,
'?'
))
!=
NULL
)
{
...
...
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