From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Zelphir Kaltstahl Newsgroups: gmane.lisp.guile.user Subject: Re: Guile web server example serving static files Date: Sat, 19 Sep 2020 12:57:41 +0200 Message-ID: <00a007fc-cb54-b7ce-548c-69b117a14a91@posteo.de> References: <04e63ab3-93b7-a0fe-6db8-34f00e6098e0@posteo.de> <87ft7fttkh.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32968"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Icedove/68.10.0 Cc: guile-user@gnu.org To: "Dr. Arne Babenhauserheide" Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Sat Sep 19 12:58:04 2020 Return-path: Envelope-to: guile-user@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kJaZA-0008Qv-Gq for guile-user@m.gmane-mx.org; Sat, 19 Sep 2020 12:58:04 +0200 Original-Received: from localhost ([::1]:45852 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kJaZ9-0004mP-GD for guile-user@m.gmane-mx.org; Sat, 19 Sep 2020 06:58:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57118) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kJaYt-0004ll-GU for guile-user@gnu.org; Sat, 19 Sep 2020 06:57:47 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]:56357) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kJaYr-000544-7z for guile-user@gnu.org; Sat, 19 Sep 2020 06:57:47 -0400 Original-Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 7BB2916005F for ; Sat, 19 Sep 2020 12:57:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1600513062; bh=tWkvu1fYS2eGD5XbCJmFM9nv7yD021X3YElASzSyfwo=; h=Subject:To:Cc:From:Date:From; b=O8FzMCfWscy5GdQ09JNuXar1Jtd2y2dy/jIuAwVFTfeV9pSBXcRgqqiyWQBX0+hu0 CJSDU9f7t+sJHZE70Ravy4OvnCpkaKhvDYT5xOuRH7XGuoc8vst0S7tIjvQuzw+gTX dHLWjJmDxMgLQnXCcFzkOiO3LikJly4CB2EHuPHMJNBeuKVYzCBVjlHaJ1gRAYtlX8 HR+rFn+UcVRNzPl/LLNMjYSeDBYv6I4VBsFovr792CZJU5Cvf25xxGzkeKZz7LmtUO 1oRLRYx3YmuVj7KOketpeWgm3G1wQ50+xTtkzAJ+MIpOZtvG7SmtbnNQj/pcCWIxVi 5vhZ2uemRgYbg== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4BtnjL07yRz6tmP; Sat, 19 Sep 2020 12:57:41 +0200 (CEST) In-Reply-To: <87ft7fttkh.fsf@web.de> Content-Language: en-US Received-SPF: pass client-ip=185.67.36.65; envelope-from=zelphirkaltstahl@posteo.de; helo=mout01.posteo.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/19 06:57:42 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -39 X-Spam_score: -4.0 X-Spam_bar: ---- X-Spam_report: (-4.0 / 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, NICE_REPLY_A=-1.869, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.io gmane.lisp.guile.user:16923 Archived-At: Hello Arne! Thanks for the link. So far I have only tried with a tiny CSS file, so I have no idea, whether I would run into a problem, besides memory consumption, for big files. I wonder, whether I should simply use sendfile described in https://www.gnu.org/software/guile/manual/html_node/File-System.html#File= -System. I think it was mentioned to be in GUIX somewhere, as an example. So far I did not get to look at it. Regard, Zelphir On 18.09.20 09:47, Dr. Arne Babenhauserheide wrote: > Hi Zelphir, > > I see that you=E2=80=99re getting the full file as bytevector=20 > > Zelphir Kaltstahl writes: >> https://notabug.org/ZelphirKaltstahl/guile-examples/src/65ba7cead2983f= 1ceb8aa2d4eedfe37734e5ca56/web-development/example-03-serve-static-assets= > I see that you=E2=80=99re getting the full file as bytevector in respon= se-utils. > When I tested this in wispserve with multi-gigabyte files, I got > gc-errors. > > I do string-conversion, though, because I got into problems with just > putting a bytevector =E2=80=94 does avoiding that avoid the problem? > > https://hg.sr.ht/~arnebab/wispserve/browse/wispserve/serve.w?rev=3D4541= f36df0b0#L411 > > Best wishes, > Arne --=20 repositories: https://notabug.org/ZelphirKaltstahl