The documentation was inconsistent with the code. The new description for cookie-algorithm now reflects the current behavior.
The following two commits are the relevant code changes to this section of docs: afa81ee4 a912f313
(cherry picked from commit b29a7481)