-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Response 304. But chrome can't Parse. #268
Labels
Milestone
Comments
we need more details to be able to help you. What does the webserver log say? did you trace the communication using a sniffer? (wireshark) |
This issue happens because Transfer-Encoding: chunked is set, which is because Content-Encoding: gzip is set for 304 response. @Override
protected boolean useGzipWhenAccepted(Response r) {
return super.useGzipWhenAccepted(r) && r.getStatus() != Response.Status.NOT_MODIFIED;
} |
@giridharkannan Thanks a lot! It solved my problem. // SimpleWebServer.java
...
public class SimpleWebServer extends NanoHTTPD {
@Override
protected boolean useGzipWhenAccepted(Response r) {
return super.useGzipWhenAccepted(r) && r.getStatus() != Response.Status.NOT_MODIFIED;
}
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I use webserver in android 4.3 . In index.html include some css and js file. When refresh browser, some request css and js file are response 304 and the response text are not normal, They are begin some binary bytes with http header.
The text was updated successfully, but these errors were encountered: