faye/faye — pull request #263 by kellydunn (2013-12-10 19:50:14+00:00)
Title: Resolving issue where Cookie Headers were not being set after successful handshakes, nor being sent during subsequent connects and subscribes.

Hello there!

First off, thank you so much for `faye`! It definitely takes out some of the pain in developing a homegrown bayeux streaming client.

While evaluating `faye` as a solution for our Salesforce Streaming API needs, I came across some unexpected behavior during subsequent connects and subscribes after a successful handshake. After lurking around the faye google group for a little while, I found that some other people were experiencing [similar issues](https://groups.google.com/forum/#!searchin/faye-users/salesforce/faye-users/SaEiojGQx3w/YRhSQnb01VgJ) around a year or so ago.

Unfortunately, no resolution seemed to be documented there, and the current implementation still does not address the fact that Salesforce expects the `BAYEUX_BROWSER` cookie (and other cookies) sent back with each bayeux long-polling request ([see here](http://docs.database.com/dbcom/en-us/db_streaming_api/intro_client_specs.htm?version=186.0)).

So, in order for `faye` to play nice with Salesforce's specifications, I have introduced the following changeset, which simply re-introduces the logic required for a `Faye::Transport` to get and set cookies.

I would love to add some additional code coverage to this changeset, but it appears as though `Faye::Transport#set_cookie` is a private method and `Faye::Transport#send` is already overwritten, so covering this particular code path is a bit difficult. Do you have any insight as how to test this particular part of `faye`?

Thanks!