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
915e923e
Commit
915e923e
authored
Oct 10, 2013
by
Sergey Lyubka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Firing MG_HTTP_ERROR
parent
e6ac3af4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
11 deletions
+15
-11
mongoose.c
build/src/mongoose.c
+7
-5
mongoose.c
mongoose.c
+8
-6
No files found.
build/src/mongoose.c
View file @
915e923e
...
...
@@ -126,11 +126,13 @@ static void send_http_error(struct mg_connection *conn, int status,
}
DEBUG_TRACE
((
"[%s]"
,
buf
));
if
(
call_user
(
MG_HTTP_ERROR
,
conn
,
(
void
*
)
(
long
)
status
)
==
0
)
{
mg_printf
(
conn
,
"HTTP/1.1 %d %s
\r\n
"
"Content-Length: %d
\r\n
"
"Connection: %s
\r\n\r\n
"
,
status
,
reason
,
len
,
suggest_connection_header
(
conn
));
conn
->
num_bytes_sent
+=
mg_printf
(
conn
,
"%s"
,
buf
);
}
}
// Write data to the IO channel - opened file descriptor, socket or SSL
...
...
mongoose.c
View file @
915e923e
...
...
@@ -2293,11 +2293,13 @@ static void send_http_error(struct mg_connection *conn, int status,
}
DEBUG_TRACE
((
"[%s]"
,
buf
));
if
(
call_user
(
MG_HTTP_ERROR
,
conn
,
(
void
*
)
(
long
)
status
)
==
0
)
{
mg_printf
(
conn
,
"HTTP/1.1 %d %s
\r\n
"
"Content-Length: %d
\r\n
"
"Connection: %s
\r\n\r\n
"
,
status
,
reason
,
len
,
suggest_connection_header
(
conn
));
conn
->
num_bytes_sent
+=
mg_printf
(
conn
,
"%s"
,
buf
);
}
}
// Write data to the IO channel - opened file descriptor, socket or SSL
...
...
@@ -5022,7 +5024,7 @@ static void process_new_connection(struct mg_connection *conn) {
if
(
ebuf
[
0
]
==
'\0'
)
{
handle_request
(
conn
);
call_user
(
MG_REQUEST_END
,
conn
,
(
void
*
)
(
long
)
conn
->
status_code
);
call_user
(
MG_REQUEST_END
,
conn
,
(
void
*
)
conn
->
status_code
);
log_access
(
conn
);
}
if
(
ri
->
remote_user
!=
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