expressjs / expressjs/express

res.redirect(undefined) sends invalid Location: undefined header

Open
#6,941 6 comments 2 reactions 0 assignees Claimed by @bjohansebas View on GitHub
6.x deprecate
Dominant language
JavaScript
Stars
69.5k
Forks
25k
Avg merge
4d 20h
Merged PRs (30d)
9

Description

Calling res.redirect(undefined) currently sends a 302 response with the header Location: undefined. While there is a deprecation warning printed to the console ("Provide a url argument"), the actual HTTP response is malformed because undefined is not a valid URL.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.