Compare commits

...

2 Commits

Author SHA1 Message Date
Douglas Christopher Wilson
194663a06f 1.1.6 2014-08-10 17:45:04 -04:00
Douglas Christopher Wilson
fd277c695c Fix URL parsing 2014-08-10 17:40:45 -04:00
3 changed files with 15 additions and 6 deletions

View File

@@ -1,3 +1,9 @@
1.1.6 / 2014-08-10
==================
* Fix URL parsing
* deps: parseurl@~1.3.0
1.1.5 / 2014-07-27
==================

View File

@@ -17,13 +17,13 @@
var accepts = require('accepts');
var http = require('http')
, fs = require('fs')
, parse = require('url').parse
, path = require('path')
, normalize = path.normalize
, sep = path.sep
, extname = path.extname
, join = path.join;
var Batch = require('batch');
var parseUrl = require('parseurl');
/*!
* Icon cache.
@@ -94,10 +94,12 @@ exports = module.exports = function serveIndex(root, options){
return;
}
var url = parse(req.url)
, dir = decodeURIComponent(url.pathname)
// parse URLs
var url = parseUrl(req);
var originalUrl = parseUrl.original(req);
var dir = decodeURIComponent(url.pathname)
, path = normalize(join(root, dir))
, originalUrl = parse(req.originalUrl || req.url)
, originalDir = decodeURIComponent(originalUrl.pathname)
, showUp = path != root;

View File

@@ -1,13 +1,14 @@
{
"name": "serve-index",
"description": "Serve directory listings",
"version": "1.1.5",
"version": "1.1.6",
"author": "Douglas Christopher Wilson <doug@somethingdoug.com>",
"license": "MIT",
"repository": "expressjs/serve-index",
"dependencies": {
"accepts": "~1.0.7",
"batch": "0.5.1"
"batch": "0.5.1",
"parseurl": "~1.3.0"
},
"devDependencies": {
"istanbul": "0.3.0",