Skip to content
Browse files

Clarify Content-Type handling, pre and postpend.

  • Loading branch information...
1 parent 805f750 commit e4cabfb75f18748e13fdde8d8bf7ab50dd76438b @reid reid committed Sep 6, 2011
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.

0 comments on commit e4cabfb

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