← Back to team overview

desktop-packages team mailing list archive

[Bug 878375] [NEW] Enabling protocol-less URLs messes up named hosts resolution

 

Public bug reported:

Problem appeared with Firefox 7.0, which added the protocol-less URL feature. As far as I can see, it's still present on Fx8 betas as well.
Basically, handling of URLs using named hosts (for example, "localhost") instead of IP or DNS is unreliable, because Firefox strips the protocol from the URL and then confuses the resulting URL with normal text to search for.

I've noticed two manifestations of it so far.

1) First case when this happens : using a bookmark set to a page on
localhost.

Steps to reproduce :
- Make sure you have the browser.urlbar.trimURLs config variable to true (default value)
- Have a localhost web server on your machine.
- Visit a page on this localhost and bookmark it.
- Try to load the page from the bookmark.

Instead of loading the page, Firefox loads a Google search for the stripped URL.
e.g., if you bookmark the page at http://localhost/myProject/index.php, accessing the bookmark in Firefox will redirect to the Google search for "localhost/myProject/index.php".

2) Second case : using a relative path in JS core functions.
For example, visiting a page that uses a Worker, itself calling the importScript function with a relative path.
It works fine when using either an IP or a real domain name in the URL, but not when using "localhost": in that case the page will fail and throw an exception "Couldn't find domain".

For the moment, setting browser.urlbar.trimURLs to false in Firefox 7
fixes those problems, but still : the default mode of a web browser
should not mess with the URL resolution process... :-/

** Affects: firefox (Ubuntu)
     Importance: Undecided
         Status: New

** Description changed:

  Problem appeared with Firefox 7.0, which added the protocol-less URL feature. As far as I can see, it's still present on Fx8 betas as well.
  Basically, handling of URLs using named hosts (for example, "localhost") instead of IP or DNS is unreliable, because Firefox strips the protocol from the URL and then confuses the resulting URL with normal text to search for.
  
  I've noticed two manifestations of it so far.
  
  1) First case when this happens : using a bookmark set to a page on
  localhost.
  
  Steps to reproduce :
  - Make sure you have the browser.urlbar.trimURLs config variable to true (default value)
  - Have a localhost web server on your machine.
  - Visit a page on this localhost and bookmark it.
  - Try to load the page from the bookmark.
  
- Instead of loading the page, Firefox loads a Google search for the stripped URL. 
- e.g., if you bookmark the page at localhost/myProject/index.php, accessing the bookmark in Firefox will redirect to the Google search for "localhost/myProject/index.php".
+ Instead of loading the page, Firefox loads a Google search for the stripped URL.
+ e.g., if you bookmark the page at http://localhost/myProject/index.php, accessing the bookmark in Firefox will redirect to the Google search for "localhost/myProject/index.php".
  
  2) Second case : using a relative path in JS core functions.
  For example, visiting a page that uses a Worker, itself calling the importScript function with a relative path.
  It works fine when using either an IP or a real domain name in the URL, but not when using "localhost": in that case the page will fail and throw an exception "Couldn't find domain".
  
- 
  For the moment, setting browser.urlbar.trimURLs to false in Firefox 7
  fixes those problems, but still : the default mode of a web browser
  should not mess with the URL resolution process... :-/

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to firefox in Ubuntu.
https://bugs.launchpad.net/bugs/878375

Title:
  Enabling protocol-less URLs messes up named hosts resolution

Status in “firefox” package in Ubuntu:
  New

Bug description:
  Problem appeared with Firefox 7.0, which added the protocol-less URL feature. As far as I can see, it's still present on Fx8 betas as well.
  Basically, handling of URLs using named hosts (for example, "localhost") instead of IP or DNS is unreliable, because Firefox strips the protocol from the URL and then confuses the resulting URL with normal text to search for.

  I've noticed two manifestations of it so far.

  1) First case when this happens : using a bookmark set to a page on
  localhost.

  Steps to reproduce :
  - Make sure you have the browser.urlbar.trimURLs config variable to true (default value)
  - Have a localhost web server on your machine.
  - Visit a page on this localhost and bookmark it.
  - Try to load the page from the bookmark.

  Instead of loading the page, Firefox loads a Google search for the stripped URL.
  e.g., if you bookmark the page at http://localhost/myProject/index.php, accessing the bookmark in Firefox will redirect to the Google search for "localhost/myProject/index.php".

  2) Second case : using a relative path in JS core functions.
  For example, visiting a page that uses a Worker, itself calling the importScript function with a relative path.
  It works fine when using either an IP or a real domain name in the URL, but not when using "localhost": in that case the page will fail and throw an exception "Couldn't find domain".

  For the moment, setting browser.urlbar.trimURLs to false in Firefox 7
  fixes those problems, but still : the default mode of a web browser
  should not mess with the URL resolution process... :-/

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/878375/+subscriptions


Follow ups

References