-
Notifications
You must be signed in to change notification settings - Fork 417
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
Incorrect response codes for HTTP proxy #1987
Comments
We use 500 Domain Not Found if the hostname is not in the addressbook and 504 Gateway TImeout if the host is apparently down (no LS or no response). Here's our error pages for reference: https://github.com/i2p/i2p.i2p/tree/master/apps/i2ptunnel/resources/proxy |
It means that Java I2P requires fixing as well. Simply speaking, 500 error should appear only when something unexpected happened.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500 |
We have 20+ error pages and we only use 500 for the one case I mentioned - hostname not in address book. You have a suggestion for what would be better for that? |
This is what I found:
|
changed to 502 |
When internal i2pd HTTP proxy fails to make connection, it returns response with error code 500.
This is wrong, more suitable code is 503.
Most likely, other errors have wrong codes too.
This is how
Host is down
case is processed now:i2pd/libi2pd_client/HTTPProxy.cpp
Line 773 in c215f2e
i2pd/libi2pd_client/HTTPProxy.cpp
Lines 165 to 171 in c215f2e
i2pd/libi2pd_client/HTTPProxy.cpp
Lines 198 to 212 in c215f2e
The text was updated successfully, but these errors were encountered: