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
5eabfe5d
Commit
5eabfe5d
authored
Mar 08, 2013
by
Sergey Lyubka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Using pijyoi's patch for connection close.
parent
36b7c8d6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
mongoose.c
mongoose.c
+2
-2
No files found.
mongoose.c
View file @
5eabfe5d
...
@@ -4903,9 +4903,8 @@ static int getreq(struct mg_connection *conn, char *ebuf, size_t ebuf_len) {
...
@@ -4903,9 +4903,8 @@ static int getreq(struct mg_connection *conn, char *ebuf, size_t ebuf_len) {
if
(
conn
->
request_len
==
0
&&
conn
->
data_len
==
conn
->
buf_size
)
{
if
(
conn
->
request_len
==
0
&&
conn
->
data_len
==
conn
->
buf_size
)
{
snprintf
(
ebuf
,
ebuf_len
,
"%s"
,
"Request Too Large"
);
snprintf
(
ebuf
,
ebuf_len
,
"%s"
,
"Request Too Large"
);
}
if
(
conn
->
request_len
<=
0
)
{
}
else
if
(
conn
->
request_len
<=
0
)
{
snprintf
(
ebuf
,
ebuf_len
,
"%s"
,
"Client closed connection"
);
snprintf
(
ebuf
,
ebuf_len
,
"%s"
,
"Client closed connection"
);
conn
->
must_close
=
1
;
}
else
if
(
parse_http_message
(
conn
->
buf
,
conn
->
buf_size
,
}
else
if
(
parse_http_message
(
conn
->
buf
,
conn
->
buf_size
,
&
conn
->
request_info
)
<=
0
)
{
&
conn
->
request_info
)
<=
0
)
{
snprintf
(
ebuf
,
ebuf_len
,
"Bad request: [%.*s]"
,
conn
->
data_len
,
conn
->
buf
);
snprintf
(
ebuf
,
ebuf_len
,
"Bad request: [%.*s]"
,
conn
->
data_len
,
conn
->
buf
);
...
@@ -4960,6 +4959,7 @@ static void process_new_connection(struct mg_connection *conn) {
...
@@ -4960,6 +4959,7 @@ static void process_new_connection(struct mg_connection *conn) {
do
{
do
{
if
(
!
getreq
(
conn
,
ebuf
,
sizeof
(
ebuf
)))
{
if
(
!
getreq
(
conn
,
ebuf
,
sizeof
(
ebuf
)))
{
send_http_error
(
conn
,
500
,
"Server Error"
,
"%s"
,
ebuf
);
send_http_error
(
conn
,
500
,
"Server Error"
,
"%s"
,
ebuf
);
conn
->
must_close
=
1
;
}
else
if
(
!
is_valid_uri
(
conn
->
request_info
.
uri
))
{
}
else
if
(
!
is_valid_uri
(
conn
->
request_info
.
uri
))
{
snprintf
(
ebuf
,
sizeof
(
ebuf
),
"Invalid URI: [%s]"
,
ri
->
uri
);
snprintf
(
ebuf
,
sizeof
(
ebuf
),
"Invalid URI: [%s]"
,
ri
->
uri
);
send_http_error
(
conn
,
400
,
"Bad Request"
,
"%s"
,
ebuf
);
send_http_error
(
conn
,
400
,
"Bad Request"
,
"%s"
,
ebuf
);
...
...
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