Skip to content

Commit

Permalink
Fix parsing original URL
Browse files Browse the repository at this point in the history
  • Loading branch information
dougwilson committed Aug 11, 2014
1 parent 7d64dd1 commit 9020fea
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions History.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
unreleased
==========

* Fix parsing original URL
* deps: on-headers@~1.0.0
* deps: parseurl@~1.3.0

1.7.4 / 2014-08-05
==================
Expand Down
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
var cookie = require('cookie');
var debug = require('debug')('express-session');
var deprecate = require('depd')('express-session');
var parseUrl = require('parseurl');
var uid = require('uid-safe').sync
, onHeaders = require('on-headers')
, crc32 = require('buffer-crc32')
, parse = require('url').parse
, signature = require('cookie-signature')

var Session = require('./session/session')
Expand Down Expand Up @@ -138,7 +138,7 @@ function session(options){
if (!storeReady) return debug('store is disconnected'), next();

// pathname mismatch
var originalPath = parse(req.originalUrl || req.url).pathname;
var originalPath = parseUrl.original(req).pathname;
if (0 != originalPath.indexOf(cookie.path || '/')) return next();

// backwards compatibility for signed cookies
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"debug": "1.0.4",
"depd": "0.4.4",
"on-headers": "~1.0.0",
"parseurl": "~1.3.0",
"uid-safe": "1.0.1",
"utils-merge": "1.0.0"
},
Expand Down

0 comments on commit 9020fea

Please sign in to comment.