Manipulating http headers


#1

Going to start out by saying I have very little experience manipulating
http variables and passing data around via it.

Unfortunately, this app I am working on requires I communicate with
another client that absolutely insists on doing it. The problem isn’t
in accessing the data, its confirming the initial trust that must be
established.

It does this by sending a header back to the client which the client
then interprets, asks the user if it trusts the server, and then saves
the address locally on the client as trusted, and then can transmit the
data back via another http header to server.

It only has to do this once. This works fine in php by

ob_start();
Header(‘clienttag:www.websiteaddress.com::Would you like to confirm this
address?’);
ob_flush();

And after I did some digging, I learned that I could manipulate headers
in rails by

head(‘clienttag’, ‘www.websiteaddress.com:Would you like to confirm this
address?’)

The resulting http response was nearly identical (watching it via
firebug plugin for firefox), but the client app did not respond to it.
The differences only resulting from the rails app being on Mongrel, and
the php file being served up on apache.

The only thing I have seen on the net that might shed some light why is
that rails doesn’t stream and php does? I don’t know enough about how
http behaves to figure it out. Any help would be appreciated.