[PATCH] Rename referrer to referer in error log
Mathew Heard
mat999 at gmail.com
Thu Jul 8 09:30:50 UTC 2021
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 at gmail.com>
wrote:
> # HG changeset patch
> # User Jeremie Drouet <jeremie.drouet at 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 at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20210708/0f81724c/attachment.htm>
More information about the nginx-devel
mailing list