New issue
Advanced search Search tips

Issue 860546 link

Starred by 1 user

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

Content-Type is blanked after 307/308 redirect and then reload+resubmit

Reported by j...@simplynuc.com, Jul 5

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36

Example URL:

Steps to reproduce the problem:
1. POST to a page which returns a 307/308 redirect.
2. Refresh page.

What is the expected behavior?
Form is properly resubmitted as per HTTP/HTML specs and decades of browser behavior. No new history entry is made.

What went wrong?
Form is resubmitted with a blank Content-Type. A new history entry is made.

Did this work before? N/A 

Chrome version: 67.0.3396.99  Channel: stable
OS Version: 
Flash Version: 

Breaks PHP ($_POST is only populated for application/x-www-form-urlencoded). Probably also breaks other applications/frameworks. Violates HTTP spec (content-type SHOULD be supplied unless unknown). Violates HTML spec (default content-type for form data is application/x-www-form-urlencoded).
 
Forgot the example URL: https://jfr.im/307test/
I can't reproduce this, using that example URL:

First request:
t=128988 [st= 2]        HTTP_TRANSACTION_HTTP2_SEND_REQUEST_HEADERS
                        --> :authority: jfr.im
                            :method: POST
                            :path: /307test/307.php
                            :scheme: https
                            accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
                            accept-encoding: gzip, deflate, br
                            accept-language: en-US,en;q=0.9
                            cache-control: max-age=0
                            content-length: 9
                            content-type: application/x-www-form-urlencoded
                            origin: https://jfr.im
                            referer: https://jfr.im/307test/
                            upgrade-insecure-requests: 1
                            user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36

After redirect:
t=129010 [st=24]        HTTP_TRANSACTION_HTTP2_SEND_REQUEST_HEADERS
                        --> :authority: jfr.im
                            :method: POST
                            :path: /307test/200.php
                            :scheme: https
                            accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
                            accept-encoding: gzip, deflate, br
                            accept-language: en-US,en;q=0.9
                            cache-control: max-age=0
                            content-length: 9
                            content-type: application/x-www-form-urlencoded
                            origin: https://jfr.im
                            referer: https://jfr.im/307test/
                            upgrade-insecure-requests: 1
                            user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36

Could you disable any extensions, and provide a chrome://net-export/ log of this?  Instructions:  https://dev.chromium.org/for-testers/providing-network-details
Did you refresh after the redirect? That's when the issue occurs.

I'll attach two logs, one from non-incognito, one from incognito. Incognito behaves differently for some reason. The only extension I have installed is "GNOME Shell Integration" which unfortunately Chromium believes was installed by enterprise policy.

Interestingly, in incognito, it asked if I wanted to re-submit the form data when I refreshed. It doesn't do that in a normal window.

Both of these don't seem to have a content-type request header after the refresh at all. The behavior I've normally been seeing in Dev Tools (and saw the first time I did the log) was an empty content-type header being sent.
incognito-chrome-net-export-log.json
98.1 KB View Download
chrome-net-export-log.json
316 KB View Download
I take that back - it does ask me to confirm resubmission in a normal window. So incognito and normal appear to be behaving the same.
Labels: Needs-Triage-M67
Components: -Internals>Network UI>Browser>Navigation
Sorry, missed the refresh part.  That means this is a navigation issue - for some reason, it's not caching the content-type for use with the re-submission.
Summary: Content-Type is blanked after 307/308 redirect and then reload+resubmit (was: Content-Type is blanked after 307/308 redirect)
Cc: phanindra.mandapaka@chromium.org
Labels: Needs-Feedback Triaged-ET
Unable to reproduce the issue on reported chrome version 67.0.3396.99 using Ubuntu 17.10 . Attaching screencast for reference.
Steps: 
---------
1. Launched reported chrome 
2. Navigated to given url in the comment #1 ""https://jfr.im/307test/"" and opened Dev tools >Network 
3. Clicked on GO and noticed REQUEST_HEADERS and refreshed page again noticed REQUEST_HEADERS
As we are observed that the same response in the REQUEST_HEADERS both times.

@Reporter: Could you please review the attached screen-cast and confirm if anything being missed here.

Thanks.!
860546.webm
5.8 MB View Download
#8 your content-type was blank after refresh as well. Prior to refresh it was properly application/x-www-form-urlencoded
Screenshot from 2018-07-11 10-09-36.png
493 KB View Download
Project Member

Comment 10 by sheriffbot@chromium.org, Jul 11

Labels: -Needs-Feedback
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
Labels: M-69 Target-69 FoundIn-69 OS-Mac OS-Windows
Status: Untriaged (was: Unconfirmed)
Able to reproduce the issue on Mac 10.13.3, win-10 and Ubuntu 17.10 using chrome reported version #67.0.3396.99 and latest canary #69.0.3489.0.
This is a non-regression issue as it is observed from M60 old builds. 

Hence, marking it as untriaged to get more inputs from dev team.

Thanks...!!

Sign in to add a comment