Re: cgi.rb: option to omit HTTP header emission

From: Jeff Mitchell <quixoticsycophant@...>
Date: 2004-05-17 04:19:05 UTC
List: ruby-core #2887
--- Jos Backus <jos@catnook.com> wrote:
> What needs to be done for this patch to become part of the official cgi.rb? If
> it is not acceptable in its current form, what can I do to improve it so it
> is? I have mailed Wakou Aoyama but not received a response so far.
> 

I don't know the context of the problem you are solving, but if you don't
want headers then just omit CGI#out,

arda:~> cat cgiex.rb
require 'cgi'
ARGV.push "junk" # don't read from stdin
cgi = CGI.new("html3")
puts cgi.html { cgi.body { "foo" } }

arda:~> ruby cgiex.rb 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><HTML><BODY>foo</BODY></HTML>



	
		
__________________________________
Do you Yahoo!?
SBC Yahoo! - Internet access at a great low price.
http://promo.yahoo.com/sbc/

In This Thread