Closed
Bug 1494823
Opened 7 years ago
Closed 7 years ago
PAC scripts do not receive full url
Categories
(WebExtensions :: General, defect)
WebExtensions
General
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 1337001
People
(Reporter: tdriley, Unassigned)
Details
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36
Steps to reproduce:
Firefox Developer Edition 63.0b9 (64-bit)
Implement a PAC script in a Firefox Web Extension.
Look at the value of the 'url' arg inside the FindProxyForURL func (the only way to do this seems to be to send a message to another part of the extension which can console.log).
Actual results:
Any logic inside the PAC script which uses rules relating to paths will not work.
Expected results:
If the value of 'url' was a URL, functionality such as regex matching can be used in the PAC script logic. All other implementations of FindProxyForURL I have seen will provide this information in the url arg.
Updated•7 years ago
|
Product: Firefox → WebExtensions
Updated•7 years ago
|
Flags: needinfo?(mixedpuppy)
Component: Untriaged → General
Comment 1•7 years ago
|
||
I don't really understand what you are doing. A small/simple extension illustrating the bug would help.
It's useful to note that the "PAC" in our api is not really up to snuff with a PAC one would register in preferences. If you need a real PAC file, you should set the autoConfigUrl[1]. If you need to be able to do custom logic in the extension, you should probably switch to using proxy.onRequest[2].
[1] https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/proxy/settings
[2] https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/proxy/onRequest
Flags: needinfo?(mixedpuppy) → needinfo?(tdriley)
(In reply to Shane Caraveo (:mixedpuppy) from comment #1)
> I don't really understand what you are doing. A small/simple extension
> illustrating the bug would help.
>
> It's useful to note that the "PAC" in our api is not really up to snuff with
> a PAC one would register in preferences. If you need a real PAC file, you
> should set the autoConfigUrl[1]. If you need to be able to do custom logic
> in the extension, you should probably switch to using proxy.onRequest[2].
>
> [1]
> https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/
> proxy/settings
> [2]
> https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/
> proxy/onRequest
OK I was working on an extension I started last year before FF supported proxy.onRequest, so had been registering a PAC script[1]. If this is used for setting proxies, you will see the missing functionality I described above.
[1] https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/proxy/register
Flags: needinfo?(tdriley)
Updated•7 years ago
|
Flags: needinfo?(mixedpuppy)
Updated•7 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Flags: needinfo?(mixedpuppy)
Resolution: --- → DUPLICATE
Summary: Web Extension PAC script FindProxyForURL arg 'url' does not include path → PAC scripts do not receive full url
You need to log in
before you can comment on or make changes to this bug.
Description
•