Whipping up a sample for a login scheme that works with browser password autofill, I ran into this…
If I have a special web request, “/special/login/form”, and in app.HandleSpecialURL I try to set a cookie with path “/”, the browser gets the cookie with path “/special/login/form”:
request.SetCookie("loginCookie", loginCookie, nil, ".", "/")
I verify this issue by checking the cookies in Chrome after this gets set. If I manually set the cookie header myself, it works as expected:
request.Header("Set-Cookie") = "loginCookie=" + loginCookie + "; Path=/"
Bug, or am I missing something?