From: Andreas Schwarz Date: 2004-01-28T19:04:54+09:00 Subject: Re: little client & server apps in Ruby for downloading authorized files Ruby Baby wrote: > SERVER: > Has some protected files, not in a webroot, that I want to let the client > download only if they pass me a verified key in the server's "OK" database. > > CLIENT: > Knows which files it wants (by file id# not full path). Knows its key to > get them. Passes some kind of message to the remote server saying, "Here > is my key. Here is the file I want." Server replies by passing the file, > and a little metadata about the file. > > > Sound familiar? > Should I do it from scratch or is this just some well-known library I > don't know about? (I searched around, of course, but couldn't find one.) Why not simply use a http server? If you already have one running, write a CGI script, otherwise use Webrick. Then the client can use Net::HTTP to fetch a URL like http://yourhost/server.cgi?id=324234&key=sdfhjasdf.