pushd
pushd copied to clipboard
Invalid byte error when posting event with pushd bound to localhost
When attempting to post an event to pushd with it listening on localhost, I encountered this error (traceback follows). Forcing pushd to bind to my machine's local IP and posting the event to that address succeeded.
::ffff:127.0.0.1 - - [Fri, 15 May 2015 21:39:10 GMT] "POST /event/asdf HTTP/1.1" 500 2096 "-" "curl/7.38.0"
Error: Invalid byte: ::ffff:127
at ip2long (/home/gauthier/work/git/projects/pushd/node_modules/netmask/lib/netmask.js:19:44)
at Netmask.contains (/home/gauthier/work/git/projects/pushd/node_modules/netmask/lib/netmask.js:88:17)
at /home/gauthier/work/git/projects/pushd/pushd.coffee:119:32
at callbacks (/home/gauthier/work/git/projects/pushd/node_modules/express/lib/router/index.js:164:37)
at param (/home/gauthier/work/git/projects/pushd/node_modules/express/lib/router/index.js:138:11)
at paramCallback (/home/gauthier/work/git/projects/pushd/node_modules/express/lib/router/index.js:150:30)
at /home/gauthier/work/git/projects/pushd/pushd.coffee:91:9
at paramCallback (/home/gauthier/work/git/projects/pushd/node_modules/express/lib/router/index.js:151:7)
at param (/home/gauthier/work/git/projects/pushd/node_modules/express/lib/router/index.js:133:11)
at pass (/home/gauthier/work/git/projects/pushd/node_modules/express/lib/router/index.js:145:5)
at Router._dispatch (/home/gauthier/work/git/projects/pushd/node_modules/express/lib/router/index.js:173:5)
at Object.router (/home/gauthier/work/git/projects/pushd/node_modules/express/lib/router/index.js:33:10)
at next (/home/gauthier/work/git/projects/pushd/node_modules/express/node_modules/connect/lib/proto.js:169:15)
at Object.jsonParser [as handle] (/home/gauthier/work/git/projects/pushd/node_modules/body-parser/lib/types/json.js:80:27)
at next (/home/gauthier/work/git/projects/pushd/node_modules/express/node_modules/connect/lib/proto.js:169:15)
at /home/gauthier/work/git/projects/pushd/node_modules/body-parser/lib/read.js:107:5
at IncomingMessage.onEnd (/home/gauthier/work/git/projects/pushd/node_modules/body-parser/node_modules/raw-body/index.js:136:7)
at IncomingMessage.g (events.js:199:16)
at IncomingMessage.emit (events.js:104:17)
at _stream_readable.js:908:16
at process._tickCallback (node.js:355:11)
Probably the same error as in https://github.com/rs/pushd/issues/112
Try the first solution (comment everyhting of acl, auth and admin on settings), that worked for me
Found a workaround, https://github.com/rs/node-netmask/pull/23