Skip to content

Commit

Permalink
Fix bdring#1170 - broken fallback web page
Browse files Browse the repository at this point in the history
  • Loading branch information
MitchBradley committed Mar 19, 2024
1 parent c1330ec commit fa602e8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion FluidNC/src/WebUI/WebServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,14 @@ namespace WebUI {
return;
}
if (_webserver->hasArg("commandText")) {
websocketCommand(_webserver->arg("commandText").c_str(), getPageid(), auth_level);
auto cmd = _webserver->arg("commandText");
if (cmd.startsWith("[ESP")) {
// [ESPXXX] commands expect data in the HTTP response
// Only the fallback web page uses commandText with [ESPxxx]
synchronousCommand(cmd.c_str(), silent, auth_level);
} else {
websocketCommand(_webserver->arg("commandText").c_str(), getPageid(), auth_level);
}
return;
}
_webserver->send(500, "text/plain", "Invalid command");
Expand Down

0 comments on commit fa602e8

Please sign in to comment.