Do not cancel http auth navigations for incorrect credentials
Previously, with HTTP auth committed interstitials, LoginTabHelper cancels navigations that receive 401 responses and commits a blank page. The auth prompt is shown on top of the blank page normally. However, in the case that the browser supplied credentials and the server still sent a 401 response (i.e., credentials were incorrect), LoginTabHelper would cancel the navigation but not show the auth prompt (due to lack of auth challenge -- the challenge is only populated when credentials aren't supplied in the request). This led to a weird situation where neither the auth prompt nor the 401 response body from the server would be displayed to the user. To rectify this, LoginTabHelper should not cancel a request with a 401 response unless there is an auth challenge present for which to show a prompt. This maintains the same UX as we had before committed interstitials. Bug: 1047742 Change-Id: I83eba22e52676946d7f3a6cffc14f699265f75d7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2036970Reviewed-by:Scott Violet <sky@chromium.org> Reviewed-by:
Mustafa Emre Acer <meacer@chromium.org> Commit-Queue: Emily Stark <estark@chromium.org> Cr-Commit-Position: refs/heads/master@{#738298}
Showing
Please register or sign in to comment