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
22f8d86b
Commit
22f8d86b
authored
Sep 25, 2015
by
Marko Mikulicic
Committed by
Sergey Lyubka
Sep 25, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Makes sure send file releases resources on close
PUBLISHED_FROM=451d2dd0b55b9fd7dea441a9279f54d0005c97b1
parent
3a9a9c7a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
9 deletions
+10
-9
mongoose.c
mongoose.c
+10
-9
No files found.
mongoose.c
View file @
22f8d86b
...
...
@@ -4030,15 +4030,16 @@ static void http_handler(struct mg_connection *nc, int ev, void *ev_data) {
#ifndef MG_DISABLE_HTTP_WEBSOCKET
struct
mg_str
*
vec
;
#endif
/*
* For HTTP messages without Content-Length, always send HTTP message
* before MG_EV_CLOSE message.
*/
if
(
ev
==
MG_EV_CLOSE
&&
io
->
len
>
0
&&
mg_parse_http
(
io
->
buf
,
io
->
len
,
&
hm
,
is_req
)
>
0
)
{
hm
.
message
.
len
=
io
->
len
;
hm
.
body
.
len
=
io
->
buf
+
io
->
len
-
hm
.
body
.
p
;
nc
->
handler
(
nc
,
is_req
?
MG_EV_HTTP_REQUEST
:
MG_EV_HTTP_REPLY
,
&
hm
);
if
(
ev
==
MG_EV_CLOSE
)
{
/*
* For HTTP messages without Content-Length, always send HTTP message
* before MG_EV_CLOSE message.
*/
if
(
io
->
len
>
0
&&
mg_parse_http
(
io
->
buf
,
io
->
len
,
&
hm
,
is_req
)
>
0
)
{
hm
.
message
.
len
=
io
->
len
;
hm
.
body
.
len
=
io
->
buf
+
io
->
len
-
hm
.
body
.
p
;
nc
->
handler
(
nc
,
is_req
?
MG_EV_HTTP_REQUEST
:
MG_EV_HTTP_REPLY
,
&
hm
);
}
free_http_proto_data
(
nc
);
}
...
...
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