Hi Guys,
im seeing the below error while using the static middleware on express. if i comment the static middleware app works fine. any clue on whats going on
app.use(express.static(__dirname));
Thank you,
-bala
error trace:
Error: Bad Request
at SendStream.error (/Users/balachandra/Desktop/thply/node_modules/express/node_modules/send/lib/send.js:145:16)
at SendStream.pipe (/Users/balachandra/Desktop/thply/node_modules/express/node_modules/send/lib/send.js:298:31)
at Object.staticMiddleware [as handle] (/Users/balachandra/Desktop/thply/node_modules/express/node_modules/connect/lib/middleware/static.js:84:8)
at next (/Users/balachandra/Desktop/thply/node_modules/express/node_modules/connect/lib/proto.js:190:15)
at multipart (/Users/balachandra/Desktop/thply/node_modules/express/node_modules/connect/lib/middleware/multipart.js:64:37)
at /Users/balachandra/Desktop/thply/node_modules/express/node_modules/connect/lib/middleware/bodyParser.js:57:9
at urlencoded (/Users/balachandra/Desktop/thply/node_modules/express/node_modules/connect/lib/middleware/urlencoded.js:51:37)
at /Users/balachandra/Desktop/thply/node_modules/express/node_modules/connect/lib/middleware/bodyParser.js:55:7
at json (/Users/balachandra/Desktop/thply/node_modules/express/node_modules/connect/lib/middleware/json.js:53:37)
at Object.bodyParser [as handle] (/Users/balachandra/Desktop/thply/node_modules/express/node_modules/connect/lib/middleware/bodyParser.js:53:5)
at next (/Users/balachandra/Desktop/thply/node_modules/express/node_modules/connect/lib/proto.js:190:15)
at Object.expressInit [as handle] (/Users/balachandra/Desktop/thply/node_modules/express/lib/middleware.js:30:5)
at next (/Users/balachandra/Desktop/thply/node_modules/express/node_modules/connect/lib/proto.js:190:15)
at Object.query [as handle] (/Users/balachandra/Desktop/thply/node_modules/express/node_modules/connect/lib/middleware/query.js:44:5)
at next (/Users/balachandra/Desktop/thply/node_modules/express/node_modules/connect/lib/proto.js:190:15)
at Function.app.handle (/Users/balachandra/Desktop/thply/node_modules/express/node_modules/connect/lib/proto.js:198:3)
at Server.app (/Users/balachandra/Desktop/thply/node_modules/express/node_modules/connect/lib/connect.js:65:37)
at Server.EventEmitter.emit (events.js:98:17)
at HTTPParser.parser.onIncoming (http.js:2045:12)
at HTTPParser.parserOnHeadersComplete [as onHeadersComplete] (http.js:119:23)
at Socket.socket.ondata (http.js:1935:22)
at TCP.onread (net.js:524:27)
Hi Guys,
im seeing the below error while using the static middleware on express. if i comment the static middleware app works fine. any clue on whats going on
Thank you,
-bala
error trace: