Forum: Ruby Custom HTTP header

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
19fad8b2f5f9948322c3fe0441265298?d=identicon&s=25 Jim ruther Nill (jimboker)
on 2009-05-19 05:58
I want a simple http header like the one below.

HTTP/1.1 200 OK
Server: Mongrel 1.1.5
Set-Cookie: JSESSIONID=<session_key>; Path=/
Content-Type: text/html;charset=UTF-8
Content-Length: 138
Date: Fri, 15 May 2009 01:48:42 GMT
Connection: close


I'm using rails 2.2.2. I can't override the set-cookie part and I also
want to remove the ETag and X-Runtime parts.  I was able to remove the
Status and Cache-Control parts by using the delete method.

I tried using

  cookies['JSESSIONID'] = <sessions_key>

but the my_session cookie is still there.


HTTP/1.1 200 OK
Connection: close
Date: Tue, 19 May 2009 02:45:20 GMT
Set-Cookie: _my_session=<session_key>; path=/; HttpOnly
ETag: "100098631aaee632fb77079e8a6c4932"
X-Runtime: 260ms
Content-Type: text/html; charset=utf-8
Content-Length: 137
Server: Mongrel 1.1.5


I got the headers above from wireshark.  The first header is generated
by connecting to a java server.


thanks!
753dcb78b3a3651127665da4bed3c782?d=identicon&s=25 Brian Candler (candlerb)
on 2009-05-19 15:47
Jim ruther Nill wrote:
> I want a simple http header like the one below.
...
> I'm using rails 2.2.2. I can't override the set-cookie part and I also
> want to remove the ETag and X-Runtime parts.

Questions about Rails are best directed to a Rails forum.
This topic is locked and can not be replied to.