use req.header for restify compatiblity and fix edge case on buffered parser