mirror of
https://github.com/lammertb/libhttp.git
synced 2025-12-22 04:02:04 +03:00
Don't call local request handler for requests with absolute URIs of other servers (#266)
This commit is contained in:
@@ -11796,11 +11796,18 @@ process_new_connection(struct mg_connection *conn)
|
||||
}
|
||||
|
||||
if (ebuf[0] == '\0') {
|
||||
if (conn->request_info.local_uri) {
|
||||
/* handle request to local server */
|
||||
handle_request(conn);
|
||||
if (conn->ctx->callbacks.end_request != NULL) {
|
||||
conn->ctx->callbacks.end_request(conn, conn->status_code);
|
||||
conn->ctx->callbacks.end_request(conn,
|
||||
conn->status_code);
|
||||
}
|
||||
log_access(conn);
|
||||
} else {
|
||||
/* TODO: handle non-local request (PROXY) */
|
||||
conn->must_close = 1;
|
||||
}
|
||||
} else {
|
||||
conn->must_close = 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user