A DESCRIPTION OF THE PROBLEM :
CookiePolicy.ACCEPT_ORIGINAL_SERVER uses the HttpCookie.domainMatches() method to accept a cookie to send. We have sub domain 4th level: c.b.a.com. Cookie which is set for .a.com is not accepted on sending to c.b.a.com.
Section in the RFC: https://tools.ietf.org/html/rfc6265#section-5.1.3
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run the provided program
ACTUAL -
false
---------- BEGIN SOURCE ----------
import java.io.IOException;
import java.net.HttpCookie;
public class Main {
public static void main(String[] args) throws IOException {
System.out.print(HttpCookie.domainMatches(".a.com", "c.b.a.com"));
}
}
---------- END SOURCE ----------
FREQUENCY : always