Welcome! Log In Create A New Profile

Advanced

Re: [PATCH] Rename referrer to referer in error log

July 08, 2021 05:44AM
I'm just a user of nginx making a comment. Simple patch, valuable find,
potentially far reaching annoyance.

On Thu, 8 Jul 2021, 7:33 pm Jérémie Drouet, <jeremie.drouet@gmail..com>
wrote:

> Ok, so what should I do now? Does it mean it cannot be done?
>
> On Thu, Jul 8, 2021 at 11:31 AM Mathew Heard <mat999@gmail.com> wrote:
>
>> This should be a major release patch. It's breaking for everyone passing
>> the error log.
>>
>> On Thu, 8 Jul 2021, 7:17 pm Jeremie Drouet, <jeremie.drouet@gmail.com>
>> wrote:
>>
>>> # HG changeset patch
>>> # User Jeremie Drouet <jeremie.drouet@gmail.com>
>>> # Date 1625150632 -7200
>>> # Thu Jul 01 16:43:52 2021 +0200
>>> # Node ID 7db380334d2ca671b98ab7563bab9ddee501c573
>>> # Parent e0fdd75871e40e4c57ed405cadb94235550142c9
>>> Rename referrer to referer in error log
>>>
>>> According to the developer doc from mozilla, referrer should be
>>> written with only one R and everywhere in the nginx codebase, we
>>> are using referer with only one R, so to make it consistent, I
>>> propose you to replace referrer with two R in the error log
>>> message with referer with only one R.
>>> I'm also proposing this because of the work I'm doing on vector
>>> regarding a nginx log parser in which we end up having referer
>>> and referrer when we parse logs.
>>>
>>> https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer
>>> https://github.com/timberio/vector/
>>>
>>> diff -r e0fdd75871e4 -r 7db380334d2c src/http/ngx_http_request.c
>>> --- a/src/http/ngx_http_request.c Mon Jun 28 18:01:24 2021 +0300
>>> +++ b/src/http/ngx_http_request.c Thu Jul 01 16:43:52 2021 +0200
>>> @@ -3889,7 +3889,7 @@
>>> }
>>>
>>> if (r->headers_in.referer) {
>>> - p = ngx_snprintf(buf, len, ", referrer: \"%V\"",
>>> + p = ngx_snprintf(buf, len, ", referer: \"%V\"",
>>> &r->headers_in.referer->value);
>>> buf = p;
>>> }
>>>
>>> _______________________________________________
>>> nginx-devel mailing list
>>> nginx-devel@nginx.org
>>> http://mailman.nginx.org/mailman/listinfo/nginx-devel
>>>
>> _______________________________________________
>> nginx-devel mailing list
>> nginx-devel@nginx.org
>> http://mailman.nginx.org/mailman/listinfo/nginx-devel
>
>
>
> --
>
> https://about.me/jdrouet?promo=email_sig&utm_source=product&utm_medium=email_sig&utm_campaign=gmail_api&utm_content=thumb
> Jérémie Drouet
> about.me/jdrouet
> https://about.me/jdrouet?promo=email_sig&utm_source=product&utm_medium=email_sig&utm_campaign=gmail_api&utm_content=thumb
>
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

Re: [PATCH] Rename referrer to referer in error log

splitice 148 July 08, 2021 05:32AM

Re: [PATCH] Rename referrer to referer in error log

Jérémie Drouet 62 July 08, 2021 05:36AM

Re: [PATCH] Rename referrer to referer in error log

splitice 86 July 08, 2021 05:44AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 92
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready