-
Notifications
You must be signed in to change notification settings - Fork 194
Open
Description
Lines 23 to 31 in ae7a39b
| return path.normalize(pieces.map((rawPiece) => { | |
| const piece = decodeURIComponent(rawPiece); | |
| if (process.platform === 'win32' && /\\/.test(piece)) { | |
| throw new Error('Invalid forward slash character'); | |
| } | |
| return piece; | |
| }).join('/')); |
Windows pathname parsing is incorrect
Lines 393 to 399 in ae7a39b
| if (!pathname.match(/\/$/)) { | |
| res.statusCode = 302; | |
| const q = parsed.query ? `?${parsed.query}` : ''; | |
| res.setHeader('location', `${parsed.pathname}/${q}`); | |
| res.end(); | |
| return; | |
| } |
Or modify here to
if (!parsed.pathname.match(/\/$/)) {
res.statusCode = 302;
const q = parsed.query ? `?${parsed.query}` : '';
res.setHeader('location', `${parsed.pathname}/${q}`);
res.end();
return;
}cedx, joshtynjala, jens1101, fenwick67 and beiguancyc
Metadata
Metadata
Assignees
Labels
No labels