Forum: Ruby CGI: triggering a file download & having a page appear

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
1042854c179dfff53f8280f5fe6b479c?d=identicon&s=25 Frank Reiff (frank)
on 2007-07-31 11:35
Hi,

I'm fairly new to fast-cgi/CGI programming and I have a particular
problem:

When people click on a download link, I want the download to start (zip
file) AND an installation page to appear that explains how to use the
downloaded file.

This is easily done in JavaScript: show the installation page and
trigger the download via the Body.onLoad handler, but it would be nicer
to do it all on the server side..

Is there any way of triggering two HTTP responses for one request?

Thanks for your time.

Best regards,

Frank
E0d864d9677f3c1482a20152b7cac0e2?d=identicon&s=25 Robert Klemme (Guest)
on 2007-07-31 11:44
(Received via mailing list)
2007/7/31, Frank Reiff <reiff@publicspace.net>:
> trigger the download via the Body.onLoad handler, but it would be nicer
> to do it all on the server side..
>
> Is there any way of triggering two HTTP responses for one request?

No. One request, one response.  Maybe you can do a multipart response
but I have no experience with that myself.

Kind regards

robert
This topic is locked and can not be replied to.