LearnBoost/node-canvas — Issue #127: minor test-server problems
Author: donpark
Created: 2011-11-03 17:04:27+00:00
State: open

Running on Node v0.4.12 with

$ npm ls
canvas@0.8.1 /Users/don/dev/src/nodejs/node-canvas
├─┬ express@2.5.0
│ ├── connect@1.7.2
│ ├── mime@1.2.4
│ ├── mkdirp@0.0.7
│ └── qs@0.3.1
└─┬ jade@0.16.4
├── commander@0.2.1
└── mkdirp@0.0.7

After installing `express` and `jade`

$ make test-server
Test server listening on port 3000
...
} has no method 'response-timems'
at anonymous (eval at compile (/Users/don/dev/src/nodejs/node-canvas/node_modules/express/node_modules/connect/lib/middleware/logger.js:172:10))
...
undefined:7
+ (tokens["response-timems"](req, res, "undefined") || "-") + "";
...

Commenting out following line in `test/server.js` removed the problem.

app.use(express.logger({ format: '\x1b[90m:remote-addr\x1b[0m - \x1b[33m:method\x1b[0m :url :status \x1b[90m:response-timems\x1b[0m' }));

And revealed another minor issue:

$ make test-server
Test server listening on port 3000
http.js:14617: Uncaught Error: Can't set headers after they are sent.
http.js:14617: Uncaught Error: Can't set headers after they are sent.
http.js:14617: Uncaught Error: Can't set headers after they are sent.