Skip to content
Myr

Fix original URL parsing in res.location

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 4a4ca73 · Browse files · 2 files+3 added−1 removed
This commit

State

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

Diff stats

2 files+3 added−1 removed

  • other:+3 added−1 removed

2 files+3 added−1 removed

modified:lib/response.js+2 added-1 removed
2 unmodified lines
3 */45var deprecate = require('depd')('express');6var escapeHtml = require('escape-html');7var parseUrl = require('parseurl');8var vary = require('vary');9var http = require('http')10 , path = require('path')11 , connect = require('connect')
681 unmodified lines
693 // relative694 if (!~url.indexOf('://') && 0 != url.indexOf('//')) {695 // relative to path696 if ('.' == url[0]) {696 path = req.originalUrl.split('?')[0];697 path = parseUrl.original(req).pathname;698 path = path + ('/' == path[path.length - 1] ? '' : '/');699 url = resolve(path, url);700 // relative to mount-point701 } else if ('/' != url[0]) {
128 unmodified lines
modified:History.md+1 added
13.x2===34 * Fix original URL parsing in `res.location`5 * deps: connect@2.25.46 - Fix `query` middleware breaking with argument7 - deps: body-parser@~1.6.38 - deps: compression@~1.0.11
1650 unmodified lines