session: webRequest.OnHeadersReceived should follow server redirect

Its required to follow server redirects.
This commit is contained in:
deepak1556 2016-04-05 08:48:20 +05:30
parent cf2a17cf88
commit 4fc35a4587
2 changed files with 32 additions and 5 deletions

View file

@ -178,6 +178,8 @@ void ReadFromResponseObject(const base::DictionaryValue& response,
!it.IsAtEnd();
it.Advance()) {
const base::ListValue* list;
if (base::ToLowerASCII(it.key()) == "location")
(*headers)->ReplaceStatusLine("HTTP/1.1 302 Found");
if (it.value().GetAsList(&list)) {
(*headers)->RemoveHeader(it.key());
for (size_t i = 0; i < list->GetSize(); ++i) {