rails/rails — pull request #14832 by cctiger36 (2014-04-21 12:13:03+00:00)
Title: Unify the behaviour of two `tld_length`.

The `tld_length` in cookie options and the one in ActionDispatch::Http::URL have different behaviour.

For example when I set the session_store with:

MyApp::Application.config.session_store :cookie_store, domain: :all, tld_length: 2

And suppose the url is `sub1.sub2.example.com`.

Then the TLD will be `example.com`.

But when I set the `tld_length` option of action_dispatch to 2:

config.action_dispatch.tld_length = 2

Then the TLD will be `sub2.example.com`.

These different behaviour made me confused.

Maybe it should be unified to the same behaviour?