Update index.php

This commit is contained in:
Namhyeon Go 2024-02-26 15:48:39 +09:00 committed by GitHub
parent 029b5543de
commit ab602e3975
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -77,7 +77,8 @@ function read_from_remote_server($remote_address, $remote_port, $scheme, $conn =
if ($conn == null) {
echo jsonrpc2_error_encode($error, $id);
} else {
$buf = "HTTP/1.1 502 Bad Gateway\r\n\r\n" . jsonrpc2_error_encode($error, $id);
$buf = sprintf("HTTP/1.1 %s %s\r\n\r\n", $error['status'], $error['message']);
$buf .= jsonrpc2_error_encode($error, $id);
fwrite($conn, $buf);
}
} else {