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
ce53e9dd
Commit
ce53e9dd
authored
8 years ago
by
Alexander Alashkin
Committed by
rojer
8 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix multipart handling for small files
PUBLISHED_FROM=b43cb8ca061d50ea8c0b6b20287b9382a4a6be22
parent
55c26344
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
mongoose.c
mongoose.c
+9
-4
No files found.
mongoose.c
View file @
ce53e9dd
...
...
@@ -5177,6 +5177,15 @@ void mg_http_handler(struct mg_connection *nc, int ev, void *ev_data) {
mg_handle_chunked
(
nc
,
hm
,
io
->
buf
+
req_len
,
io
->
len
-
req_len
);
}
#ifdef MG_ENABLE_HTTP_STREAMING_MULTIPART
if
(
req_len
>
0
&&
(
s
=
mg_get_http_header
(
hm
,
"Content-Type"
))
!=
NULL
&&
s
->
len
>=
9
&&
strncmp
(
s
->
p
,
"multipart"
,
9
)
==
0
)
{
mg_http_multipart_begin
(
nc
,
hm
,
req_len
);
mg_http_multipart_continue
(
nc
);
return
;
}
#endif
/* MG_ENABLE_HTTP_STREAMING_MULTIPART */
/* TODO(alashkin): refactor this ifelseifelseifelseifelse */
if
((
req_len
<
0
||
(
req_len
==
0
&&
io
->
len
>=
MG_MAX_HTTP_REQUEST_SIZE
)))
{
...
...
@@ -5266,10 +5275,6 @@ void mg_http_handler(struct mg_connection *nc, int ev, void *ev_data) {
mg_http_call_endpoint_handler
(
nc
,
trigger_ev
,
hm
);
#endif
mbuf_remove
(
io
,
hm
->
message
.
len
);
#ifdef MG_ENABLE_HTTP_STREAMING_MULTIPART
}
else
{
mg_http_multipart_begin
(
nc
,
hm
,
req_len
);
#endif
/* MG_ENABLE_HTTP_STREAMING_MULTIPART */
}
}
(
void
)
pd
;
...
...
This diff is collapsed.
Click to expand it.
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