window.fetch doesn't use system-wide proxy settings unlike the rest of the requests
Reported by
t.rebo...@gmail.com,
Feb 7 2017
|
|||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:51.0) Gecko/20100101 Firefox/51.0 Steps to reproduce the problem: 1. configure a system wide proxy configuration 2. execute a window.fetch request from any webpage console What is the expected behavior? fetch should use the system wide configuration What went wrong? fetch doesn't use the system wide configuration Did this work before? No Does this work in other browsers? N/A Chrome version: Google Chrome 56.0.2924.87 (Build officiel) (64 bits) Révision 0e9a9a6f3676ae439b78cd9b3f62b4193c3ac7d5-refs/branch-heads/2924@{#895} Channel: stable OS Version: 7 Flash Version: Shockwave Flash 24.0 r0 I tested this with the following config: - Win7 in VBox connected to a VBox network - Debian in VBox with Burp configurated to open a simple HTTP proxy, connected to the same VBox network and with a NAT with the host so that the proxy actually has internet - I first tested this with electron 1.4.15 in a BrowserWindow - I reproduced the bug with Google Chrome Am I missing something obvious?
,
Feb 16 2017
This looks like out of scope for TE, hence adding the respective label for it to triage further.
,
Mar 2 2017
,
Mar 3 2017
This should not happen. Adding component Internals > Network since proxy lookup is done there. If someone has a proxy and windows box handy, I would appreciate attempts to reproduce. Step 2 says "execute a window.fetch request from any webpage console". Does that mean the DevTools console? If so it would be lower priority.
,
Mar 3 2017
In my attempts, I did it in Electron 1.4.15 from the webpage, and from the console. In Google Chrome, I have tested it only from the console. All of that on Windows 7, I haven't tried macOS. I may find some time to reproduce this week-end. I have found a very dirty workaround for my use-case: I enforce the use of the fetch polyfill from github which is built on top of XHR, and it works fine.
,
Mar 3 2017
The expectation isn't that window.fetch() use the system proxy settings... The expectation is that window.fetch() use your profile's proxy settings (which may or may not be the system proxy settings). I tested on Mac Chrome and this works as expected. Sounds like in your testing electron and/or Chrome are not configured to use the system proxy settings
,
Mar 6 2017
I'm not sure I quite understand what you meant, so let me rephrase and tell me if I'm wrong: I have tested on a VM with Windows 7 to configure a system-wide proxy setting (and no other connection was available). Google Chrome 56.0.2924.87 uses it on every request, except when it's a window.fetch (only tested in web console). However when I use jQuery to make a standard Ajax request (built on XHR) it uses the proxy settings (only tested in a web console). I believe the profile's proxy settings was well configurated. In electron, the proxy settings are working in every other requests as well. Is the proxy configuration of fetch different from other kinds of request? That's the only conclusion I can draw from your latest answer, and I believe it's not the case. Also, you've tested on OSX an issue I reported on Windows. I don't believe it's the best way of reproducing.
,
Mar 6 2017
window.fetch() should be using the same proxy settings as other requests from that page (like XHR). I suspect there may have been an issue in your repro case. Can you provide an HTML page with your repro case, and explanation of how you are determining if a request went through proxy or not? You may also find it useful to search for the URLs you are fetching on: chrome://net-internals/#events That can tell you what proxy was ultimately used for the request. Also for your system proxy settings, I suggest setting a single proxy, rather than say a PAC script which has dynamic behaviors depending on the host/path.
,
Mar 6 2017
I will reproduce this tomorrow, but in my previous tests, I used the debug page you indicated: chrome://net-internals/#events and no proxy was used, other connections had multiple requests such as PROXY_CONNECTION if I recall correctly. |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by nyerramilli@chromium.org
, Feb 8 2017