PAC: FindProxyForURL host.length terminates call

RESOLVED WORKSFORME

Status

()

Firefox
General
RESOLVED WORKSFORME
13 years ago
8 years ago

People

(Reporter: Leigh L. Klotz, Jr., Unassigned)

Tracking

2.0 Branch
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

13 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20050830 Firefox/1.6a1
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20050830 Firefox/1.6a1

The following proxy.pac file works OK and the alert shows up in the JavaScript
Console.  If you remove the comment and allow host.length to print, it doesn't
print, and the proxy host does not get used.  It looks like host.length is
getting an error.

function  FindProxyForURL(url, host)
{
  var proxy = "PROXY 127.0.0.1:8000";

  if (host != null && host != "") {
    alert("Host is " + host);
//    alert("host.length = " + host.length());
  }
   return proxy;
 }



Reproducible: Always

Steps to Reproduce:
1. Put the proxies.pac file in a file.
2. Refer to it in the automatic proxy by file://localhost/path/to/file.pac
3. Verify that proxy host is used and check JavaScript console for printout.
4. Remove "//" comment before host.length line
5. Press Reload on automatic proxy
6. Verify that proxy is not used and and check JavaScript console for lack of
printout.

Actual Results:  
Access to host.length seems to throw an error.

Expected Results:  
host.length should return a number.

This worked until 20050826 trunk build.  I haven't tried intermediate ones.
(Reporter)

Comment 1

13 years ago
Created attachment 194337 [details]
This pac file terminates early.
(Reporter)

Comment 2

13 years ago
Created attachment 194338 [details]
This pac file works because it doesn't use host.length.
(Reporter)

Updated

13 years ago
Summary: In, FindProxyForURL host.length terminates call → PAC: FindProxyForURL host.length terminates call
This bug was reported on Firefox 2.x or older, which is no longer supported and will not be receiving any more updates. I strongly suggest that you update to Firefox 3.6.3 or later, update your plugins (flash, adobe, etc.), and retest in a new profile. If you still see the issue with the updated Firefox, please post here. Otherwise, please close as RESOLVED > WORKSFORME
http://www.mozilla.com
http://support.mozilla.com/kb/Managing+profiles
http://support.mozilla.com/kb/Safe+mode
Version: unspecified → 2.0 Branch
No reply, INCOMPLETE. Please retest with Firefox 3.6.x or later and a new profile (http://support.mozilla.com/kb/Managing+profiles). If you continue to see this issue with the newest firefox and a new profile, then please comment on this bug.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → INCOMPLETE
(Reporter)

Comment 5

8 years ago
In FF 3.6.3 this now correctly reports an error in the Error Console about ".length()" and correctly reports alerts with ".length".
Resolution: INCOMPLETE → WORKSFORME
You need to log in before you can comment on or make changes to this bug.