Re: problems with cgi object

Daniel Bretoi <[email protected]>
Newsgroups gmane.comp.apache.mod-ruby
Message-ID <[email protected]>
Hi,

I figured out the problem. Instead of creating a new cgi object with new
page, I had put it into a another file which I was requireing.

db

On Mon, Dec 29, 2003 at 02:01:17PM -0500, Daniel Bretoi wrote:
> Hi,
> 
> Simple scenario
> 
> require 'cgi'
> 
> cgi = CGI.new
> 
> p cgi.class
> 
> 
> when accessing:
> 
> http://somepage.rhtml
> 
> cgi is of NilClass
> 
> when accessing
> 
> http://somepage.rhtml?key=val
> 
> cgi is of CGI
> 
> after accessing http://somepage.rhtml?key=val
> 
> I try loading the inital page  http://somepage.rhtml
> again.
> 
> Now cgi is of CGI again.
> 
> So there's something with persitance. Similarly, if I check the params,
> the params still have key and val in there, even though it's now clear.
> 
> How can I rid myself of this persistance?
> I've never had a problem like this in th epast, and I have been able to
> do things like...
> 
> if(cgi && cgi.params.size > 0)
> 
> however, this isn't working now...  ideas?
> 
> 
> db
> 
> 
> -- 
> A.D. 1844: Samuel Morse invents Morse code. Cryptography export
> restrictions prevent the telegraph's use outside the U.S. and Canada.

-- 
A.D. 1844: Samuel Morse invents Morse code. Cryptography export
restrictions prevent the telegraph's use outside the U.S. and Canada.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.