Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixed error when http1.0 is used (no host header)

  • Loading branch information...
commit 1b7528da7c464aa49c7c7d1a627254c369bcb043 1 parent c05a97a
@coolaj86 authored
Showing with 2 additions and 2 deletions.
  1. +1 −1  connect-nowww/index.js
  2. +1 −1  connect-nowww/package.json
View
2  connect-nowww/index.js
@@ -3,7 +3,7 @@
function nowww(req, res, next) {
var match
- , host = req.headers.host.replace(/^www\./, '')
+ , host = (req.headers.host||'').replace(/^www\./, '')
, hostname = host.split(':')[0]
, protocol = 'http' + (req.connection.encrypted ? 's' : '') + '://'
, href = protocol + host + req.url
View
2  connect-nowww/package.json
@@ -12,5 +12,5 @@
, "dependencies": {
}
, "main": "index"
- , "version": "1.1.0"
+ , "version": "1.1.1"
}
Please sign in to comment.
Something went wrong with that request. Please try again.