[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#40993] cuirass: Add build products download support.
From: |
Ludovic Courtès |
Subject: |
[bug#40993] cuirass: Add build products download support. |
Date: |
Wed, 03 Jun 2020 22:14:16 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
Hi!
Mathieu Othacehe <othacehe@gnu.org> skribis:
> From c99cc0314b98e349a577f38870d1271a3f1c3a54 Mon Sep 17 00:00:00 2001
> From: Mathieu Othacehe <m.othacehe@gmail.com>
> Date: Wed, 3 Jun 2020 13:41:30 +0200
> Subject: [PATCH] cuirass: Use sendfiles instead of raw copies.
>
> * src/cuirass/http.scm (respond-file): Send the file name as 'x-raw-file
> header argument, instead of the raw file content,
> (respond-gzipped-file): ditto. Also set 'content-disposition header.
> * src/web/server/fiberized.scm (strip-headers, with-content-length): New
> procedures,
> (client-loop): Check if 'x-raw-file is set. If it's the case, use sendfiles to
> send the given file. Otherwise, keep the existing behaviour and send directly
> the received bytevector.
If it works for you, LGTM!
Ludo’.