rack-devel archive mirror (unofficial) https://groups.google.com/group/rack-devel
 help / color / mirror / Atom feed
From: Michael Franzl <michaelfranzl@gmx.at>
To: rack-devel@googlegroups.com
Subject: multipart response possible with Rack?
Date: Mon, 19 Apr 2010 11:05:20 +0200	[thread overview]
Message-ID: <4BCC1CD0.6070201@gmx.at> (raw)

I would like to generate a multipart HTTP response to a conventional 
GET request. For the end user, this will display a web page and 
download a file simultaneously. The response should look like the 
example below.

Can I do this with Rack?

Thanks,
Michael

     HTTP/1.1 200/OK
     Content-type: multipart/mixed; boundary=xyz
     Content-Description: multipart-1

     --xyz
     Content-Type: text/plain
     Content-Disposition: inline
     Content-Description: text-part-1

     Some text goes here.

     --xyz
     Content-Type: application/vnd.print
     Content-Disposition: inline; filename=invoice.bon
     Content-Description: invoice-part-2

     This is text inside of a file.
     --xyz--


-- 
Subscription settings: http://groups.google.com/group/rack-devel/subscribe?hl=en

             reply	other threads:[~2010-04-20  2:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-19  9:05 Michael Franzl [this message]
2010-04-20  6:34 ` multipart response possible with Rack? Konstantin Haase
2010-04-20  7:00   ` Michael Franzl
2010-04-20  7:17     ` Konstantin Haase

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-list from there: mbox

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

  List information: https://groups.google.com/group/rack-devel

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

  git send-email \
    --in-reply-to=4BCC1CD0.6070201@gmx.at \
    --to=rack-devel@googlegroups.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.
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).