Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(162)

Issue 2698773005: document.lastModified: treat invalid dates like unknown ones. (Closed)

Created:
3 years, 10 months ago by sof
Modified:
3 years, 10 months ago
Reviewers:
Mike West, foolip
CC:
chromium-reviews, eae+blinkwatch, blink-reviews-dom_chromium.org, dglazkov+blink, blink-reviews, rwlbuis
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

document.lastModified: treat invalid dates like unknown ones. If the value supplied via Last-Modified: is unparseable, treat the modification date as unknown and return the current time (rather than 00-00-0000 00:00:00) This aligns behavior with all other browsers. R=foolip BUG=693053 Review-Url: https://codereview.chromium.org/2698773005 Cr-Commit-Position: refs/heads/master@{#451123} Committed: https://chromium.googlesource.com/chromium/src/+/de777ac871873450a4cb4b77c9b2fa7bdc3be990

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+21 lines, -4 lines) Patch
M third_party/WebKit/LayoutTests/http/tests/misc/last-modified-parsing.html View 2 chunks +3 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/misc/last-modified-parsing-expected.txt View 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/resources/last-modified.php View 1 chunk +7 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/dom/Document.cpp View 1 chunk +6 lines, -3 lines 0 comments Download

Messages

Total messages: 14 (8 generated)
sof
please take a look. A simple omission in the implementation, everyone else handles this better.
3 years, 10 months ago (2017-02-16 19:15:53 UTC) #4
foolip
lgtm, I guess there isn't a spec that explicitly says that one shouldn't invent a ...
3 years, 10 months ago (2017-02-16 19:22:08 UTC) #5
sof
On 2017/02/16 19:22:08, foolip wrote: > lgtm, I guess there isn't a spec that explicitly ...
3 years, 10 months ago (2017-02-16 19:31:38 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2698773005/1
3 years, 10 months ago (2017-02-16 21:33:35 UTC) #10
commit-bot: I haz the power
Committed patchset #1 (id:1) as https://chromium.googlesource.com/chromium/src/+/de777ac871873450a4cb4b77c9b2fa7bdc3be990
3 years, 10 months ago (2017-02-16 22:32:22 UTC) #13
foolip
3 years, 10 months ago (2017-02-17 03:33:55 UTC) #14
Message was sent while issue was closed.
On 2017/02/16 19:31:38, sof wrote:
> On 2017/02/16 19:22:08, foolip wrote:
> > lgtm, I guess there isn't a spec that explicitly says that one shouldn't
> invent
> > a date 00-00-0000 00:00:00 in this situation?
> 
> Not directly per https://html.spec.whatwg.org/#dom-document-lastmodified , but
> the response payload didn't include a valid Last-Modified: (
> https://tools.ietf.org/html/rfc7232#section-2.2 ), hence it shouldn't be
> considered & the modification date is unknown. I think that's a reasonable
> interpretation.

Yeah, https://html.spec.whatwg.org/#dom-document-lastmodified is clear enough on
this point. (Didn't check it before.)

Powered by Google App Engine
This is Rietveld 408576698