#22758: fix regression in handling of secure cookies.

This backports the fix from #16611, per discussion with the release
manager.
3 files changed