From 07f5f2ca6b08031225b770a8f588957001cf7ae7 Mon Sep 17 00:00:00 2001 From: Massimo Melina Date: Tue, 16 Jun 2020 23:12:36 +0200 Subject: [PATCH] fix: {.disconnect.} and {.disconnection reason.} not working in event 'pre-filter-request' --- main.pas | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/main.pas b/main.pas index eca8c79..1ed9c67 100644 --- a/main.pas +++ b/main.pas @@ -1,4 +1,4 @@ -{ +{ Copyright (C) 2002-2020 Massimo Melina (www.rejetto.com) This file is part of HFS ~ HTTP File Server. @@ -5410,6 +5410,13 @@ var end; runEventScript('pre-filter-request'); + if conn.disconnectedByServer then + exit; + if data.disconnectReason > '' then + begin + getPage('deny', data); + exit; + end; if (length(conn.request.user) > 100) or anycharIn('/\:?*<>|', conn.request.user) then begin