Use "traditional" Lua Server Pages implementation when the first letter in a file is "H" (as in HTTP/1.1 ...). Use Kepler in all other cases

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER
2025-06-21 19:59:58 +02:00
parent 762c74fffa
commit 75b06a5469
2 changed files with 9 additions and 12 deletions

View File

@@ -12,20 +12,16 @@ diff --git a/src/webserver/civetweb/mod_lua.inl b/src/webserver/civetweb/mod_lua
index 26f281ee..e9a13835 100644
--- a/src/webserver/civetweb/mod_lua.inl
+++ b/src/webserver/civetweb/mod_lua.inl
@@ -3208,10 +3208,9 @@ handle_lsp_request(struct mg_connection *conn,
* "<?" which means "classic CivetWeb Syntax".
@@ -3208,9 +3208,9 @@ handle_lsp_request(struct mg_connection *conn,
*
*/
- run_lsp = run_lsp_civetweb;
run_lsp = run_lsp_civetweb;
- if ((addr[0] == '<') && (addr[1] != '?')) {
- run_lsp = run_lsp_kepler;
- }
+
+ // Pi-hole change: Always use Kepler syntax, ignore rules above
+ run_lsp = run_lsp_kepler;
+ if ((addr[0] != 'H')) { // Pi-hole change: Check if file starts with "H" for HTTP
run_lsp = run_lsp_kepler;
}
/* We're not sending HTTP headers here, Lua page must do it. */
error =
--
2.34.1

View File

@@ -3277,9 +3277,10 @@ handle_lsp_request(struct mg_connection *conn,
* "<?" which means "classic CivetWeb Syntax".
*
*/
// Pi-hole change: Always use Kepler syntax, ignore rules above
run_lsp = run_lsp_civetweb;
if ((addr[0] != 'H')) { // Pi-hole change: Check if file starts with "H" for HTTP
run_lsp = run_lsp_kepler;
}
/* We're not sending HTTP headers here, Lua page must do it. */
error =