-
Notifications
You must be signed in to change notification settings - Fork 2k
proxy to specific url failed #184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The server you're trying to proxy to might be expecting certain headers that aren't being passed through - or it might be rejecting requests that have obviously been proxied.
|
@wuhaocn2008 are you still having an issue with this? |
it seems the latter url is ok right now, but the first url is still having some kind of issue when i use the proxy server on CHROME to visit. It keeps loading for a very long time. |
I think the problem is the query part of the URL. I'm going to work on getting rid of the hanging problems in |
It sounds like it was hanging - I just added a pull request to give reasonable errors instead of just hanging. See #216. After that pull request is merged in and a new version is up on npm, can you try it again and tell me what error it gives you (if any)? |
USE proxyError to track the errors, here is what i got when proxy the first url: { [Error: socket hang up] code: 'ECONNRESET' } it seems you are right about the x-forwarded-for thing. when i proxy some url, it will emit that reset error. For the specific url on top, the reason might be that there should not be a header "x-forwarded" or the server will close the connection. Thank you for all your trouble. |
I try to proxy a request to
http://ptlogin2.qq.com/jump?ptlang=2052&clientuin=304290615&clientkey=0D399336F7C4F553C468779FC21FEC92B77EEE1F3D766C61BC3F3B19AD65E070&u1=http%3A%2F%2Fuser.qzone.qq.com%2F573692919 which actually send a "302 Found" status code, but the proxy failed to send any response which cause Chrome showing an "ERR_EMPTY_RESPONSE" error page.
i found visit that url cause proxyError, and i add some code found it to be "error: { [Error: socket hang up] code: 'ECONNRESET' }"
and i get the similar error when proxy to url http://stats.sports.qq.com/NBAImages/TeamImages/Bulls-1.png
my source code:
The text was updated successfully, but these errors were encountered: