function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Shoaib IqbalShoaib Iqbal 

Streaming API Error Summer 14 Release

I have problem in Streaming API using CookieJar.

"CookieJar::InvalidCookieError: Domain is inappropriate based on request URI hostname"

It seem that Salesforce is setting the cookie domain as ".salesforce.com" which will not match the corresponding request domain according to RFC 2109.

Can any one help me?
AlanOAlanO
I get a similar warning from Java when making use of salesforce's partner API. And salesforce's my domain feature.

Cookie rejected: "$Version=0; BrowserId=lYtxlM2XS7uKFuJtsC9pyQ; $Path=/; $Domain=.salesforce.com". Domain attribute ".salesforce.com" violates RFC 2109: host minus domain may not contain any dots

Basically the cookie is saying it comes from .salesforce.com and the host is reporting that it is abc-1-dev-ed.my.salesforce.com.

According to RFC 2109 when the domain of the cookie is removed from the host the result should contain no dots. And in this case it does, so the cookie is rejected. 

It only appears to be an issue with the BrowserId cookie from salesforce.

This does not seem to have any adverse affects (except for putting a lot of warnings into my logs.).