webRequest.RequestFilter does not properly match urls with port

RESOLVED DUPLICATE of bug 1350523

Status

()

Toolkit
WebExtensions: Request Handling
RESOLVED DUPLICATE of bug 1350523
7 months ago
7 months ago

People

(Reporter: Nikola Kocić, Unassigned)

Tracking

55 Branch
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

7 months ago
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0
Build ID: 20170520072017

Steps to reproduce:

webRequest listener does not trigger when urls property has URL with port in address.
For example, this log will never print:

browser.webRequest.onBeforeRequest.addListener(
  () => { console.log("Matched" }, {urls: ["http://127.0.0.1:8000/styles.css"]});

It's not limited to "browser.webRequest.onBeforeRequest", same happens with "browser.webRequest.onResponseStarted" and all other webRequest APIs.

Code for helping reproduce the issue is here:
https://github.com/nikola-kocic/repro-firefox-webrequest-port


Actual results:

Using code from repository above, in Firefox 55.0a1 20170610100201, the following lines are printed in Browser Console:

Loading (all_urls): http://127.0.0.1:8000/
Loading (all_urls): http://127.0.0.1:8000/styles.css
Found URL_WITH_PORT in all_urls
Loading (without port): http://127.0.0.1:8000/styles.css


Expected results:

This works in Chromium 59.0.3071.86 (there is line "Loading (with port)")
 
Loading (all_urls): http://127.0.0.1:8000/
Loading (all_urls): http://127.0.0.1:8000/styles.css
Found URL_WITH_PORT in all_urls
Loading (with port): http://127.0.0.1:8000/styles.css
Loading (without port): http://127.0.0.1:8000/styles.css
Status: UNCONFIRMED → RESOLVED
Last Resolved: 7 months ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1350523
You need to log in before you can comment on or make changes to this bug.