Skip to content
This repository has been archived by the owner on Apr 26, 2023. It is now read-only.

Java: Pass along any http error from server #64

Closed
wants to merge 6 commits into from
Closed

Java: Pass along any http error from server #64

wants to merge 6 commits into from

Conversation

esoekianto
Copy link
Contributor

  • 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

Erwin Soekianto added 2 commits March 28, 2014 10:21
@esoekianto esoekianto changed the title Pass along any http error from server Java: Pass along any http error from server Mar 28, 2014
@bsvensson
Copy link
Member

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).

@bsvensson bsvensson added this to the 1.0 milestone Mar 29, 2014
@bsvensson
Copy link
Member

For the f=oops case, the browser is showing the gzipped content without telling the browser that it is gzipped (and thus need unzipping):

// Missing header to make it work
Content-Encoding:gzip

@esoekianto
Copy link
Contributor Author

@bsvensson thank you!

@esoekianto
Copy link
Contributor Author

@bsvensson no, we don't. My bad!

@bsvensson
Copy link
Member

@esoekianto Also, should we change the German "nachricht" to English? Maybe "message"?

@esoekianto
Copy link
Contributor Author

@bsvensson done

@bsvensson
Copy link
Member

@esoekianto : Is the unzip-then-rezip necessary?

@esoekianto
Copy link
Contributor Author

@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.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants