mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-10 16:31:44 +00:00
Firing MG_HTTP_ERROR
This commit is contained in:
1 parent
e6ac3af454
commit
915e923e35
2 files changed
+15
-11
No files matched your search
@@ -126,11 +126,13 @@ static void send_http_error(struct mg_connection *conn, int status,
|
||||
}
|
||||
DEBUG_TRACE(("[%s]", buf));
|
||||
|
||||
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);
|
||||
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
|
||||
|
||||
Reference in new issue
Block a user