Content-Type is blanked after 307/308 redirect and then reload+resubmit
Reported by
j...@simplynuc.com,
Jul 5
|
|||||||
Issue descriptionUserAgent: 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).
,
Jul 6
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
,
Jul 6
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.
,
Jul 6
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.
,
Jul 9
,
Jul 9
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.
,
Jul 9
,
Jul 11
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.!
,
Jul 11
#8 your content-type was blank after refresh as well. Prior to refresh it was properly application/x-www-form-urlencoded
,
Jul 11
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
,
Jul 13
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 |
|||||||
Comment 1 by j...@simplynuc.com
, Jul 5