# Cookies and SSI

**URL:** <https://www.ruby-forum.com/t/cookies-and-ssi/59448>\
**Category:** Ruby\
**Created:** [May 3, 2006, 7:06pm UTC](https://www.ruby-forum.com/t/cookies-and-ssi/59448 "2006-05-03T19:06:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rene\_T](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/6de8d8/32.png) [@Rene\_T](https://www.ruby-forum.com/u/Rene_T)\
**Post date:** [May 3, 2006, 7:06pm UTC](https://www.ruby-forum.com/t/cookies-and-ssi/59448/1 "2006-05-03T19:06:56Z")

</div>

Dear Ruby Experts,

I am somewhat confused about that CGI stuff. I have successfully written  
a Ruby script that sets a cookie. The script is called directly as CGI  
script, because I noticed that it seems to be impossible to call the CGI  
script using Apache’s Server Sider Includes (SSI). Well. As workaround I  
send some form data to the Ruby CGI which creates a cookie from the  
data. The cookie exists and can easily be viewed with the Mozilla Cookie  
Manager.

But I have some trouble with reading the cookie data. A second Ruby CGI  
script reads the cookie. It works well if called directly. It doesn’t  
work if called with SSI, neither using “#include virtual=…” nor “#exec  
cgi=…”.

Any hints?

Yours,  
Rene

P.S.:  
What I wanted to do is:

- user visits a webpage
- user fills out a form
- form data is sent to a Ruby script which creates some output
- some output is embedded in the mentioned webpage during a reload

And I tried to pass the some output to the webpage as cookie.
