Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

add missing 'content-length' header for HTTP responses. #17

Merged
merged 1 commit into from

2 participants

Jed Schmidt Mikeal Rogers
Jed Schmidt

according to the README,

Not only does the JSON file get streamed to the HTTP Response it will include an Etag, Last-Modified, Content-Length, and a Content-Type header based on the filed extension.

but only three of these headers are being sent right now; Content-Length is missing.

Mikeal Rogers
Owner

how did i miss this!

Mikeal Rogers mikeal merged commit db514b9 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 29, 2012
  1. Jed Schmidt
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 0 deletions.
  1. +1 −0  main.js
1  main.js
View
@@ -135,6 +135,7 @@ function File (options) {
self.dest.setHeader('content-type', self.mimetype)
self.dest.setHeader('etag', self.etag)
self.dest.setHeader('last-modified', self.lastmodified)
+ self.dest.setHeader('content-length', stats.size)
fs.createReadStream(self.path).pipe(self.dest)
return
}
Something went wrong with that request. Please try again.