New issue
Advanced search Search tips

Issue 877379 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 851874
Owner:
Closed: Aug 25
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 3
Type: Bug



Sign in to add a comment

"Copy as fetch" does not copy headers

Project Member Reported by stillers@google.com, Aug 24

Issue description

Chrome Version: 68.0.3440.106 (Official Build) (64-bit)
OS: MacOS 10.13.6 (17G65)

What steps will reproduce the problem?

(1) Load a page that sets cookies, such as https://www.google.com/
(2) Open Devtools' the network tab
(3) Right click on the request for https://www.google.com/
(4) Select Copy | Copy as fetch

What is the expected result?

The clipboard contains a fetch() command that includes request headers.

What happens instead?

The fetch does not include headers:

fetch("https://www.google.com/", {"credentials":"include","headers":{},"referrerPolicy":"no-referrer-when-downgrade","body":null,"method":"GET","mode":"cors"});

I was expecting data similar to "Copy as cURL", which encodes header information, including cookies:

curl 'https://www.google.com/' -H 'authority: www.google.com' -H 'pragma: no-cache' -H 'cache-control: no-cache' -H 'upgrade-insecure-requests: 1' -H 'user-agent: Mozilla/5.0 (Linux; Android 8.0; Pixel 2 Build/OPD3.170816.012) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Mobile Safari/537.36' -H 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8' -H 'accept-encoding: gzip, deflate, br' -H 'accept-language: en-US,en;q=0.9,en-GB;q=0.8' -H 'cookie: CONSENT=WP.270a19; 1P_JAR=2018-08-24-07; NID=137=kgUVk_wBAAIsmRO5dHQGh93ckVmXt2ARI2JLy9kFQG5lrmTPBNjNwNp7f4YtueQecuhUTNNJ69e2GwlHIX85tFkv7D-HlcXFQhKUnVug0UcM4O_V_urADWvWJwe-Ejkm' --compressed


 
Owner: l...@chromium.org
Status: Assigned (was: Untriaged)
Mergedinto: 851874
Status: Duplicate (was: Assigned)
Thanks for the report.  It looks like the fix will ship with M70.

Sign in to add a comment