This repository has been archived by the owner on Apr 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 322
Java: Pass along any http error from server #64
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
esoekianto
commented
Mar 28, 2014
- add logic to check if response code is 400 or above, getErrorStream, otherwise getInputStream
- check and serve gzip content encoding
- make sure to set error status code in the response
add try catch and fix indentation fixed missing curly bracket
This was referenced Mar 28, 2014
esoekianto
changed the title
Pass along any http error from server
Java: Pass along any http error from server
Mar 28, 2014
This fixes the 404, but makes it worse for f=oops where it now returns 200 (instead of expected 400) with a binary looking response (php has same problem, but DotNet works fine). I'm using stand-alone Tomcat 8.0.3 (without apache httpd). |
For the f=oops case, the browser is showing the gzipped content without telling the browser that it is gzipped (and thus need unzipping):
|
@bsvensson thank you! |
@bsvensson no, we don't. My bad! |
@esoekianto Also, should we change the German "nachricht" to English? Maybe "message"? |
@bsvensson done |
@esoekianto : Is the unzip-then-rezip necessary? |
@bsvensson you are right, I'm re-writing this whole method now. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.