Issue metadata
Sign in to add a comment
|
Missing form-data when response is 302 redirect
Reported by
j0hn.com...@gmail.com,
Aug 16 2017
|
||||||||||||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36 Steps to reproduce the problem: 1. Open the web developer tools 2. Go to the network tab and check the preserve log option 3. Submit a post form to and endpoint that processes it and returns a redirection. 4. Check the first request, which is the POST to the endpoint and look for the form-data information. It's not there if the response of the request is a 302 redirect. What is the expected behavior? The form data sent on the POST request should be visible on that request so i can check what did the form sent What went wrong? I cannot see the form data sent on the request. Did this work before? N/A Chrome version: 60.0.3112.90 Channel: stable OS Version: OS X 10.12.6 Flash Version:
,
Aug 17 2017
FYI this could be related to Issue 747812
,
Aug 23 2017
@jam -- Could you please confirm if this is related to issue 747812 and provide us any update on this. Thanks!
,
Sep 19 2017
I'm seeing this after Chrome updated to Version 61.0.3163.91. Previous Version 60.0.3112.113 confirmed working (was seeing form data on the same POST that is now broken in 61). I can also confirm form data appears fine when the POST returns 200, and the bug is at least affecting POST responses with 302, where the form data disappears from network tab response (confirmed on the same endpoint using Charles to modify the status code in the response). This is rather troublesome considering 302 is not abnormal on a POST response.
,
Sep 20 2017
Camille: can you ptal?
,
Sep 20 2017
So I don't have time to look at it today but I have an idea about what happens. My guess is this happens because the 302 turns the request into a GET. In that case we delete the post data associated with the request (https://cs.chromium.org/chromium/src/content/browser/frame_host/navigation_request.cc?dr=CSs&l=576). Since DevTools only hears about the request when the request is ready to commit, it doesn't have access to the post data anymore. This would make it a duplicate of issue 760924 .
,
Sep 22 2017
I agree with Camille's initial guess. 1) common_params.post_data is reset here: https://cs.chromium.org/chromium/src/content/browser/frame_host/navigation_request.cc?dr=CSs&q=%22common_params_.post_data+%3D+nullptr%22&l=576 2) After the navigation commits in the browser, it is sent back to the renderer process: https://cs.chromium.org/chromium/src/content/renderer/render_frame_impl.cc?type=cs&q=%22request.SetHTTPBody(GetWebHTTPBodyForRequestBody(common_params.post_data)%22&l=6128 3) Then the InspectorNetworkAgent make use of it. It is sent to the javascript frontend. See Network.requestWillBeSent The problem is that InspectorNetworkAgent::WillSendRequest is called after the request has been sent, the redirects made and the response received. So fixing issue 760924 will solve this one too.
,
Nov 15 2017
|
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by l...@chromium.org
, Aug 16 2017