Closed Bug 244220 Opened 20 years ago Closed 20 years ago

[FIX]newURI fails for external protocols blocked via prefs

Categories

(Core :: Networking, defect, P1)

x86
Linux
defect

Tracking

()

RESOLVED FIXED
mozilla1.8alpha1

People

(Reporter: bzbarsky, Assigned: bzbarsky)

Details

Attachments

(2 files)

The problem is that newURI tries to get a protocol handler.  That fails for
protocols blocked via prefs, and then the URI object is not created....  This is
a problem in places where we want to pass URIs around as nsIURI.

I'd think we would want to block these protocols on the
newChannel/getProtocolHandler level but _not_ the newURI level (as in, maybe
newURI should fall back to the external protocol handler or by-hand construction
of an nsSimpleURI?)

darin, I'm willing to code that up, but I'd like to hear what you consider
acceptable solutions to this problem first.  ;)
Yeah, perhaps allocating a simple URI is best in this case.  You might want to
think about how the other nsIIOService methods should behave with schemes that
do not have an associated protocol handler.  Or, do we want to maybe create a
protocol handler implementation for blocked protocols?  :-/
Attached patch Patch diff -wSplinter Review
Attachment #149001 - Flags: superreview?(darin)
Attachment #149001 - Flags: review?(darin)
Taking
Assignee: darin → bzbarsky
Priority: -- → P1
Summary: newURI fails for external protocols blocked via prefs → [FIX]newURI fails for external protocols blocked via prefs
Target Milestone: --- → mozilla1.8alpha
Comment on attachment 149001 [details] [diff] [review]
Patch diff -w

>Index: netwerk/base/src/nsIOService.cpp

>+      } else {

  }
  else {


r+sr=darin
Attachment #149001 - Flags: superreview?(darin)
Attachment #149001 - Flags: superreview+
Attachment #149001 - Flags: review?(darin)
Attachment #149001 - Flags: review+
Fixed for 1.8a1.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
I meant 1.8a2
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: