Skip to content
Browse files

v6.60.3. Bugfix.

- v6.60.3 January 16, 2014
	- Fixed `toUTCString` errors (regression since v6.60.0)
  • Loading branch information...
1 parent 053fffc commit c7e3dc0019bba822e602b88b07441c5c1b738c40 @balupton balupton committed
Showing with 10 additions and 7 deletions.
  1. +4 −1 HISTORY.md
  2. +1 −1 package.json
  3. +5 −5 src/lib/docpad.coffee
View
5 HISTORY.md
@@ -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
View
2 package.json
@@ -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",
View
10 src/lib/docpad.coffee
@@ -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()

0 comments on commit c7e3dc0

Please sign in to comment.
Something went wrong with that request. Please try again.