Skip to content
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

Android Volley Execution gives Unparseable date warning #223

Closed
Ankit-Kr-Verma opened this issue Sep 17, 2018 · 3 comments
Closed

Android Volley Execution gives Unparseable date warning #223

Ankit-Kr-Verma opened this issue Sep 17, 2018 · 3 comments

Comments

@Ankit-Kr-Verma
Copy link

E/Volley: [35258] HttpHeaderParser.parseDateAsEpoch: Unable to parse dateStr: -1, falling back to 0
java.text.ParseException: Unparseable date: "-1" (at offset 0)
at java.text.DateFormat.parse(DateFormat.java:579)
at com.android.volley.toolbox.HttpHeaderParser.parseDateAsEpoch(HttpHeaderParser.java:142)
at com.android.volley.toolbox.HttpHeaderParser.parseCacheHeaders(HttpHeaderParser.java:100)
at com.goeventz.volley.VolleyRequest$3.parseNetworkResponse(VolleyRequest.java:121)
at com.android.volley.NetworkDispatcher.processRequest(NetworkDispatcher.java:132)
at com.android.volley.NetworkDispatcher.run(NetworkDispatcher.java:87)

@jpd236
Copy link
Collaborator

jpd236 commented Sep 17, 2018

That's not a thrown exception; it's a logged warning. The server's response includes either a "Date: -1" or "Expires: -1" header. Those are considered invalid date formats, and thus Volley treats it as a "0" per the RFC.

@jpd236 jpd236 closed this as completed Sep 17, 2018
@Ankit-Kr-Verma
Copy link
Author

Thanks for the quick reply.

@Ankit-Kr-Verma Ankit-Kr-Verma changed the title Android Volley Execution throw an Exception: Unparseable date Android Volley Execution gives Unparseable date warning Sep 19, 2018
@NickIvantsov
Copy link

Please tell me how to disable or handle this exception?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants