Skip to content

Commit

Permalink
v6.60.3. Bugfix.
Browse files Browse the repository at this point in the history
- v6.60.3 January 16, 2014
	- Fixed `toUTCString` errors (regression since v6.60.0)
  • Loading branch information
balupton committed Jan 18, 2014
1 parent 053fffc commit c7e3dc0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
5 changes: 4 additions & 1 deletion HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# History

- v6.60.3 January 16, 2014
- Fixed `toUTCString` errors (regression since v6.60.0)

- v6.60.2 January 16, 2014
- Don't include `--save-dev` when installing plugins (regresion since v6.59.3)
- Don't include `--save-dev` when installing plugins (regression since v6.59.3)

- v6.60.1 January 16, 2014
- Updated dependencies
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"title": "DocPad. Streamlined web development.",
"name": "docpad",
"version": "6.60.2",
"version": "6.60.3",
"description": "DocPad is a next generation web architecture that lets you create fast static websites with dynamic abilities and powerful abstractions. Write your website as files on your computer, entries in a database, or even RSS feeds and DocPad will import it, generate & render it, then output a static website for deployment anywhere or a dynamic node website for advanced server-side functionality. Use it as a module or standalone. It's purely awesome. Check it out.",
"homepage": "http://docpad.org",
"installUrl": "http://docpad.org/install",
Expand Down
10 changes: 5 additions & 5 deletions src/lib/docpad.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -4509,14 +4509,14 @@ class DocPad extends EventEmitterGrouped

else
# ETag: `"<size>-<mtime>"`
ctime = document.get('date') # use the date or mtime
mtime = document.get('wtime') # use the last generate time
ctime = document.get('date') # use the date or mtime, it should always exist
mtime = document.get('wtime') # use the last generate time, it may not exist though
stat = document.getStat()
res.setHeaderIfMissing('ETag', '"' + stat.size + '-' + Number(mtime) + '"')
res.setHeaderIfMissing('ETag', '"' + stat.size + '-' + Number(mtime) + '"') if mtime

# Date
res.setHeaderIfMissing('Date', ctime.toUTCString())
res.setHeaderIfMissing('Last-Modified', mtime.toUTCString())
res.setHeaderIfMissing('Date', ctime.toUTCString()) if ctime
res.setHeaderIfMissing('Last-Modified', mtime.toUTCString()) if mtime

# Send
content = document.getOutContent()
Expand Down

0 comments on commit c7e3dc0

Please sign in to comment.