New issue
Advanced search Search tips

Issue 922300 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Jan 17
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug

Blocking:
issue 841556
issue 887538



Sign in to add a comment

Apply the X-Requested-With header to all requests

Project Member Reported by ntfschr@chromium.org, Jan 16

Issue description

WebView should apply the X-Requested-With header to all requests, unless already attached.

We currently implement this here [1] for the legacy code path, but we should implement this for the network service path. Also, we should add test coverage.
 
Status: Started (was: Assigned)
WIP http://crrev/c/1413692

Comment 3 by timvolod...@chromium.org, Jan 16 (6 days ago)

Blocking: 841556
Project Member

Comment 4 by bugdroid1@chromium.org, Jan 17 (6 days ago)

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

commit 8824b758b35c2c44deba77d57ac468143acc61aa
Author: Nate Fischer <ntfschr@chromium.org>
Date: Thu Jan 17 02:05:45 2019

AW: apply the X-Requested-With header to all requests

No change to default code path, only network-service path.

The current code path adds the X-Requested-With header to every outgoing
request. This CL does the same for the network service code path.

This also adds tests, since this was previously uncovered. We filter out
one test for the mojo bot because loadUrl() currently doesn't work with
extra headers (which the test relies on).

R=timvolodine@chromium.org, torne@chromium.org

Bug:  922300 
Test: run_webview_instrumentation_test_apk -f AwNetworkConfigurationTest#testRequestedWith*
Change-Id: Ia9cc5f5629b7c8105d036457cbd5805120ed7e6d
Cq-Include-Trybots: master.tryserver.chromium.android:android_mojo
Reviewed-on: https://chromium-review.googlesource.com/c/1413692
Reviewed-by: Richard Coles <torne@chromium.org>
Commit-Queue: Nate Fischer <ntfschr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#623511}
[modify] https://crrev.com/8824b758b35c2c44deba77d57ac468143acc61aa/android_webview/browser/aw_proxying_url_loader_factory.cc
[modify] https://crrev.com/8824b758b35c2c44deba77d57ac468143acc61aa/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientShouldInterceptRequestTest.java
[modify] https://crrev.com/8824b758b35c2c44deba77d57ac468143acc61aa/android_webview/javatests/src/org/chromium/android_webview/test/AwNetworkConfigurationTest.java
[modify] https://crrev.com/8824b758b35c2c44deba77d57ac468143acc61aa/android_webview/javatests/src/org/chromium/android_webview/test/TestAwContentsClient.java
[modify] https://crrev.com/8824b758b35c2c44deba77d57ac468143acc61aa/testing/buildbot/filters/mojo.fyi.network_webview_instrumentation_test_apk.filter

Comment 5 by ntfschr@chromium.org, Jan 17 (6 days ago)

Status: Verified (was: Started)
The final test should be fixed for the network service path after http://crrev/c/1415552 lands.

No manual verification necessary, we have good automated test coverage.

Sign in to add a comment