A new version of Network was added to project The Inbox:
http://source.squeak.org/inbox/Network-fbs.86.mcz==================== Summary ====================
Name: Network-fbs.86
Author: fbs
Time: 2 September 2010, 12:59:08.754 pm
UUID: 48ad5323-5811-6144-a0dc-3de4c9c61a17
Ancestors: Network-fbs.85
Configurable scheme->Url class mapping.
"Url registerUrlClass: HttpUrl forScheme: 'http'" lets
'
http://localhost/' asUrl
return an HttpUrl.
If no explicit mapping exists, foo asUrl returns a GenericUrl.
=============== Diff against Network-fbs.85 ===============
Item was changed:
----- Method: Url class>>urlClassForScheme: (in category 'parsing') -----
urlClassForScheme: scheme
+ ^ SchemeRegistry at: scheme ifAbsent: [GenericUrl].!
- ^ schemeRegistry at: scheme ifAbsent: [GenericUrl].!
Item was changed:
----- Method: Url class>>registerUrlClass:forScheme: (in category 'class initialization') -----
registerUrlClass: aClass forScheme: aString
+ SchemeRegistry at: aString put: aClass.!
- schemeRegistry at: aString put: aClass.!
Item was changed:
Object subclass: #Url
instanceVariableNames: 'fragment'
+ classVariableNames: 'SchemeRegistry'
- classVariableNames: ''
poolDictionaries: ''
category: 'Network-Url'!
- Url class
- instanceVariableNames: 'schemeRegistry'!
!Url commentStamp: '<historical>' prior: 0!
A Uniform Resource Locator. It specifies the location of a document on the Internet. The base class is abstract; child classes break different types of URLs down in ways appropriate for that type.!
- Url class
- instanceVariableNames: 'schemeRegistry'!
Item was changed:
----- Method: Url class>>initialize (in category 'class initialization') -----
initialize
super initialize.
+ SchemeRegistry := Dictionary new.
+ SchemeRegistry
- schemeRegistry := Dictionary new.
- schemeRegistry
at: 'browser' put: BrowserUrl;
at: 'file' put: FileUrl;
at: 'ftp' put: FtpUrl;
at: 'http' put: HttpUrl;
at: 'https' put: HttpUrl;
at: 'mailto' put: MailtoUrl.!