Commit 57bc8261 authored by Reilly Grant's avatar Reilly Grant Committed by Commit Bot

ios: Exclude JSON path from gzipped resources.

This patch, mirroring the logic in WebUIDataSourceImpl::SetJsonPath,
excludes the configured JSON path (used for localization strings) from
the set of resources that are marked as gzipped.

Bug: 787428
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I158766444870b93fad44a1117e19f54e8f4b59e7
Reviewed-on: https://chromium-review.googlesource.com/792131
Commit-Queue: Reilly Grant <reillyg@chromium.org>
Reviewed-by: default avatarEugene But <eugenebut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#519846}
parent 8bd9882c
......@@ -57,7 +57,8 @@ class WebUIIOSDataSourceImpl::InternalDataSource : public URLDataSourceIOS {
return parent_->deny_xframe_options_;
}
bool IsGzipped(const std::string& path) const override {
return parent_->use_gzip_;
return parent_->use_gzip_ &&
(parent_->json_path_.empty() || path != parent_->json_path_);
}
private:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment