Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Clarify Content-Type handling, pre and postpend.

  • Loading branch information...
commit e4cabfb75f18748e13fdde8d8bf7ab50dd76438b 1 parent 805f750
@reid authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 lib/onyx.js
View
6 lib/onyx.js
@@ -245,11 +245,17 @@ proto.handle = function (status, baton, cb) {
* correctly: your callback should call next(err) if an
* error occurred, instead of calling res.end.
*
+ * The implementation assumes text files are UTF-8 encoded
+ * for the purpose of setting the Content-Type header; however,
+ * the file contents are sent unchanged byte-for-byte.
+ *
* The baton argument should be an object with the properties:
*
* - req: HTTP request.
* - res: HTTP response.
* - files: Array of files.
+ * - prepend: String to send before the file contents.
+ * - postpend: String to send after the file contents.
*
* @method streamFiles
* @param {Object} baton A baton.
Please sign in to comment.
Something went wrong with that request. Please try again.