Skip to content
Snippets Groups Projects
Commit 6c6801af authored by Rodrigo Nascimento's avatar Rodrigo Nascimento
Browse files

Do not try to parse requests with content type

parent 2ba6612f
No related branches found
No related tags found
No related merge requests found
......@@ -8,6 +8,9 @@ WebApp.rawConnectHandlers.use (req, res, next) ->
if req.headers['transfer-encoding'] is undefined and isNaN(req.headers['content-length'])
return next()
if req.headers['content-type'] not in ['', undefined]
return next()
buf = ''
req.setEncoding('utf8')
req.on 'data', (chunk) -> buf += chunk
......@@ -20,6 +23,7 @@ WebApp.rawConnectHandlers.use (req, res, next) ->
catch err
req.body = buf
req._body = true
next()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment