req/res prototype extensions extracted from express.js