visionmedia/express — pull request #1579 by SLaks (2013-04-15 19:42:40+00:00)
Title: Handle missing Host: header

Right now, a request without a `Host:` header (nor `X-Forwarded-Host`) will throw an error every time I access `req.host`.

I fixed that to return an empty string.

This also affects `req.subdomains`.
`"".split(".")` returns `[ "" ]`.
However, since `subdomains` slices the initial portion of the host anyway, this will still correctly return `[]`. (unless `subdomain offset` is `0`)