New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 826158 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Apr 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug

Blocking:
issue 740783



Sign in to add a comment

[desktop-pwas] Out-of-scope POST form submissions don't include content type header

Project Member Reported by mgiuca@chromium.org, Mar 27 2018

Issue description

Chrome Version: 67
OS: Chrome

What steps will reproduce the problem?
(1) Install https://piotrswigon.github.io/pwa-demo/postoffscope/
(2) Click the button on the page

What is the expected result?
(3) The page opens in a new tab
(4) After three seconds the page redirects to https://piotrswigon.github.io/pwa-demo/postoffscope/#cameBack

(Because link capturing is disabled, it doesn't go back to the app.)

What happens instead?
(3) The page opens in a new tab
(4) After three seconds the page redirects to itself

I think this is because the server chooses the eventual redirect target based on the Referer, and we are not sending a Referer header with the out-of-scope link.

Spun off from  Issue 781113 . This is a low priority.
 

Comment 1 by mgiuca@chromium.org, Mar 27 2018

Blocking: 740783

Comment 2 by ortuno@chromium.org, Mar 27 2018

Cc: ortuno@chromium.org
 Issue 826161  has been merged into this issue.

Comment 3 by ortuno@chromium.org, Mar 27 2018

Labels: -Pri-3 Pri-1
We discovered this issue because of a similar P0 issue on Android. We should take a look ASAP.

Comment 4 by ortuno@chromium.org, Mar 27 2018

Labels: M-67
Status: Started (was: Assigned)
Summary: [desktop-pwas] Out-of-scope POST form submissions don't include content type header (was: [desktop-pwas] Out-of-scope links do not send Referer)
Project Member

Comment 6 by bugdroid1@chromium.org, Apr 9 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/971d5b4f795f3b0827ff46013d94c127baf535b9

commit 971d5b4f795f3b0827ff46013d94c127baf535b9
Author: Giovanni Ortuño Urquidi <ortuno@chromium.org>
Date: Mon Apr 09 07:25:05 2018

desktop-pwas: Forward Content-Type for out-of-scope form submissions

Otherwise POST form submissions could lose their encoding type.

There are two parts to this change:

1. Save the request headers in NavigationHandle, so that we can access
   the headers in NavigationThrottles.

2. Change BookmarkAppNavigationThrottleUtils::OpenNewForegroundTab to
   also include the Content-Type header in the new navigation.

Bug:  826158 
Change-Id: I30a575fcdfab15442bb331c20685a988df3b4def
Reviewed-on: https://chromium-review.googlesource.com/991616
Commit-Queue: Giovanni Ortuño Urquidi <ortuno@chromium.org>
Reviewed-by: Matt Giuca <mgiuca@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#549119}
[modify] https://crrev.com/971d5b4f795f3b0827ff46013d94c127baf535b9/chrome/browser/extensions/bookmark_app_navigation_throttle_browsertest.cc
[modify] https://crrev.com/971d5b4f795f3b0827ff46013d94c127baf535b9/chrome/browser/extensions/bookmark_app_navigation_throttle_utils.cc
[modify] https://crrev.com/971d5b4f795f3b0827ff46013d94c127baf535b9/content/browser/frame_host/navigation_handle_impl.cc
[modify] https://crrev.com/971d5b4f795f3b0827ff46013d94c127baf535b9/content/browser/frame_host/navigation_handle_impl.h
[modify] https://crrev.com/971d5b4f795f3b0827ff46013d94c127baf535b9/content/browser/frame_host/navigation_handle_impl_unittest.cc
[modify] https://crrev.com/971d5b4f795f3b0827ff46013d94c127baf535b9/content/browser/frame_host/navigation_request.cc
[modify] https://crrev.com/971d5b4f795f3b0827ff46013d94c127baf535b9/content/public/browser/navigation_handle.cc
[modify] https://crrev.com/971d5b4f795f3b0827ff46013d94c127baf535b9/content/public/browser/navigation_handle.h

Status: Fixed (was: Started)

Sign in to add a comment