Skip to content

Commit

Permalink
Fixes a bug in lib/response.js : Convert data to buffer object.
Browse files Browse the repository at this point in the history
  • Loading branch information
milani committed Jun 3, 2012
1 parent b3298ca commit 958a50b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/router/response.js
Expand Up @@ -26,6 +26,11 @@ function Response(callback) {
mime_type = 'text/plain';
}

if(!(data instanceof Buffer)) {
data = new Buffer(data);
}


callback(status,status_text[status],mime_type,data);
}

Expand Down

0 comments on commit 958a50b

Please sign in to comment.