The fetch api requires download service to fetch the response body for non successful http response code, like 404. Please see details in: go/chrome-download-non-successful-server-response
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/748d6b1295e21dd741aefe89b97775f9f2390c19 commit 748d6b1295e21dd741aefe89b97775f9f2390c19 Author: Xing Liu <xingliu@chromium.org> Date: Thu Sep 28 22:18:09 2017 Support download error response body in content. This CL adds the logic to download HTTP error response body in content. Doc: go/chrome-download-non-successful-server-response Bug: 765778 Change-Id: I367a9678502de8aace3208776b0dcca51e26c764 Reviewed-on: https://chromium-review.googlesource.com/669300 Reviewed-by: Antoine Labour <piman@chromium.org> Reviewed-by: Min Qin <qinmin@chromium.org> Reviewed-by: David Trainor <dtrainor@chromium.org> Commit-Queue: Xing Liu <xingliu@chromium.org> Cr-Commit-Position: refs/heads/master@{#505190} [modify] https://crrev.com/748d6b1295e21dd741aefe89b97775f9f2390c19/content/browser/download/download_browsertest.cc [modify] https://crrev.com/748d6b1295e21dd741aefe89b97775f9f2390c19/content/browser/download/download_create_info.h [modify] https://crrev.com/748d6b1295e21dd741aefe89b97775f9f2390c19/content/browser/download/download_item_impl.cc [modify] https://crrev.com/748d6b1295e21dd741aefe89b97775f9f2390c19/content/browser/download/download_item_impl.h [modify] https://crrev.com/748d6b1295e21dd741aefe89b97775f9f2390c19/content/browser/download/download_request_core.cc [modify] https://crrev.com/748d6b1295e21dd741aefe89b97775f9f2390c19/content/browser/download/download_request_core.h [modify] https://crrev.com/748d6b1295e21dd741aefe89b97775f9f2390c19/content/browser/download/download_response_handler.cc [modify] https://crrev.com/748d6b1295e21dd741aefe89b97775f9f2390c19/content/browser/download/download_response_handler.h [modify] https://crrev.com/748d6b1295e21dd741aefe89b97775f9f2390c19/content/browser/download/download_utils.cc [modify] https://crrev.com/748d6b1295e21dd741aefe89b97775f9f2390c19/content/browser/download/download_utils.h [modify] https://crrev.com/748d6b1295e21dd741aefe89b97775f9f2390c19/content/browser/download/resource_downloader.cc [modify] https://crrev.com/748d6b1295e21dd741aefe89b97775f9f2390c19/content/browser/download/resource_downloader.h [modify] https://crrev.com/748d6b1295e21dd741aefe89b97775f9f2390c19/content/public/browser/download_url_parameters.cc [modify] https://crrev.com/748d6b1295e21dd741aefe89b97775f9f2390c19/content/public/browser/download_url_parameters.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/a364dd1e3748d679205c37e9c902150575bbb47b commit a364dd1e3748d679205c37e9c902150575bbb47b Author: Xing Liu <xingliu@chromium.org> Date: Thu Oct 19 20:03:31 2017 Download service: Adds the fetch_error_body flag in request params. This CL exposes the content layer's fetch_error_body flag in download service. Bug: 765778 Change-Id: I2f9ea5b437387e6e1864fb1867436869b6348472 Reviewed-on: https://chromium-review.googlesource.com/707780 Reviewed-by: David Trainor <dtrainor@chromium.org> Commit-Queue: Xing Liu <xingliu@chromium.org> Cr-Commit-Position: refs/heads/master@{#510173} [modify] https://crrev.com/a364dd1e3748d679205c37e9c902150575bbb47b/components/download/content/internal/download_driver_impl.cc [modify] https://crrev.com/a364dd1e3748d679205c37e9c902150575bbb47b/components/download/internal/proto/request.proto [modify] https://crrev.com/a364dd1e3748d679205c37e9c902150575bbb47b/components/download/internal/proto_conversions.cc [modify] https://crrev.com/a364dd1e3748d679205c37e9c902150575bbb47b/components/download/internal/proto_conversions_unittest.cc [modify] https://crrev.com/a364dd1e3748d679205c37e9c902150575bbb47b/components/download/public/download_params.cc [modify] https://crrev.com/a364dd1e3748d679205c37e9c902150575bbb47b/components/download/public/download_params.h
Comment 1 by bugdroid1@chromium.org
, Sep 28 2017