unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Danny Milosavljevic <dannym@scratchpost.org>
To: Mathieu Othacehe <m.othacehe@gmail.com>
Cc: ludo@gnu.org, 40993@debbugs.gnu.org
Subject: [bug#40993] cuirass: Add build products download support.
Date: Fri, 1 May 2020 12:09:14 +0200	[thread overview]
Message-ID: <20200501120914.606ffe02@scratchpost.org> (raw)
In-Reply-To: <87ees4uja7.fsf@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 903 bytes --]

Hi Mathieu,

very cool!

Though I agree using sendfile would be much better, especially since the user
can download 800 MB image files there.

The guile (web server) module allows passing a procedure as the #:body, but
then it makes a bytevector out of the result and hard-codes the content-type :P.

Eventually (web server http) http-write is reached, which only supports encoding
bytevectors and #f, that's it.  No files.

So we'd have to overwrite http-write.

But we are using our own (web server fiberized) impl already.

So our impl chould be extended to be able to get and process FDs.

client-loop there has

              (lambda (response body)
                (write-response response client)
                (when body
                  (put-bytevector client body))

which means the "when body" part should be extended to also handle files, not just bytevectors.

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2020-05-01 10:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-01  8:54 [bug#40993] cuirass: Add build products download support Mathieu Othacehe
2020-05-01 10:09 ` Danny Milosavljevic [this message]
2020-05-01 13:35   ` Mathieu Othacehe
2020-05-01 21:17     ` Ludovic Courtès
2020-06-03 11:54       ` Mathieu Othacehe
2020-06-03 20:14         ` Ludovic Courtès
2020-05-01 21:11   ` Ludovic Courtès
2020-06-03 20:26 ` Ludovic Courtès
2020-06-10 15:44   ` Mathieu Othacehe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200501120914.606ffe02@scratchpost.org \
    --to=dannym@scratchpost.org \
    --cc=40993@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    --cc=m.othacehe@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).