Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fixed an issue with content type being looked up twice #273

Merged
merged 2 commits into from

2 participants

@ncrohn

There was a problem with the content type being set incorrectly after being looked up twice.

Initially looked up here: https://github.com/bevry/docpad/blob/master/src/lib/models/document.coffee#L363

Then looked up again from running: https://github.com/bevry/docpad/blob/master/src/lib/docpad.coffee#L2550

The contentType method provided by Express just calls mime.lookup and fails on files like JavaScript which the mime type doesn't match on application/javascript.

@balupton
Owner

Nice find :) Will pull in the next batch :)

@balupton
Owner

Merged into dev :) Will post back once published

@balupton balupton merged commit a2fb5f4 into docpad:master
@balupton
Owner

Published to DocPad v6.5.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 21, 2012
  1. @ncrohn
  2. @ncrohn

    Fixed tabs

    ncrohn authored
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  src/lib/docpad.coffee
View
2  src/lib/docpad.coffee
@@ -2547,7 +2547,7 @@ class DocPad extends EventEmitterEnhanced
# Content Type
contentType = document.get('contentTypeRendered') or document.get('contentType')
- res.contentType(contentType)
+ res.setHeader('Content-Type', contentType);
# Send
dynamic = document.get('dynamic')
Something went wrong with that request. Please try again.