Rails supports both request.referer and request.referrer, and after perusing our codebase we discovered that we're using both. It would be great to have a cop to enforce one or the other for the sake of consistency.
Isn't referrer the only correct spelling of the word? :-) Yeah, guess we can have a cop for this. PR welcome!
Haha, well technically speaking... https://en.wikipedia.org/wiki/HTTP_referer#Etymology
Good to know! :-)
@mockdeep, based on the wiki article, this is quite interesting. It appears that the misspelling has become the standard. It raises an interesting question of if referer or referrer should be used. I wonder which spelling other common libraries and frameworks prefer.
@rrosenblum something tells me it isn't very consistently spelled anywhere, though I think we'd go with referer in our codebase just for consistency with the spec.
I could see it being a configurable cop, though, so people can pick their flavor.
I think we'd go with
refererin our codebase
I could see it being a configurable cop
I was thinking the same things.
Nice, thanks!
Oh, the confusion: https://www.w3.org/TR/html5/links.html#link-type-noreferrer 馃槅
[鈥 the user agent must not include a
Referer(sic) HTTP header [鈥
Old issue I know however, this one killed my flow 馃槀 a cop against something like this is imho, useless! and it wants the incorrect spelling of the word.
The correct spelling is referrer !
Most helpful comment
Old issue I know however, this one killed my flow 馃槀 a cop against something like this is imho, useless! and it wants the incorrect spelling of the word.
The correct spelling is referrer !