Repository navigation
Conversation
|
This changes the observable behavior of the public no-arg constructor and may affect existing applications relying on the previous default. |
|
Agreed that RFC 6265 leaves public suffix rejection to user agent configuration (5.3 step 5), so this isn't a spec compliance point. The argument is consistency with what the project already treats as its default: the default cookie policy has validated against the PSL since 4.4, CookieSpecSupport.createDefault() wires PublicSuffixMatcherLoader.getDefault() into the same factory, and #944 just made the no-arg RFC6265LaxSpec and RFC6265StrictSpec constructors do it too. The no-arg factory is the one remaining default-looking entry point that silently produces the unfiltered spec, and it has the same practical consequence #944 fixed: a Domain=com cookie set by foo.com gets sent to bar.com. Anyone who needs the old behavior still has an explicit way to ask for it, new RFC6265CookieSpecFactory(CompatibilityLevel.RELAXED, null), so the change is a default shift rather than a capability loss. I'd keep it for that reason, but if you'd rather preserve the no-arg default as is, I'm fine closing this and we can instead note the opt-out and the asymmetry with #944 in the javadoc. |
The no-arg
RFC6265CookieSpecFactoryconstructor passes a nullPublicSuffixMatcher, so the specs it creates skipPublicSuffixDomainFilterand aDomain=comcookie set by foo.com is sent to bar.com; default it toPublicSuffixMatcherLoader.getDefault()as #944 did for the no-argRFC6265LaxSpecandRFC6265StrictSpecconstructors.