From: Julian Snitow Date: 2003-05-24T07:08:00+09:00 Subject: Re: Naive CGI question On Sat, 24 May 2003 05:22:24 +0900, Hal E. Fulton wrote: > I'm betting this is either impossible > or highly browser-dependent. > > It's not entirely obvious to me that > a web server is needed to run a CGI > that is *on the local machine*. (As, > by analogy, we don't need to run a > server just to look at local static > HTML files.) > > Yet while it seems theoretically > possible that a browser could do this, > I don't know whether any of them > actually will. > > Just to stay somewhat on-topic -- I > have downloaded Webrick, I just haven't > yet understood it. :) > > So, a serverless CGI -- possible in > theory and practice, in theory only, > or just not happening? > > > Hal On my own pet webserver, I find it simpler to bypass the ruby cgi library entirely, and work directly with mod_ruby: # under mod_ruby, $stdout becomes an apache request object if defined? Apache $stdout.content_type = 'text/html' $stdout.sync_header = true $stdout.send_http_header end Between that, and ENV['HTTP_FOOBAR'], I can run my web scripts from the command line without having the clunky cgi "insert values" prompt in the way. Julian