4 ms·
That's a good one. Since legacy code is less likely to change than the English language, I just call it a "referer" in writing unrelated to HTTP. That way, I'
by jrockway 5y ago
That's a good one. Since legacy code is less likely to change than the English language, I just call it a "referer" in writing unrelated to HTTP. That way, I'm never confused. (Everyone else? Good luck.)
- inopinatus 5y agoI once saw this implemented as a regex. Unfortunately the regex was refer*er. “Tests pass, ship it”
- exikyut 5y agoThe tests clearly did not include spinning up an HTTP server and actually using the correctly-spelled header (as per correct English), then.
- dqv 5y agoI don't know enough about overflows, but that could theoretically be exploited, right? referrrrrrrrrrrrrrrrrrrrrrrrrrrer
- zeusk 5y agoinb4 refeer (should've used referr?er)
- xmprt 5y agoI also feel like this is a buffer overflow waiting to happen. If somehow someone makes the header length way longer than expected (eg. referrrrrrrrrrrrrrer).
- jsjohnst 5y ago? is 0 or 1 instances of the preceding character, so referrrrrrrrrrrrrrer wouldn’t match /referr?er/, only referer or referrer. Proof: https://regex101.com/r/s56ebD/1 https://regex101.com/r/s56ebD/1
- xmprt 5y agoI'm replying to the grandparent comment. I said "Also" meaning I was adding onto your comment.
- dhosek 5y agoI used to do technical writing and for some software that I wrote the manual and help system for, one of the menu items was misspelled. I spelled the word correctly in the text describing its functionality, but whenever I referred (so to speak) to it directly as the menu item to be selected, I kept the misspelling (this was the early 90s, the days of people saying non-ironically that they couldn't find the "any" key on their computer).
- grenoire 5y agoPretty sure people still can't find the any key, we just stopped asking them to!
- curryst 5y agoYep, I get some prompts now that say "Press the $X key" (often space), but will actually proceed if you hit any key. It always give me a touch of chuckles when I think about why they named a specific key then.
- deleted 5y ago[deleted]