OOR-CORS: Check response_head.headers before accessing in OnReceiveResponse
|response.head.headers| can be empty in some cases, e.g. ftp accesses. We previously added a null check in GetHeaderString(), but OnReceiveResponse() itself accesses it without any null check. This patch adds a check to have a status code, and uses a fallback value if it does not exist. Bug: 908261 Change-Id: I15e0e61ce39c9e7846c26ab8875485b4597ce458 Reviewed-on: https://chromium-review.googlesource.com/c/1351348Reviewed-by:Yutaka Hirano <yhirano@chromium.org> Commit-Queue: Takashi Toyoshima <toyoshim@chromium.org> Cr-Commit-Position: refs/heads/master@{#611568}
Showing
Please register or sign in to comment