Commit da43e8c1 authored by Eric Lawrence's avatar Eric Lawrence Committed by Commit Bot

[DevTools] Omit |Accept-Encoding| header from cURL commands

The |Accept-Encoding| request header should be omitted from the cURL
command line to avoid problems decompressing responses on platforms
where cURL does not support the same set of decompressors as Chrome
itself.

Bug: 1015321
Change-Id: I2948affb89ff46ad1b9869b2532f75efb4acf6f9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1865608Reviewed-by: default avatarLorne Mitchell <lomitch@microsoft.com>
Commit-Queue: Eric Lawrence [MSFT] <ericlaw@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#707146}
parent 69399032
......@@ -1704,8 +1704,9 @@ Network.NetworkLogView = class extends UI.VBox {
*/
async _generateCurlCommand(request, platform) {
let command = ['curl'];
// These headers are derived from URL (except "version") and would be added by cURL anyway.
const ignoredHeaders = {'host': 1, 'method': 1, 'path': 1, 'scheme': 1, 'version': 1};
// Most of these headers are derived from the URL and are automatically added by cURL.
// The |Accept-Encoding| header is ignored to prevent decompression errors. crbug.com/1015321
const ignoredHeaders = {'accept-encoding': 1, 'host': 1, 'method': 1, 'path': 1, 'scheme': 1, 'version': 1};
function escapeStringWin(str) {
/* If there are no new line characters do not escape the " characters
......
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