Replay XHR with on CORS Preflight requests does not send body data
Reported by
ibrahim....@gmail.com,
Nov 12
|
||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36 Steps to reproduce the problem: 1. Do an ajax POST request with any data to a domain other than the one that you are currently on. 2. Change the Content-type header to something else, so Chrome will automatically initiate an OPTIONS request before. 3. Once the POST request is done, try to "Replay XHR" the OPTIONS request under "Network" tab in Developer Tools 4. You will see that the replicated POST request will not have any data at all. What is the expected behavior? The replicated request should contain all data as the original request. What went wrong? The new request is missing the body data. Did this work before? Yes I don't remember having this issue a in the past, a long time ago, but I am not able to be more specific. Chrome version: 70.0.3538.102 Channel: stable OS Version: OS X 10.14.1 Flash Version: Example script: http://jsfiddle.net/9khcgu7j/2/ Demo video: https://cl.ly/1b56be7502a4
,
Nov 12
Title corrected as requested in C#1.
,
Nov 13
,
Nov 13
Thanks for the issue... As per comment #0, Tried to reproduce the issue on reported chrome 70.0.3538.102 using Mac 10.14.0. Attaching screencast for reference. Steps: ----- 1. Launched chrome 2. Opened given script and opened Dev tools> Network >XHR 3. Clicked on Run and observed tow responses As we have not seen values> param1: 'value1', param2: 'value2', param3: 'value3' as per attached screencast. @Reporter: Could you please check the attached screen cast and please let us know if anything missed from our end.
,
Nov 13
Actually it was my mistake on this too, because on my demo video the code is a little different than the actual JSFiddle. But it doesn't really make any difference. I can see in your video that your request is also sending a body (even if it's not JSON formatted). If you try to click "Replay XHR" on that request, you will see that the body is missing on the new request. And this is the correct JSFiddle link: http://jsfiddle.net/9khcgu7j/3/
,
Nov 13
Thank you for providing more feedback. Adding the requester to the cc list. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Nov 13
,
Nov 14
Able to reproduce the issue on the reported chrome 67.0.3396.99,latest canary 69.0.3486.0 using Windows 10, Mac 10.14.0 ,Ubuntu 14.04. Below is the bisect information for same. Bisect Info: ================ Good build: 65.0.3218.0 Bad build: 65.0.3219.0 CHANGELOG URL: You are probably looking for a change made after 528737 (known good), but no later than 528738 (first known bad). https://chromium.googlesource.com/chromium/src/+log/2c830410fd8a0d50618b00a97ac314f5ea063a1f..927fd20565f2e2192a61f17013816d2cf3f9720b Suspect: https://chromium.googlesource.com/chromium/src/+/927fd20565f2e2192a61f17013816d2cf3f9720b Reviewed-on: https://chromium-review.googlesource.com/849117 Eugene Ostroukhov: Please confirm the issue and help in re-assigning if it is not related to your change. Note: As Author is not active (last visited > 30 days ago ). Hence, CC'ing the reviewer and also changing the owner as per bisect information. Thanks!
,
Nov 14
,
Dec 29
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/cd6f155a01135de13ec02382b6e0996cafbaa63b commit cd6f155a01135de13ec02382b6e0996cafbaa63b Author: Joey Arhar <jarhar@chromium.org> Date: Sat Dec 29 00:24:36 2018 [DevTools] Re-add post data to XHRReplayData This re-adds post data saved in XHRReplayData which was removed in http://crrev.com/c/849117 That change fixed a performance issue which I could not reproduce with this patch applied. Bug: 904462 Change-Id: Iacd677e235956922b9899d04b670f7ea66c4d09a Reviewed-on: https://chromium-review.googlesource.com/c/1389017 Reviewed-by: Dmitry Gozman <dgozman@chromium.org> Commit-Queue: Joey Arhar <jarhar@chromium.org> Cr-Commit-Position: refs/heads/master@{#619213} [modify] https://crrev.com/cd6f155a01135de13ec02382b6e0996cafbaa63b/third_party/blink/renderer/core/inspector/inspector_network_agent.cc [modify] https://crrev.com/cd6f155a01135de13ec02382b6e0996cafbaa63b/third_party/blink/renderer/core/inspector/inspector_network_agent.h [modify] https://crrev.com/cd6f155a01135de13ec02382b6e0996cafbaa63b/third_party/blink/renderer/core/inspector/network_resources_data.cc [modify] https://crrev.com/cd6f155a01135de13ec02382b6e0996cafbaa63b/third_party/blink/renderer/core/inspector/network_resources_data.h [modify] https://crrev.com/cd6f155a01135de13ec02382b6e0996cafbaa63b/third_party/blink/renderer/core/probe/core_probes.pidl [modify] https://crrev.com/cd6f155a01135de13ec02382b6e0996cafbaa63b/third_party/blink/renderer/core/xmlhttprequest/xml_http_request.cc [add] https://crrev.com/cd6f155a01135de13ec02382b6e0996cafbaa63b/third_party/blink/web_tests/http/tests/inspector-protocol/network/resources/cors-return-post.php [add] https://crrev.com/cd6f155a01135de13ec02382b6e0996cafbaa63b/third_party/blink/web_tests/http/tests/inspector-protocol/network/xhr-post-replay-cors-expected.txt [add] https://crrev.com/cd6f155a01135de13ec02382b6e0996cafbaa63b/third_party/blink/web_tests/http/tests/inspector-protocol/network/xhr-post-replay-cors.js
,
Dec 29
I submitted a fix which should be in canary within the next 24 hours, ibrahim.alexnandru@gmail.com let me know if you can reproduce on canary: https://www.google.com/chrome/canary/
,
Jan 15
Sorry for my delay on this. I can confirm that it works as expected on Canary. Thank you!
,
Jan 15
|
||||||||||
►
Sign in to add a comment |
||||||||||
Comment 1 by ibrahim....@gmail.com
, Nov 12