mirror of
https://github.com/lammertb/libhttp.git
synced 2025-12-22 04:02:04 +03:00
Added comments about auth checks done before begin_request()
This commit is contained in:
@@ -4202,6 +4202,8 @@ static void handle_request(struct mg_connection *conn) {
|
|||||||
get_remote_ip(conn), ri->uri);
|
get_remote_ip(conn), ri->uri);
|
||||||
|
|
||||||
DEBUG_TRACE(("%s", 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 &&
|
if (!conn->client.is_ssl && conn->client.ssl_redir &&
|
||||||
(ssl_index = get_first_ssl_listener_index(conn->ctx)) > -1) {
|
(ssl_index = get_first_ssl_listener_index(conn->ctx)) > -1) {
|
||||||
redirect_to_https_port(conn, ssl_index);
|
redirect_to_https_port(conn, ssl_index);
|
||||||
|
|||||||
Reference in New Issue
Block a user