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
6418cad3
Commit
6418cad3
authored
Nov 16, 2015
by
Sergey Lyubka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable HTTP keep-alive on embedded
PUBLISHED_FROM=63bb1ca0f307a4332006d6cd13a35f0be6359174
parent
46529fd5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
mongoose.c
mongoose.c
+9
-0
No files found.
mongoose.c
View file @
6418cad3
...
@@ -4154,6 +4154,9 @@ static void transfer_file_data(struct mg_connection *nc) {
...
@@ -4154,6 +4154,9 @@ static void transfer_file_data(struct mg_connection *nc) {
dp
->
sent
+=
n
;
dp
->
sent
+=
n
;
}
else
{
}
else
{
free_http_proto_data
(
nc
);
free_http_proto_data
(
nc
);
#ifdef MG_DISABLE_HTTP_KEEP_ALIVE
nc
->
flags
|=
MG_F_SEND_AND_CLOSE
;
#endif
}
}
}
else
if
(
dp
->
type
==
DATA_PUT
)
{
}
else
if
(
dp
->
type
==
DATA_PUT
)
{
struct
mbuf
*
io
=
&
nc
->
recv_mbuf
;
struct
mbuf
*
io
=
&
nc
->
recv_mbuf
;
...
@@ -4166,6 +4169,9 @@ static void transfer_file_data(struct mg_connection *nc) {
...
@@ -4166,6 +4169,9 @@ static void transfer_file_data(struct mg_connection *nc) {
}
}
if
(
n
==
0
||
dp
->
sent
>=
dp
->
cl
)
{
if
(
n
==
0
||
dp
->
sent
>=
dp
->
cl
)
{
free_http_proto_data
(
nc
);
free_http_proto_data
(
nc
);
#ifdef MG_DISABLE_HTTP_KEEP_ALIVE
nc
->
flags
|=
MG_F_SEND_AND_CLOSE
;
#endif
}
}
}
else
if
(
dp
->
type
==
DATA_CGI
)
{
}
else
if
(
dp
->
type
==
DATA_CGI
)
{
/* This is POST data that needs to be forwarded to the CGI process */
/* This is POST data that needs to be forwarded to the CGI process */
...
@@ -4736,6 +4742,9 @@ static void mg_send_http_file2(struct mg_connection *nc, const char *path,
...
@@ -4736,6 +4742,9 @@ static void mg_send_http_file2(struct mg_connection *nc, const char *path,
"Last-Modified: %s
\r\n
"
"Last-Modified: %s
\r\n
"
"Accept-Ranges: bytes
\r\n
"
"Accept-Ranges: bytes
\r\n
"
"Content-Type: %.*s
\r\n
"
"Content-Type: %.*s
\r\n
"
#ifdef MG_DISABLE_HTTP_KEEP_ALIVE
"Connection: close
\r\n
"
#endif
"Content-Length: %"
SIZE_T_FMT
"Content-Length: %"
SIZE_T_FMT
"
\r\n
"
"
\r\n
"
"%sEtag: %s
\r\n\r\n
"
,
"%sEtag: %s
\r\n\r\n
"
,
...
...
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