Skip to content
Myr

move getters down

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Tj Holowaychuk · committed by Tj Holowaychuk · parent 08e8194 · Browse files · 1 file+22 added−22 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+22 added−22 removed

  • other:+22 added−22 removed

1 file+22 added−22 removed

modified:lib/request.js+22 added-22 removed
88 unmodified lines
89 return RegExp.$1 || RegExp.$2;90};9192/**93 * Short-hand for `req.connection.encrypted`.94 *95 * @return {Boolean}96 * @api public97 */9899req.__defineGetter__('secure', function(){100 return req.connection.encrypted;101});102103/**104 * Short-hand for `require('url').parse(req.url).pathname`.105 *106 * @return {String}107 * @api public108 */109110req.__defineGetter__('path', function(){111 return parse(this.url).pathname;112});113114/**93 * Check if the _Accept_ header is present, and includes the given `type`.94 *95 * When the _Accept_ header is not present `true` is returned. Otherwise96 * the given `type` is matched by an exact match, and then subtypes. You
215 unmodified lines
312 return !! ~contentType.indexOf(type);313};314315/**316 * Short-hand for `req.connection.encrypted`.317 *318 * @return {Boolean}319 * @api public320 */321322req.__defineGetter__('secure', function(){323 return req.connection.encrypted;324});325326/**327 * Short-hand for `require('url').parse(req.url).pathname`.328 *329 * @return {String}330 * @api public331 */332333req.__defineGetter__('path', function(){334 return parse(this.url).pathname;335});336337/**338 * Check if the request is fresh, aka339 * Last-Modified and/or the ETag340 * still match.341 *
36 unmodified lines