From 1415d187eb28cc125842e09a31d2e9bc39b0eb78 Mon Sep 17 00:00:00 2001 From: Sergey Lyubka <valenok@gmail.com> Date: Sun, 10 Feb 2013 15:32:08 +0000 Subject: [PATCH] Added comments about auth checks done before begin_request() --- mongoose.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mongoose.c b/mongoose.c index 66a6f98bc..74325e989 100644 --- a/mongoose.c +++ b/mongoose.c @@ -4202,6 +4202,8 @@ static void handle_request(struct mg_connection *conn) { get_remote_ip(conn), ri->uri); DEBUG_TRACE(("%s", ri->uri)); + // Perform redirect and auth checks before calling begin_request() handler. + // Otherwise, begin_request() would need to perform auth checks and redirects. if (!conn->client.is_ssl && conn->client.ssl_redir && (ssl_index = get_first_ssl_listener_index(conn->ctx)) > -1) { redirect_to_https_port(conn, ssl_index); -- GitLab