fix text responders not sending body

This commit is contained in:
Sami Samhuri 2011-06-05 10:53:20 -07:00
parent 160300f39b
commit f2ab481b6f

View file

@ -131,7 +131,7 @@ function parseRefSpec(spec) {
}
function textResponder(status, text) {
var headers = { 'content-type': 'text/plain', 'content-length': (text || ''.length) }
var headers = { 'content-type': 'text/plain', 'content-length': (text || '').length }
return function(req, res) {
res.writeHead(status, headers)
res.end(text)