mirror of
https://github.com/pi-hole/FTL.git
synced 2025-12-20 04:58:26 +00:00
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:
@@ -12,20 +12,16 @@ diff --git a/src/webserver/civetweb/mod_lua.inl b/src/webserver/civetweb/mod_lua
|
|||||||
index 26f281ee..e9a13835 100644
|
index 26f281ee..e9a13835 100644
|
||||||
--- a/src/webserver/civetweb/mod_lua.inl
|
--- a/src/webserver/civetweb/mod_lua.inl
|
||||||
+++ b/src/webserver/civetweb/mod_lua.inl
|
+++ b/src/webserver/civetweb/mod_lua.inl
|
||||||
@@ -3208,10 +3208,9 @@ handle_lsp_request(struct mg_connection *conn,
|
@@ -3208,9 +3208,9 @@ handle_lsp_request(struct mg_connection *conn,
|
||||||
* "<?" which means "classic CivetWeb Syntax".
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
- run_lsp = run_lsp_civetweb;
|
run_lsp = run_lsp_civetweb;
|
||||||
- if ((addr[0] == '<') && (addr[1] != '?')) {
|
- if ((addr[0] == '<') && (addr[1] != '?')) {
|
||||||
- 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;
|
||||||
+
|
}
|
||||||
+ // Pi-hole change: Always use Kepler syntax, ignore rules above
|
|
||||||
+ run_lsp = run_lsp_kepler;
|
|
||||||
|
|
||||||
/* We're not sending HTTP headers here, Lua page must do it. */
|
/* We're not sending HTTP headers here, Lua page must do it. */
|
||||||
error =
|
|
||||||
--
|
--
|
||||||
2.34.1
|
2.34.1
|
||||||
|
|
||||||
|
|||||||
@@ -3277,9 +3277,10 @@ handle_lsp_request(struct mg_connection *conn,
|
|||||||
* "<?" which means "classic CivetWeb Syntax".
|
* "<?" which means "classic CivetWeb Syntax".
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
run_lsp = run_lsp_civetweb;
|
||||||
// Pi-hole change: Always use Kepler syntax, ignore rules above
|
if ((addr[0] != 'H')) { // Pi-hole change: Check if file starts with "H" for HTTP
|
||||||
run_lsp = run_lsp_kepler;
|
run_lsp = run_lsp_kepler;
|
||||||
|
}
|
||||||
|
|
||||||
/* We're not sending HTTP headers here, Lua page must do it. */
|
/* We're not sending HTTP headers here, Lua page must do it. */
|
||||||
error =
|
error =
|
||||||
|
|||||||
Reference in New Issue
Block a user