vol4ok / hogan-express

Mustache template engine for express 3.x. Support partials and layout
MIT License
138 stars 31 forks source link

DEBUG: Error: Can't set headers after they are sent. #1

Closed jbolila closed 12 years ago

jbolila commented 12 years ago

Hi,

I'm getting this error message, but the template is rendered without any apparent problem.

DEBUG: Error: Can't set headers after they are sent.
    at ServerResponse.OutgoingMessage.setHeader (http.js:644:11)
    at ServerResponse.res.setHeader (/Users/../node_modules/express/node_modules/connect/lib/patch.js:59:22)
    at ServerResponse.module.exports [as send] (/Users/../node_modules/express/node_modules/response-send/lib/response-send.js:60:14)
    at res.render.fn (/Users/../node_modules/express/lib/response.js:597:10)
    at render (/Users/../node_modules/hogan-express/hogan-express.js:120:18)
    at read (/Users/../node_modules/hogan-express/hogan-express.js:37:12)
    at fs.readFile (fs.js:176:14)
    at Object.oncomplete (fs.js:297:15)

I can't find the issue in the code.

And congratulations for this nice module.

vol4ok commented 12 years ago

Can you show your code that cause this error? And what version of node did you use?

jbolila commented 12 years ago

Sorry, this problem no longer occurs. Don't know why.

but for reference the node is v0.8.3 and express 3.0.0beta7