Skip to content
Browse files

req.setEncoding "utf8"

  • Loading branch information...
1 parent 2192fb4 commit cd8b96f6bd037d104036101bedc65f05bc309055 @rsms committed Mar 20, 2011
Showing with 1 addition and 0 deletions.
  1. +1 −0 connect_json.mv
View
1 connect_json.mv
@@ -28,6 +28,7 @@ connect_json = ^(req, res, next) {
}
if (ct && ct.indexOf('application/json') == 0) {
buffer = ''
+ req.setEncoding 'utf8'
req.on 'data', ^(chunk) {
if (buffer.length + chunk.length > length) {
# Kill the connection on suspected buffer overflow attempt

0 comments on commit cd8b96f

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