Send 504 Gateway Timeout error when response timeout occurs

- Provides proper HTTP response instead of closing connection
- Prevents browser 'message port closed' errors
parent 955c8903
...@@ -649,6 +649,7 @@ static int handle_proxy_request(int client_fd, wssshd_state_t *state, const wsss ...@@ -649,6 +649,7 @@ static int handle_proxy_request(int client_fd, wssshd_state_t *state, const wsss
if (activity == 0) { if (activity == 0) {
// Timeout // Timeout
printf("[WEB-PROXY] Timeout waiting for response from wsssht\n"); printf("[WEB-PROXY] Timeout waiting for response from wsssht\n");
send_http_error(client_fd, 504, "Gateway Timeout");
break; break;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment