Commit 1cb094e0 authored by Joe Mucchiello's avatar Joe Mucchiello

Revert "Add http_error callback"

This reverts commit 27fe9c8f.
parent 27fe9c8f
...@@ -915,8 +915,6 @@ static void send_http_error(struct mg_connection *conn, int status, ...@@ -915,8 +915,6 @@ static void send_http_error(struct mg_connection *conn, int status,
int len = 0; int len = 0;
conn->status_code = status; conn->status_code = status;
if (conn->ctx->callbacks.http_error == NULL ||
conn->ctx->callbacks.http_error(conn, status)) {
buf[0] = '\0'; buf[0] = '\0';
// Errors 1xx, 204 and 304 MUST NOT send a body // Errors 1xx, 204 and 304 MUST NOT send a body
...@@ -935,7 +933,6 @@ static void send_http_error(struct mg_connection *conn, int status, ...@@ -935,7 +933,6 @@ static void send_http_error(struct mg_connection *conn, int status,
"Connection: %s\r\n\r\n", status, reason, len, "Connection: %s\r\n\r\n", status, reason, len,
suggest_connection_header(conn)); suggest_connection_header(conn));
conn->num_bytes_sent += mg_printf(conn, "%s", buf); conn->num_bytes_sent += mg_printf(conn, "%s", buf);
}
} }
#if defined(_WIN32) && !defined(__SYMBIAN32__) #if defined(_WIN32) && !defined(__SYMBIAN32__)
......
...@@ -67,7 +67,6 @@ struct mg_callbacks { ...@@ -67,7 +67,6 @@ struct mg_callbacks {
const char *path, size_t *data_len); const char *path, size_t *data_len);
void (*init_lua)(struct mg_connection *, void *lua_context); void (*init_lua)(struct mg_connection *, void *lua_context);
void (*upload)(struct mg_connection *, const char *file_name); void (*upload)(struct mg_connection *, const char *file_name);
int (*http_error)(struct mg_connection *, int status);
}; };
// Start web server. // Start web server.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment