Closed
Bug 633747
Opened 14 years ago
Closed 8 years ago
about:cache displays "Expires: 1970-01-01 01:00:00"
Categories
(Core :: Networking: Cache, defect)
Core
Networking: Cache
Tracking
()
RESOLVED
FIXED
mozilla55
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: steffen.wilberg, Assigned: amar.lakshya)
References
()
Details
(Whiteboard: [necko-active][good first bug])
Attachments
(2 files, 1 obsolete file)
about:cache?device=disk displays a lot of cache entries with expiry date 1970-01-01 01:00:00.
about:cache?device=memory displays this for every single entry.
I clicked on a few entries and came across the following response headers:
Pragma: no-cache
Expires: 0
Expires: -1
Cache-Control: max-age=0
Cache-Control: private, max-age=0
Cache-Control: no-cache, must-revalidate
I assume those files are in the cache in order to use them if the server says that they haven't changed.
So what should be displayed in the Expires column?
"expired"? "immediately"?
Should we hide the Expires column for about:cache?device=memory ?
Comment 1•14 years ago
|
||
Why should this be a bug ?
Dates in the past always suggest that they are already expired and "1970-01-01 01:00:00" is the unix time zero.
Reporter | ||
Comment 2•14 years ago
|
||
1970-01-01 01:00:00 is an implementation detail which most of the users, even those looking at about:cache, don't understand.
Heck, even I don't fully understand what's going on with these cache entries, see comment 0 ("I assume..."). A document can't expire decades before it was created, or personal computers, let alone the internet existed. And this usually happens with pages created by the server mere seconds ago (e.g. all files from hg.mozilla.org, including css, js and png files, wtf?).
It's not even a proper date, it's just 0. Interpreting that as a date is bogus.
"1970-01-01 01:00:00" is gibberish. It should say "expired", or "immediately", or whatever it means: I don't really know, see above.
Updated•9 years ago
|
Whiteboard: [necko-would-take][good first bug]
Comment 3•9 years ago
|
||
If I look the detailed view and find that this is leveled as a "secure document" I'm not so sure that it's not a bug. I attach a screenshot.
Are all the user that have this "mac-User"?
On the mac is 01.01.1970 the fullback date if your internal clock don't works (battery fail).
Comment 4•9 years ago
|
||
Comment 5•8 years ago
|
||
I recvd the following email - but the comment and attachment do not appear in this bug.
amar.lakshya@xaviers.edu.in has asked Patrick McManus [:mcmanus]
<mcmanus@ducksong.com> for review:
Bug 633747: about:cache displays "Expires: 1970-01-01 01:00:00"
https://bugzilla.mozilla.org/show_bug.cgi?id=633747
Attachment 8861968: about:cache now shows "Expired Immediately"
https://bugzilla.mozilla.org/attachment.cgi?id=8861968&action=edit
Review
https://bugzilla.mozilla.org/page.cgi?id=splinter.html&bug=633747&attachment=8861968
--- Comment #5 from amar.lakshya@xaviers.edu.in ---
Created attachment 8861968
--> https://bugzilla.mozilla.org/attachment.cgi?id=8861968&action=edit
about:cache now shows "Expired Immediately"
Comment hidden (mozreview-request) |
Assignee | ||
Comment 7•8 years ago
|
||
(In reply to Patrick McManus [:mcmanus] from comment #5)
> I recvd the following email - but the comment and attachment do not appear
> in this bug.
>
> amar.lakshya@xaviers.edu.in has asked Patrick McManus [:mcmanus]
> <mcmanus@ducksong.com> for review:
> Bug 633747: about:cache displays "Expires: 1970-01-01 01:00:00"
> https://bugzilla.mozilla.org/show_bug.cgi?id=633747
>
> Attachment 8861968: about:cache now shows "Expired
> Immediately"
> https://bugzilla.mozilla.org/attachment.cgi?id=8861968&action=edit
> Review
> https://bugzilla.mozilla.org/page.cgi?id=splinter.
> html&bug=633747&attachment=8861968
>
>
> --- Comment #5 from amar.lakshya@xaviers.edu.in ---
> Created attachment 8861968
> --> https://bugzilla.mozilla.org/attachment.cgi?id=8861968&action=edit
> about:cache now shows "Expired Immediately"
Sorry, I am quite new, in-fact this is my first Bug. I think I did send you the review request on the reviewboard? I can't seem to understand what you meant by your comment?
Updated•8 years ago
|
Attachment #8862041 -
Flags: review?(mcmanus) → review?(honzab.moz)
Comment 8•8 years ago
|
||
> Sorry, I am quite new, in-fact this is my first Bug. I think I did send you
> the review request on the reviewboard? I can't seem to understand what you
> meant by your comment?
no worries - thanks for the patch (I've asked Honza to look at it). I suspect you bumped into a bug in reviewboard or bugzilla, your review request didn't show up in the bug until 30 minutes after I commented on it and had received the review email. Its all good now :)
![]() |
||
Updated•8 years ago
|
Assignee: nobody → amar.lakshya
Whiteboard: [necko-would-take][good first bug] → [necko-active][good first bug]
![]() |
||
Comment 9•8 years ago
|
||
mozreview-review |
Comment on attachment 8862041 [details]
Bug 633747 - about:cache displays "Expires: 1970-01-01 01:00:00"
https://reviewboard.mozilla.org/r/134010/#review137738
thanks.
the 0x4D58 magic needs an explanation (in a code comment).
I'd give f+ but rb doesn't allow that. I'll happily review this again on the next iteration.
::: netwerk/protocol/about/nsAboutCacheEntry.cpp:442
(Diff revision 1)
> PrintTimeString(timeBuf, sizeof(timeBuf), u);
> APPEND_ROW("expires", timeBuf);
> - } else {
> + } else {
> - APPEND_ROW("expires", "No expiration time");
> + APPEND_ROW("expires", "No expiration time");
> - }
> + }
> + }
keep the style strictly as:
if (cond) {
} else if (cond2) {
}
Attachment #8862041 -
Flags: review?(honzab.moz) → review-
Comment hidden (mozreview-request) |
![]() |
||
Comment 11•8 years ago
|
||
mozreview-review |
Comment on attachment 8862041 [details]
Bug 633747 - about:cache displays "Expires: 1970-01-01 01:00:00"
https://reviewboard.mozilla.org/r/134010/#review138526
please fix as commented. please make sure a try build passes for this patch. thanks.
::: commit-message-f229b:1
(Diff revision 2)
> +Bug 633747 - about:cache displays "Expires: 1970-01-01 01:00:00" r?mayhemer
change the message to a description of what the patch does
::: netwerk/protocol/about/nsAboutCache.cpp:502
(Diff revision 2)
> + // However, that time is in local time(Africa in the bug).
> + // variable 'mExpirationTime' gets the conversion:
> + // 1970-01-01 01:00:00 --> 1970-01-01 00:00:00 GMT which is 0 in hex
> + // So, 0 represents the UNIX timestamp 1970-01-01 00:00:00 GMT.
> + // We just find out if the expiration time is equal
> + // to 0 and if so, we simply show "expired immediately"
I think a simple 'when expiration time is 0, we show 1970-01-01 01:00:00 which is confusing.' would do.
::: netwerk/protocol/about/nsAboutCacheEntry.cpp:439
(Diff revision 2)
> + // variable 'u' gets the conversion:
> + // 1970-01-01 01:00:00 --> 1970-01-01 00:00:00 GMT which is 0 in hex
> + // So, 0 represents the UNIX timestamp 1970-01-01 00:00:00 GMT.
> + // We just find out if the expiration time is equal
> + // to 0 and if so, we simply show "expired immediately"
> + if (u == 0) {
same here
Attachment #8862041 -
Flags: review?(honzab.moz) → review+
Comment hidden (mozreview-request) |
![]() |
||
Comment 13•8 years ago
|
||
mozreview-review |
Comment on attachment 8863784 [details]
Bug 633747 - about:cache now displays 'Expired Immediately' for 1970-01-01 01:00:00
https://reviewboard.mozilla.org/r/135540/#review138552
Attachment #8863784 -
Flags: review?(honzab.moz) → review+
Assignee | ||
Updated•8 years ago
|
Status: NEW → ASSIGNED
Keywords: checkin-needed
Comment 14•8 years ago
|
||
MozReview says that this patch doesn't have the necessary reviews needed to Autoland it.
Keywords: checkin-needed
Assignee | ||
Comment 15•8 years ago
|
||
(In reply to Ryan VanderMeulen [:RyanVM] from comment #14)
> MozReview says that this patch doesn't have the necessary reviews needed to
> Autoland it.
I am sorry I am new, but what will I have to do to get the necessary reviews? I have already got an r+ from my reviewer and there seems to be 0 open issues. Could you help please?
Reporter | ||
Updated•8 years ago
|
Attachment #8862041 -
Attachment is obsolete: true
Reporter | ||
Comment 16•8 years ago
|
||
(In reply to Ryan VanderMeulen [:RyanVM] from comment #14)
> MozReview says that this patch doesn't have the necessary reviews needed to
> Autoland it.
This seems like a bug in MozReview since the patch has r+ by :mayhemer, who is a Necko peer.
I filed bug 1362157 for that.
Keywords: checkin-needed
Comment 17•8 years ago
|
||
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/8155ff5b98d8
about:cache displays "Expires: 1970-01-01 01:00:00" r=mayhemer
https://hg.mozilla.org/integration/autoland/rev/f13ecab9206e
about:cache now displays 'Expired Immediately' for 1970-01-01 01:00:00 r=mayhemer
Keywords: checkin-needed
Comment 18•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/8155ff5b98d8
https://hg.mozilla.org/mozilla-central/rev/f13ecab9206e
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in
before you can comment on or make changes to this bug.
Description
•