Closed Bug 243397 Opened 20 years ago Closed 20 years ago

PAC: support for non-URL's in preference

Categories

(Firefox :: Settings UI, defect, P2)

x86
Windows XP
defect

Tracking

()

RESOLVED FIXED
Firefox1.0beta

People

(Reporter: mozbug, Assigned: mconnor)

Details

(Keywords: fixed-aviary1.0)

Attachments

(2 files)

User-Agent:       Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040206 Firefox/0.8

When I go tto www.foo.com the browser does not connect to the site, when using 
the proxy.pac file on our proxy server. The JavaScript console says:

Error: LocalFindProxyForURL is not a function
Source File: file:///C:/Program%20Files/Mozilla%
20Firefox/components/nsProxyAutoConfig.js
Line: 79

This same pac file works with IE

Reproducible: Always
Steps to Reproduce:
1.Tools->Options->general->connection settings->Automatic Proxy Configuration 
URL, enter www.proxyserver.com/proxy.pac
2.Open Browser
3.Try to load any page

Actual Results:  
Alert: The connection was refused when trying to contact www.foo.com

Expected Results:  
www.foo.com should have loaded

*** This bug has been marked as a duplicate of 133108 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
Summary: Connection refused with automatic proxy configured → Connection refused with automatic proxy configured
REOPEN:

This may not be the correct dupe.

You need to put a URL, not a hostname/path into the pref.

See if that works.
Status: RESOLVED → UNCONFIRMED
QA Contact: mconnor → benc
Resolution: DUPLICATE → ---
Summary: Connection refused with automatic proxy configured → PAC: Connection refused
hmm, if that's the case, we should probably enforce that in the panel, instead
of letting users futz with it.

-> taking, provisionally blocking 1.0 since I'll fix this.
Assignee: firefox → mconnor
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: blocking1.0+
Target Milestone: --- → Firefox1.0beta
Flags: blocking-aviary1.0RC1+
If there's a localization requirement here involved in warning people about
invalid data, then - 1.0.
Flags: blocking-aviary1.0+ → blocking-aviary1.0-
note to self: use nsIURIFixup for this (per biesi)
This PAC problem is using a URL rather than a hostname/path
the backend needs/expects the URI, not a hostname/path.  The front end should
correct user input instead of bloating the backend.  So the bug is that we don't
convert non-URIs to URIs when setting the pref.
Comment on attachment 154722 [details] [diff] [review]
use nsIURIFixup to convert strings to a URI

blake, this ia a 1.0PR blocker, so sooner is better :)
Attachment #154722 - Flags: review?(firefox)
zero l10n impact, re-plussing.
Flags: blocking-aviary1.0- → blocking-aviary1.0+
Whiteboard: [have patch]
Comment on attachment 154722 [details] [diff] [review]
use nsIURIFixup to convert strings to a URI

Looks good, check it in.
Attachment #154722 - Flags: review?(firefox) → review+
Attachment #154722 - Flags: approval-aviary?
Mike, should this be saving the page data if an exception is caught? (i.e. the
URI fix up failed)?
Is this ready to land or does Ben's question still require a response?
damn, I typed a long answer like an hour after he asked it.  Dunno what I did there.

The only reason for the try/catch is to prevent unanticipated future weirdness
from breaking the OK button.  I'd rather not have a dialog for this, since it
seems like the vast majority of users never have a problem, and I've yet to have
nsIURIFixup fail for me, regardless of odd characters etc.
Comment on attachment 154722 [details] [diff] [review]
use nsIURIFixup to convert strings to a URI

a=asa for aviary checkin
Attachment #154722 - Flags: approval-aviary? → approval-aviary+
fixed on branch
Status: NEW → ASSIGNED
Keywords: fixed-aviary1.0
Overall, I think this is a good fix. I'm going to verify/wontfix bug 82992,
which is about the trunk.

I know I've objected to fixing this in the mozilla suite, but that is because I
thought the goal of that product should be to favor correctness when possible.
An end-user focused product like FF should have little nice things like this.

My only concern is that I don't know what input types nsIURIFixup will use or
allow (domain guessing, internet keywords, etc...) This has caused problems
before, and I will not be spending any immediate time looking at this problem
unless I need to. This maybe documented already, and unknown to me due to ignorance.
Summary: PAC: Connection refused → PAC: support for non-URL's in preference
Status: ASSIGNED → RESOLVED
Closed: 20 years ago20 years ago
Resolution: --- → FIXED
Whiteboard: [have patch]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: