Ruby HTTP redirect?

Hi,
I don’t think the issue is omitting the first header. Your header needs to
end with \r\n\r\n, not \n\n. I suggest making that change and giving it a
try.
HTH,
Barry

···

-----Original Message-----
From: JamesBritt [mailto:james@jamesbritt.com]
Sent: Monday, September 16, 2002 8:10 PM
To: ruby-talk@ruby-lang.org
Subject: RE: ruby HTTP redirect?

Yes, I tried the first way before,
but I always get a 500 Server Error on my Apache (1.3.26)
when doing it.
Same goes for the other way.

Um, then try omitting the first header:

def redirect( new_page )
print "Location:#{new_page}\n\n"
end

Sorry, this is also off the top of my head. I know I’ve run into this
myself, but I don;t recal exactly what the details were, and
how running
mod_ruby or CGI makes a difference (if any).

BTW, are you using mod_ruby, or is this strictly CGI?

James

“SHULTZ,BARRY (HP-Israel,ex1)” barry_shultz@hp.com wrote in message news:733CA39D4982D411AD080090278CBE3902385A1D@shalom.israel.hp.com

Hi,
I don’t think the issue is omitting the first header. Your header needs to
end with \r\n\r\n, not \n\n. I suggest making that change and giving it a
try.
HTH,
Barry

Also try setting the status to “302 Moved”

~ Patrick

Hi.

I am wanting to send an attachment using SMTP and I was looking
for a simple MIME encoder. I notice in the talk-archive that
Oliver Mensinger wrote one [ruby-talk:33365], and placed it
on the Cookbook site. That site looks like it might be down.

So, can anyone point me to another site or possibly post the
code to the mailing list?

Thanks,

-mark.