dev@glassfish.java.net

Re: HA/in-memory replication

From: Jan Luehe <Jan.Luehe_at_Sun.COM>
Date: Fri, 06 Apr 2007 11:13:31 -0700

Sreeram Duvur wrote On 04/06/07 10:53 AM,:

>
>> I should work as long as the domain (host) name remains the same, and
>> only the
>> port info changes.
>>
>> The browser decides which cookies to append to a request based on the
>> request URL's
>> domain (host) name and context root, ignoring any port info.
>>
>> Jan
>
> Ha, then having two instances on same machine (running on different
> ports) and manually directing requests by changing port numbers in
> browsers can be used to test failover.
>
> But is this browser behavior fairly standard?


Yes, according to RFC 2109 ("HTTP State Management Mechanism"):

  4.3.4 Sending Cookies to the Origin Server

    When it sends a request to an origin server, the user agent sends a
    Cookie request header to the origin server if it has cookies that are
    applicable to the request, based on

    * the request-host;
    * the request-URI;
    * the cookie's age.

request-URI is the URL portion following the <host>:<port>.

This means that <port> must be ignored when deciding which cookies
to send.


Jan


>
> Sreeram
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>