Set HTTP headers on response?


#1

Is it possible to set HTTP headers for a response?

Seeing as you can access the headers using the request.env[“FOO”] I am
wondering if there is an equivalent response.env[“BAR”], this is a wild
guess and I have seen no documentation to back it up.

Has anyone managed to do this somehow?

Thanks

Jeff


#2

On Friday, February 17, 2006, at 6:35 PM, Jeff J. wrote:

Jeff

@headers[“foo”]=“bar” is the shiznit…

Mikkel B.

www.strongside.dk - Football Portal(DK)
nflfeed.helenius.org - Football News(DK)
ting.minline.dk - Buy Old Stuff!(DK)


#3

Jeff J. wrote:

Is it possible to set HTTP headers for a response?

Of course… what you want to use is the headers hash, it works similar
to
params and session.

i.e.
headers[“Code”] = 404
headers[“Content-Type”] = “text/plain”
etc.

-Brian