You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
4.19.0 breaks passing new URL() into res.redirect(...) #5554
Understandably, res.redirect(...) should take a string. But for years we have been successfully passing a new URL(). We can certainly fix this on our side, but wanted to give a heads-up that this change might cause others to run into the same thing.
Can you check the PR to ensure it would cover you? CI is failing because of #5552 but I can merge this all together for the patch if this will fix your report.
Ahah nice. I was hit by this and double checked the documentation. Clearly res.location accepts only a string so I patched my code to pass url.href instead of the url object and I could merge 4.19.0 just to discover a PR upgrading to 4.19.1 moments later for exactly this issue 😊
Activity
wesleytodd commentedon Mar 20, 2024
Ahhhh, yep that is not covered in the tests. I can prep a patch for that.
wesleytodd commentedon Mar 20, 2024
@kavika-1 Do you have a code snippet example of what you are doing so I can make sure this covers your case?
fix #5554 passing URL instances with new locataion encoding
wesleytodd commentedon Mar 20, 2024
Can you check the PR to ensure it would cover you? CI is failing because of #5552 but I can merge this all together for the patch if this will fix your report.
kavika-1 commentedon Mar 20, 2024
Example Code snippet, which should be fixed with this patch, thanks!
fix #5554 passing URL instances with new locataion encoding
fix #5554 passing URL instances with new locataion encoding
wesleytodd commentedon Mar 20, 2024
Published with 4.19.1. Thanks for the quick report, this would certainly have been something lots of folks hit.
kavika-1 commentedon Mar 20, 2024
Amazing turnaround, thanks @wesleytodd!
ddolcimascolo commentedon Mar 21, 2024
Ahah nice. I was hit by this and double checked the documentation. Clearly
res.locationaccepts only a string so I patched my code to passurl.hrefinstead of theurlobject and I could merge 4.19.0 just to discover a PR upgrading to 4.19.1 moments later for exactly this issue 😊Thanks for your reactivity!
Cheers,
David