Help with print cgi.header(

I’m trying to set a cookie using Apache on RHFedora core3 and Ruby CGI
I’m sending a pdf file.

The mail format looks as if there are two lines for the cookie header,
but in reality there is only one.

Here are the headers I’m printing

cookexpires=( + (60 * 24 * 3600)).strftime("%a, %d-%m-%Y%H:%M:%S
print cgi.header(“Content-Type” => mimeTypes[mimer])
print cgi.header(“Content-Dispostion” => filename)
print cgi.header(“Content-length” => s.length.to_s)
print cgi.header(“Set-Cookie” => “#{CGI.escape(“sample_issue=yes;”)};
expires=#{cookexpires}; domain=ftienergybusinesswatch”)
print “\r\n”
print “\r\n”

The pdf file gets sent OK in Firefox. The pdf file opens correctly but
no cookie shows up.

In IE I have to do it this way for the file to appear correctly and the
cookie does show up in IE.“sample_issue”, “yes”) + (60 243600) # 60 days

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs