You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, Cloudflare often sets this field to 0 or -1, causing the log to be spammed with warnings. I'd rather see the warning not being logged at all, of a simple filter for 0 and -1.
The text was updated successfully, but these errors were encountered:
This has come up before (#223). As noted then, 0 and -1 are invalid values according to the HTTP RFC, as far as I can tell. But the RFC does say this:
"A cache recipient MUST interpret invalid date formats, especially the value "0", as representing a time in the past (i.e., "already expired")."
which matches Volley's behavior. The only contention here seems to be the logspam about the warnings, and given the frequency of reports about it, I suppose we should just go ahead and accept that these invalid date formats are common enough in practice to not be worth logging warnings about.
A pull request would be welcome here. My proposal would be to drop the message to .v (verbose) for 0 and -1 and keep it at .e otherwise, and we can see if that makes folks happy.
When processing the
Expires
header inHttpHeaderParser
, and when the value is invalid it logs an error.https://github.com/google/volley/blob/master/src/main/java/com/android/volley/toolbox/HttpHeaderParser.java#L138
However, Cloudflare often sets this field to
0
or-1
, causing the log to be spammed with warnings. I'd rather see the warning not being logged at all, of a simple filter for0
and-1
.The text was updated successfully, but these errors were encountered: