From unknown Fri Aug 15 16:18:03 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#54171 <54171@debbugs.gnu.org> To: bug#54171 <54171@debbugs.gnu.org> Subject: Status: [PATCH] web: default to INADDR_ANY instead of INADDR_LOOPBACK Reply-To: bug#54171 <54171@debbugs.gnu.org> Date: Fri, 15 Aug 2025 23:18:03 +0000 retitle 54171 [PATCH] web: default to INADDR_ANY instead of INADDR_LOOPBACK reassign 54171 guile submitter 54171 Aleix Conchillo Flaqu=C3=A9 severity 54171 normal tag 54171 patch wontfix thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 26 13:11:47 2022 Received: (at submit) by debbugs.gnu.org; 26 Feb 2022 18:11:47 +0000 Received: from localhost ([127.0.0.1]:56320 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO1Xn-0004Lp-04 for submit@debbugs.gnu.org; Sat, 26 Feb 2022 13:11:47 -0500 Received: from lists.gnu.org ([209.51.188.17]:60320) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO1Xl-0004Lg-6G for submit@debbugs.gnu.org; Sat, 26 Feb 2022 13:11:45 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43910) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nO1Xk-0006Eq-RI for bug-guile@gnu.org; Sat, 26 Feb 2022 13:11:45 -0500 Received: from [2607:f8b0:4864:20::636] (port=35762 helo=mail-pl1-x636.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nO1Xg-00055h-Jh for bug-guile@gnu.org; Sat, 26 Feb 2022 13:11:42 -0500 Received: by mail-pl1-x636.google.com with SMTP id i1so7416124plr.2 for ; Sat, 26 Feb 2022 10:11:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=zsc7MzeUpS5LhA0przTdO0ucWDeWozvnDer/riJiHOU=; b=HyioVMQ5inw8LAhtlsbTVaFExX50KvrTECMId4J8gdOI5kPn7n6Ht7fJaTkiIEnQOd r1+BZ2U9bpWy7Z2t0SegzdJ3ISP7BWh+3Qk71jBPfj+RR4FLetPjO78CM3+RETiPuyCG 1RVJ9sWFDbNV9WSZxbVhsojYXMz6MiUTI766yXqSIGPd9/C9kzojUQu5iz1FTz0Ct1A1 aORLjDhzj+uyS7pz2/iNvUS5Jl3zEbVL1UrmqlrxwS9jxhHMuqXInqdGLg9+HZOHfnHU 07ZkkDNyXgGyJDgBlM0I5Ur0Rvv0s19TAfRNpV/hRcA6zHChigjcyNSkEyt51Av5SnFy ookQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=zsc7MzeUpS5LhA0przTdO0ucWDeWozvnDer/riJiHOU=; b=H8T/BsiBrFzqz8GX7Y3OPJBWN+gMO2i5LrmwXDhR4Fcyo38EIH0nOuJVbIqS0pUXsk GtUJvzsYhqLt/JYnmav3/QShrFMc89hb/0T+xOVfxSbIYUxLAPvkCkqIGbkthu81XQSW ag0W0LSmkDolDxAHLJpx/vqThsIEmnZU6s1jDHliPdpswTFE0BWtl8jJQJ44w0GNVcKP 6pqlYDzRzMD+l3Z60tquYw1qeMn5uKCHC1jk+yTVmUIHfvOlgkxGEDOqhyhmE+pnC95f +13sUfp7mJ+X2zA8/zGbSdiKrtK1POr/VDdthUDR+8U46v7XnOoMc2rligTSVtQYIk2o fHNQ== X-Gm-Message-State: AOAM53319hIJ/BVTbWU4PL36rh1jEe+xRqMwGR+jSz5KtmoPoDZQxlzP 1UVjXq/TGahP59K7ekb07Me9xNVLgjM= X-Google-Smtp-Source: ABdhPJwhuk1vLx29AbzTU7FrUCH2Fv7Yf+tHEG8Q0TQNqreN6Jl+ViLKisSk74ZCPos18CB7MCmg7g== X-Received: by 2002:a17:90a:f185:b0:1bc:806f:5cfc with SMTP id bv5-20020a17090af18500b001bc806f5cfcmr8885226pjb.136.1645899098333; Sat, 26 Feb 2022 10:11:38 -0800 (PST) Received: from localhost (cpe-198-72-134-0.socal.res.rr.com. [198.72.134.0]) by smtp.gmail.com with UTF8SMTPSA id l10-20020a056a00140a00b004c55d0dcbd1sm7298625pfu.120.2022.02.26.10.11.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 26 Feb 2022 10:11:38 -0800 (PST) From: =?UTF-8?q?Aleix=20Conchillo=20Flaqu=C3=A9?= To: bug-guile@gnu.org Subject: [PATCH] web: default to INADDR_ANY instead of INADDR_LOOPBACK Date: Sat, 26 Feb 2022 10:11:32 -0800 Message-Id: <20220226181132.64743-1-aconchillo@gmail.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::636 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::636; envelope-from=aconchillo@gmail.com; helo=mail-pl1-x636.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit Cc: =?UTF-8?q?Aleix=20Conchillo=20Flaqu=C3=A9?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Using INADDR_ANY instead of INADDR_LOOPBACK makes it convenient when starting the web server inside containers without the need to having to specify INADDR_ANY all the time. This is the default in most libraries and languages. This doesn't break backwards compatibility since INADDR_LOOPBACK is also included in INADDR_ANY. * doc/ref/web.texi (Web Server): update INADDR_LOOPBACK to INADDR_ANY and related text. * module/web/server/http.scm (http-open): default to INADDR_ANY for the web server. --- doc/ref/web.texi | 10 +++++----- module/web/server/http.scm | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/ref/web.texi b/doc/ref/web.texi index 93cd0214f..6b42b8ff6 100644 --- a/doc/ref/web.texi +++ b/doc/ref/web.texi @@ -1807,7 +1807,7 @@ socket, listening for request on that port. @deffn {HTTP Implementation} http [#:host=#f] @ [#:family=AF_INET] @ - [#:addr=INADDR_LOOPBACK] @ + [#:addr=INADDR_ANY] @ [#:port 8080] [#:socket] The default HTTP implementation. We document it as a function with keyword arguments, because that is precisely the way that it is -- all @@ -1815,7 +1815,7 @@ of the @var{open-params} to @code{run-server} get passed to the implementation's open function. @example -;; The defaults: localhost:8080 +;; The defaults: any local IP on port 8080 (run-server handler) ;; Same thing (run-server handler 'http '()) @@ -1866,9 +1866,9 @@ handler: (run-server hello-world-handler) @end example -By default, the web server listens for requests on -@code{localhost:8080}. Visit that address in your web browser to -test. If you see the string, @code{Hello World!}, sweet! +By default, the web server listens for requests on port @code{8080}. +Visit @code{http://localhost:8080} in your web browser to test. If you +see the string, @code{Hello World!}, sweet! @subsubsection Inspecting the Request diff --git a/module/web/server/http.scm b/module/web/server/http.scm index 05bf46bf0..91354021c 100644 --- a/module/web/server/http.scm +++ b/module/web/server/http.scm @@ -1,6 +1,6 @@ ;;; Web I/O: HTTP -;; Copyright (C) 2010, 2011, 2012, 2015 Free Software Foundation, Inc. +;; Copyright (C) 2010, 2011, 2012, 2015, 2022 Free Software Foundation, Inc. ;; This library is free software; you can redistribute it and/or ;; modify it under the terms of the GNU Lesser General Public @@ -61,7 +61,7 @@ (family AF_INET) (addr (if host (inet-pton family host) - INADDR_LOOPBACK)) + INADDR_ANY)) (port 8080) (socket (make-default-socket family addr port))) (listen socket 128) -- 2.35.1 From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 01 03:49:25 2022 Received: (at 54171) by debbugs.gnu.org; 1 Mar 2022 08:49:25 +0000 Received: from localhost ([127.0.0.1]:35385 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOyCC-00018N-V5 for submit@debbugs.gnu.org; Tue, 01 Mar 2022 03:49:25 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:57158) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOyCA-000189-St for 54171@debbugs.gnu.org; Tue, 01 Mar 2022 03:49:23 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 5E4E6203; Tue, 1 Mar 2022 09:49:17 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id plNMA1C9qw4N; Tue, 1 Mar 2022 09:49:16 +0100 (CET) Received: from ribbon (unknown [IPv6:2001:660:6102:320:e120:2c8f:8909:cdfe]) by hera.aquilenet.fr (Postfix) with ESMTPSA id A68711BD; Tue, 1 Mar 2022 09:49:16 +0100 (CET) From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Aleix Conchillo =?utf-8?Q?Flaqu=C3=A9?= Subject: Re: bug#54171: [PATCH] web: default to INADDR_ANY instead of INADDR_LOOPBACK References: <20220226181132.64743-1-aconchillo@gmail.com> Date: Tue, 01 Mar 2022 09:49:15 +0100 In-Reply-To: <20220226181132.64743-1-aconchillo@gmail.com> ("Aleix Conchillo =?utf-8?Q?Flaqu=C3=A9=22's?= message of "Sat, 26 Feb 2022 10:11:32 -0800") Message-ID: <87zgma83ck.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: / Authentication-Results: hera.aquilenet.fr; none X-Rspamd-Server: hera X-Rspamd-Queue-Id: 5E4E6203 X-Spamd-Result: default: False [-0.10 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_TWO(0.00)[2]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 54171 Cc: 54171@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Bon dia! Aleix Conchillo Flaqu=C3=A9 skribis: > Using INADDR_ANY instead of INADDR_LOOPBACK makes it convenient when > starting the web server inside containers without the need to having to > specify INADDR_ANY all the time. This is the default in most libraries > and languages. > > This doesn't break backwards compatibility since INADDR_LOOPBACK is also > included in INADDR_ANY. A potential problem with changing the default is that people using the defaults would all of a sudden have their servers accessible from the outside, which could be a real problem. Also, defaulting to INADDR_LOOPBACK is a conservative choice, with the understanding that you have to explicitly say so if you want your server to be directly accessible from the outside. (In most cases, one would run Guile web servers behind a proxy such as nginx.) So I have a preference for the status quo. WDYT? Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 13 10:38:07 2023 Received: (at control) by debbugs.gnu.org; 13 Jan 2023 15:38:07 +0000 Received: from localhost ([127.0.0.1]:52168 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGM87-0005kX-2K for submit@debbugs.gnu.org; Fri, 13 Jan 2023 10:38:07 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40766) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGM85-0005jd-In for control@debbugs.gnu.org; Fri, 13 Jan 2023 10:38:05 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pGM80-00046y-7O for control@debbugs.gnu.org; Fri, 13 Jan 2023 10:38:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:Subject:From:To:Date:in-reply-to: references; bh=suIp0bh3C4W2njJJO1HCkOFm/VQ9tTBxXecECM699Qs=; b=k2LHqDAC1Yu8vW ZcQ2T2HmPhQj2E01UpD11PC/mOZYB6rKkx6XgDH8mbuL8vg8Kf6rnOPWbbSQkzTjkjKZ0S3vZ/TV3 qjZCVDyM+mzTorl5C8F+9G3CY1bcd7QYV8ku0PdSUOMIiGbKlyWrAbrbMZXkoaQeCg+oaoYUMY9kU 7C+SSWVt9uw/LTArRXzzLyydIxa1AWumQSbqJJfKRG2IW36ZTpDt8otNtHsApi/17bzZkiFE/mPOP p5pB2RLyIAO+ZbnksLApaVl/ry88BuWoq0IIbYMzrAQ11Rpr0y0gEmnIH82bJcpTTk6vIS3zYpMqM vILEbu445O1Qt3sd8ZBw==; Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pGM7z-00033E-P8 for control@debbugs.gnu.org; Fri, 13 Jan 2023 10:38:00 -0500 Date: Fri, 13 Jan 2023 16:37:58 +0100 Message-Id: <87edrybg2x.fsf@gnu.org> To: control@debbugs.gnu.org From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: control message for bug #54171 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) tags 54171 wontfix close 54171 quit From unknown Fri Aug 15 16:18:03 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 11 Feb 2023 12:24:10 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator