Closed s25g5d4 closed 6 years ago
Merging #224 into master will not change coverage. The diff coverage is
100%
.
@@ Coverage Diff @@
## master #224 +/- ##
=======================================
Coverage 75.86% 75.86%
=======================================
Files 9 9
Lines 518 518
Branches 117 117
=======================================
Hits 393 393
Misses 45 45
Partials 80 80
Impacted Files | Coverage Δ | |
---|---|---|
lib/ecstatic/etag.js | 80% <100%> (ø) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 609f1c9...1f9984b. Read the comment docs.
Good catch!! I'll try to deploy this this afternoon (new dev environment not 100% set up).
ok, published w/ some other things as 3.2.1.
Cheers!
Hi there. According to RFC7232 section 2.3., a valid etag value should be double-qouted and string between should contains no double quote character itself. While it doesn't seem to break any browser, it is kind of feeling weird each time I inspect the headers when I'm debuging some other things.
There're not much difference after this PR applied. the string is almost the same, only with the double qoutes being removed when converting Date object to plain string. Internally
JSON.stringify()
callsDate.prototype.toJSON()
on Date objects to get a valid JSON representation of its value, andtoJSON()
is implemented to return the returned value ofDate.prototype.toISOString()
. So here I removedJSON.stringify()
and made a direct call totoISOString()
.Headers before patch applied:
Headers after patch applied:
It would be appreciated if you could take a look. Thanks.