forked from svrjs/svrjs
Change proxy handler to end the socket with 500 Internal Server Error only when it is not destroyed.
This commit is contained in:
parent
5b91c21973
commit
b79e165bed
1 changed files with 1 additions and 1 deletions
|
@ -55,7 +55,7 @@ function proxyHandler(req, socket, head) {
|
|||
);
|
||||
logFacilities.errmessage("Stack:");
|
||||
logFacilities.errmessage(err.stack);
|
||||
socket.end("HTTP/1.1 500 Internal Server Error\n\n");
|
||||
if (!socket.destroyed) socket.end("HTTP/1.1 500 Internal Server Error\n\n");
|
||||
}
|
||||
} else {
|
||||
logFacilities.errmessage("SVR.JS doesn't support proxy without proxy mod.");
|
||||
|
|
Reference in a new issue