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
On Friday, February 17, 2006, at 6:35 PM, Jeff J. wrote:
@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)
Jeff J. wrote:
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
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.