express
express copied to clipboard
Add deprecation warning to "Referrer" special-casing
re: https://github.com/expressjs/express/issues/3951
Test plan: npm test
👌👌
@dougwilson thanks for the clarification, and sorry for the delay! I just updated the PR.
Now, if someone calls:
-
req.get('referer')
and receivesthis.headers.referrer
, or -
req.get('referrer')
and receivesthis.headers.referer
…the deprecation notice will print.
I hope that's what you meant re: lifecycles. As far as I can tell, the only other place this special-casing extends to is lib/response.js:750-753
, but since that uses req.get()
it should still flag correctly.
Also worth noting: tests all pass on this commit, but will need to be updated once the special-casing is removed.