res.redirect(undefined) sends invalid Location: undefined header
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.
@efekrskl Please review my PR for this issue.
While it’s not a valid URL, we convert any argument to a string, which is why passing undefined is valid and will trigger a 302.
With the new deprecation, Express v6 is expected to throw an error based on the data type, although it’s still the developer’s responsibility to perform validations for their redirect.
Ref: https://github.com/expressjs/express/issues/6391
Greetings @BOXER78 .. I am interested to work on the issue. Can you please assign me the same please. ThankYou.
@BOXER78 I would like to work on this issue. Please assign this to me /assign