Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(216)

Issue 1146923003: Handle redirects in AuthenticatingURLLoaderImpl. (Closed)

Created:
5 years, 7 months ago by blundell
Modified:
5 years, 6 months ago
Reviewers:
qsr
CC:
mojo-reviews_chromium.org, gregsimon, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin (slow to review), ben+mojo_chromium.org
Base URL:
https://github.com/domokit/mojo.git@master
Target Ref:
refs/heads/master
Project:
mojo
Visibility:
Public.

Description

Handle redirects in AuthenticatingURLLoaderImpl. This CL adds |FollowRedirect()| to authenticating_url_loader.mojom. The logic for implementing redirects is as follows: - When the AuthenticatingURLLoaderImpl receives a response that is a redirect, it sets the redirect url as the url of its "new" request and clears its authentication state, since that authentication state was for the pre-redirect request. If the client had requested that requests be automatically followed, it then calls |FollowRedirect()| on its internal URLLoader. Otherwise, it returns the response to the client but saves its internal URLLoader in case the client responds by calling |FollowRedirect()|. R=qsr@chromium.org Committed: https://chromium.googlesource.com/external/mojo/+/524ef56969655b5eff8becc6ca737cc2663d156d

Patch Set 1 #

Patch Set 2 : Fix dcheck #

Total comments: 2

Patch Set 3 : Response to review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+70 lines, -8 lines) Patch
M mojo/services/authenticating_url_loader/public/interfaces/authenticating_url_loader.mojom View 1 chunk +5 lines, -0 lines 0 comments Download
M services/authenticating_url_loader/authenticating_url_loader_impl.h View 3 chunks +4 lines, -1 line 0 comments Download
M services/authenticating_url_loader/authenticating_url_loader_impl.cc View 1 2 6 chunks +61 lines, -7 lines 0 comments Download

Messages

Total messages: 6 (2 generated)
blundell
5 years, 7 months ago (2015-05-27 13:27:21 UTC) #2
qsr
lgtm https://codereview.chromium.org/1146923003/diff/20001/services/authenticating_url_loader/authenticating_url_loader_impl.cc File services/authenticating_url_loader/authenticating_url_loader_impl.cc (right): https://codereview.chromium.org/1146923003/diff/20001/services/authenticating_url_loader/authenticating_url_loader_impl.cc#newcode51 services/authenticating_url_loader/authenticating_url_loader_impl.cc:51: DCHECK(!auto_follow_redirects_); You should not dcheck on a wrong ...
5 years, 7 months ago (2015-05-27 14:29:36 UTC) #3
blundell
Committed patchset #3 (id:60001) manually as 524ef56969655b5eff8becc6ca737cc2663d156d (presubmit successful).
5 years, 7 months ago (2015-05-27 16:01:43 UTC) #5
blundell
5 years, 6 months ago (2015-06-03 10:55:11 UTC) #6
Message was sent while issue was closed.
https://codereview.chromium.org/1146923003/diff/20001/services/authenticating...
File services/authenticating_url_loader/authenticating_url_loader_impl.cc
(right):

https://codereview.chromium.org/1146923003/diff/20001/services/authenticating...
services/authenticating_url_loader/authenticating_url_loader_impl.cc:51:
DCHECK(!auto_follow_redirects_);
On 2015/05/27 14:29:36, qsr wrote:
> You should not dcheck on a wrong usage of your API. Just return a null
response.

Done.

Powered by Google App Engine
This is Rietveld 408576698