I looked a bit at the server-side code, but I'm a bit confused now.
With my earlier changes I tried to consolidate the various locations where we were trying to get the Browser-ID into one single location, namely the Browser.class. It has a public static method getBrowserID(request), which in its turn could get it from the Header or the Cookie. This is now changed to getting it from the Header or the Parameter, not the Cookie anymore.
However, the new CheckBrowserIDServlet doesn't use this API and only checks if the Parameter is there.
In addition, the PushContext.createPushID(...) still uses the Browser.getBrowserID(request) method, which now checks for the Header and the Parameter. However, if the Browser-ID isn't found it sets it still as a Cookie.
I came up with the following questions:
- Which possibilities does ICEpush needs to provide in regards to ICEpush in general (not just as a service)? Parameter? Header? Cookie? Or any combination of the three?
- How does the new Browser-ID need to be communicated back to the client? Through <browser id="
{browser-id}
" />? Through Set-Cookie? Or both?
- Shouldn't CheckBrowserIDServlet use Browser.getBrowserID(request) as well? We could even make the sub-methods getBrowserIDFromCookie(...), getBrowserIDFromHeader(...) and getBrowserIDFromParameter(...) public as well and still have getBrowserID(...) public too to provide choice and/or different strategy.
Modified ICEpush to set ice.push.browser cookie whenever ice.push.createPushId is invoked or a blocking request is issued.