[client] ---> [proxy] ---> [remote server]
应该怎么回答?
在node.js中,默认行为是产生500状态代码和“套接字挂断”错误消息,例如
curl --proxy http://127.0.0.1:8000 http://127.0.0.1:8090 -v
* Rebuilt URL to: http://127.0.0.1:8090/
* Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to 127.0.0.1 (127.0.0.1) port 8000 (#0)
> GET http://127.0.0.1:8090/ HTTP/1.1
> Host: 127.0.0.1:8090
> User-Agent: curl/7.54.0
> Accept: */*
> Proxy-Connection: Keep-Alive
>
< HTTP/1.1 500 Internal Server Error
< x-raygun-request-id: 01CM0DWC030AJWJDE5YN5EJK2E
< Date: Fri, 03 Aug 2018 17:38:07 GMT
< Connection: keep-alive
< Transfer-Encoding: chunked
<
* Connection #0 to host 127.0.0.1 left intact
socket hang up
但是,后者掩盖了多种可能的故障。