vcl_cookies: switch mobile to text-common code, mostly
The important net changes from the mobile behavior POV are:
- It now restores stashed cookies in vcl_(miss|pass) when no
cookie matched the special regexes for non-suppression. Before
this was suppressing (to MW) cookies like GeoIP and
WMF-Last-Access for anonymous hits.
- It now does cookie-handling in the backend using the same code
as the frontend, which is the pattern text uses as well. Before
the above, this wasn't necessary because they were all either
cache-affecting or suppressed and never restored at the frontend.
- The regex for "special" cookies was expanded from matching just
"[Ss]ession" to the standard regex "[Ss]ession|Token)=" from the
- The awful global hash_ignore_busy in mobile frontend (which
kills all coalescing on cacheable objects at the FE layer :/) was
removed, as this is done for only the matching special cookies in
the common evaluate_cookie stuff. I think this was a workaround
for various related bugs which should now be addressed as of this
The primary distinctions left (re: cookies and such) between text
and mobile after this commit are:
- Mobile marks cookies matching "optin" and "disable" as special
for cache purposes, in addition to the standard session/token
regex. I don't know whether that's necessary or valid, but it
preserves existing behavior until we can look deeper at that
- Mobile doesn't exclude static or load.php from the
hash_ignore_busy for non-coalesce. We can probably add this back
after confirming these do not Vary on Cookie in the mobile case
and do not need to.
- Mobile still has a generic pass on Cookie headers at the bottom
of recv, which probably isn't necessary anymore, again assuming
Vary is sane.