summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
authorshiva.jm <shiva.jm@samsung.com>2015-08-19 23:12:40 -0700
committerCommit bot <commit-bot@chromium.org>2015-08-20 06:13:22 +0000
commit1e571d6050004a98dc506f95f2faaa76f6045c74 (patch)
treefe12aff70b97728d366848c17d63d02d50540c38 /extensions
parent185d20744b1cc4c4837425bd7e0898bdefdd60f4 (diff)
downloadchromium_src-1e571d6050004a98dc506f95f2faaa76f6045c74.zip
chromium_src-1e571d6050004a98dc506f95f2faaa76f6045c74.tar.gz
chromium_src-1e571d6050004a98dc506f95f2faaa76f6045c74.tar.bz2
Adding Null check in onAuthRequired() for handling FTP requests
statusCode was implemented in: https://code.google.com/p/chromium/issues/detail?id=447180 BUG=521296 Review URL: https://codereview.chromium.org/1297503004 Cr-Commit-Position: refs/heads/master@{#344433}
Diffstat (limited to 'extensions')
-rw-r--r--extensions/browser/api/web_request/web_request_api.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/extensions/browser/api/web_request/web_request_api.cc b/extensions/browser/api/web_request/web_request_api.cc
index 6af3476..279276b 100644
--- a/extensions/browser/api/web_request/web_request_api.cc
+++ b/extensions/browser/api/web_request/web_request_api.cc
@@ -997,8 +997,9 @@ ExtensionWebRequestEventRouter::OnAuthRequired(
challenger->SetInteger(keys::kPortKey, auth_info.challenger.port());
dict->Set(keys::kChallengerKey, challenger);
dict->Set(keys::kStatusLineKey, GetStatusLine(request->response_headers()));
- dict->SetInteger(keys::kStatusCodeKey,
- request->response_headers()->response_code());
+ if (request->response_headers())
+ dict->SetInteger(keys::kStatusCodeKey,
+ request->response_headers()->response_code());
if (extra_info_spec & ExtraInfoSpec::RESPONSE_HEADERS) {
dict->Set(keys::kResponseHeadersKey,
GetResponseHeadersList(request->response_headers()));