Skip to content
Myr

Fix Windows absolute path check using forward slashes

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

closes #3017

authored by huaoguo · committed by Douglas Christopher Wilson · parent 999546d · Browse files · 3 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

3 files+3 added−1 removed

  • tests:+1 added−0 removed
  • other:+2 added−1 removed

3 files+3 added−1 removed

modified:lib/utils.js+1 added-1 removed
65 unmodified lines
66 */6768exports.isAbsolute = function(path){69 if ('/' === path[0]) return true;70 if (':' === path[1] && '\\' === path[2]) return true;70 if (':' === path[1] && ('\\' === path[2] || '/' === path[2])) return true; // Windows device path71 if ('\\\\' === path.substring(0, 2)) return true; // Microsoft Azure absolute path72};7374/**
225 unmodified lines
modified:test/utils.js+1 added
modified:History.md+1 added
1unreleased2==========34 * Fix Windows absolute path check using forward slashes5 * Improve performance for `res.json`/`res.jsonp` in most cases6 * deps: accepts@~1.3.37 - Fix including type extensions in parameters in `Accept` parsing8 - Fix parsing `Accept` parameters with quoted equals
3094 unmodified lines