[PATCH] HTTP: factor out server name into a constant
Varun Varada
varuncvarada at gmail.com
Sun Jun 7 01:01:57 UTC 2020
On Sat, 6 Jun 2020 at 18:18, Maxim Dounin <mdounin at mdounin.ru> wrote:
>
> Hello!
>
> On Sat, Jun 06, 2020 at 04:08:40PM -0500, Varun Varada wrote:
>
> > # HG changeset patch
> > # User Varun Varada <varuncvarada at 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
More information about the nginx-devel
mailing list