Welcome! Log In Create A New Profile

Advanced

Re: [PATCH] HTTP: factor out server name into a constant

Varun Varada
June 06, 2020 09:04PM
On Sat, 6 Jun 2020 at 18:18, Maxim Dounin <mdounin@mdounin.ru> wrote:
>
> Hello!
>
> On Sat, Jun 06, 2020 at 04:08:40PM -0500, Varun Varada wrote:
>
> > # HG changeset patch
> > # User Varun Varada <varuncvarada@gmail.com>
> > # Date 1591475111 18000
> > # Sat Jun 06 15:25:11 2020 -0500
> > # Node ID f37aa29453e006bdc37cbe7d9f65eec0de27b731
> > # Parent 699f6e55bbb4672632e7def5c65b1dbae2960380
> > HTTP: factor out server name into a constant
> >
> > This commit factors out the name of the server ("nginx") into a
> > constant to make the code DRY and so that modifying the server
> > name, if necessary, can be done in one place.
>
> Thank you for the patch, but no. While this change may help
> people "modifying the server name", such a change would have a
> negative impact on nginx itself.

Modifying the server name is a secondary concern. Currently, the name
of the server is hard-coded in multiple places which is not a best
practice.

>
> Consider looking at this ticket instead:
>
> https://trac.nginx.org/nginx/ticket/1644

That seems to have to do with a behavioural issue, which is unrelated
to making the code DRY.

Varun
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH] HTTP: factor out server name into a constant

Varun Varada 408 June 06, 2020 05:10PM

Re: [PATCH] HTTP: factor out server name into a constant

Maxim Dounin 265 June 06, 2020 07:20PM

Re: [PATCH] HTTP: factor out server name into a constant

Varun Varada 187 June 06, 2020 09:04PM

Re: [PATCH] HTTP: factor out server name into a constant

Maxim Dounin 151 June 06, 2020 10:18PM



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

Online Users

Guests: 196
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready