Skip to content
Myr

Fix error in req.subdomains on empty host

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

authored by Douglas Christopher Wilson · committed by Douglas Christopher Wilson · parent 7d277c1 · Browse files · 3 files+19 added−11 removed
This commit

State

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

Diff stats

3 files+19 added−11 removed

  • tests:+11 added−11 removed
  • other:+8 added−0 removed

3 files+19 added−11 removed

modified:lib/request.js+3 added
452 unmodified lines
453 */454455req.__defineGetter__('subdomains', function(){456 var host = this.host;457458 if (!host) return [];459460 var offset = this.app.get('subdomain offset');461 var subdomains = !isIP(host)462 ? host.split('.').reverse()463 : [host];
95 unmodified lines
modified:test/req.subdomains.js+11 added-11 removed
modified:History.md+5 added
13.x2===34 * Fix error in `req.subdomains` on empty host563.17.0 / 2014-09-087===================89 * Support IP address host in `req.subdomains`
1745 unmodified lines