Skip to content

Commit

Permalink
removed old req.get() for now
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Feb 7, 2012
1 parent 27e696b commit 8c2c124
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions lib/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,32 +60,6 @@ req.get = function(name){
}
};

/**
* Get `field`'s `param` value, defaulting to ''.
*
* Examples:
*
* req.get('content-disposition', 'filename');
* // => "something.png"
*
* req.get('content-disposition', 'rawr');
* // => ""
*
* @param {String} field
* @param {String} param
* @return {String}
* @api public
*/

// req.get = function(field, param){
// // TODO: rename... add tests, make .get() .header()
// var val = this.header(field);
// if (!val) return '';
// var regexp = new RegExp(param + ' *= *(?:"([^"]+)"|([^;]+))', 'i');
// if (!regexp.exec(val)) return '';
// return RegExp.$1 || RegExp.$2;
// };

/**
* Check if the given `type` is acceptable,
* otherwise you should respond with 406 "Not Acceptable".
Expand Down

0 comments on commit 8c2c124

Please sign in to comment.