emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#57852: closed ([PATCH] services: nginx: Don't emit empty fields)


From: GNU bug Tracking System
Subject: bug#57852: closed ([PATCH] services: nginx: Don't emit empty fields)
Date: Mon, 26 Sep 2022 21:22:01 +0000

Your message dated Mon, 26 Sep 2022 23:21:07 +0200
with message-id <87fsgdj0ho.fsf@gnu.org>
and subject line Re: bug#57852: [PATCH] services: nginx: Don't emit empty fields
has caused the debbugs.gnu.org bug report #57852,
regarding [PATCH] services: nginx: Don't emit empty fields
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
57852: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=57852
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: [PATCH] services: nginx: Don't emit empty fields Date: Fri, 16 Sep 2022 09:50:37 +0200
An empty root or index field is an error in nginx.

* gnu/services/web.scm (emit-nginx-server-config): Don't emit root or
index fields when they are empty
---
 gnu/services/web.scm | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/gnu/services/web.scm b/gnu/services/web.scm
index 5bac496f01..e347f5dbcc 100644
--- a/gnu/services/web.scm
+++ b/gnu/services/web.scm
@@ -14,6 +14,7 @@
 ;;; Copyright © 2020 Arun Isaac <arunisaac@systemreboot.net>
 ;;; Copyright © 2020 Oleg Pykhalov <go.wigust@gmail.com>
 ;;; Copyright © 2020, 2021 Alexandru-Sergiu Marton <brown121407@posteo.ro>
+;;; Copyright © 2022 Simen Endsjø <simendsjo@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -646,8 +647,12 @@ (define-syntax-rule (and/l x tail ...)
      "      server_name " (config-domain-strings server-name) ";\n"
      (and/l ssl-certificate     "      ssl_certificate " <> ";\n")
      (and/l ssl-certificate-key "      ssl_certificate_key " <> ";\n")
-     "      root " root ";\n"
-     "      index " (config-index-strings index) ";\n"
+     (if (not (equal? "" root))
+         (list "      root " root ";\n")
+         "")
+     (if (not (null? index))
+         (list "      index " (config-index-strings index) ";\n")
+         "")
      (if (not (nil? try-files))
          (and/l (config-index-strings try-files) "      try_files " <> ";\n")
          "")

base-commit: 02c5ed4f1bbd83bddd81902604af6f8add41ac54
-- 
2.37.3




--- End Message ---
--- Begin Message --- Subject: Re: bug#57852: [PATCH] services: nginx: Don't emit empty fields Date: Mon, 26 Sep 2022 23:21:07 +0200 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux)
Hi,

Simen Endsjø <simendsjo@gmail.com> skribis:

> An empty root or index field is an error in nginx.
>
> * gnu/services/web.scm (emit-nginx-server-config): Don't emit root or
> index fields when they are empty

Good catch.  Applied, thanks!

Ludo’.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]