[squeak-dev] The Trunk: Network-ar.82.mcz

Bert Freudenberg bert at freudenbergs.de
Wed Sep 1 13:38:36 UTC 2010


On 01.09.2010, at 10:25, Frank Shearar wrote:

> On 2010/09/01 07:32, commits at source.squeak.org wrote:
>> Andreas Raab uploaded a new version of Network to project The Trunk:
>> http://source.squeak.org/trunk/Network-ar.82.mcz
>> 
>> ==================== Summary ====================
>> 
>> Name: Network-ar.82
>> Author: ar
>> Time: 1 September 2010, 12:32:08.542 am
>> UUID: aa52635f-d746-5744-b432-582c5ba62b11
>> Ancestors: Network-ul.81
>> 
>> Use HttpUrl when dealing with https, i.e., 'https://encrypted.google.com' asUrl class == HttpUrl
>> 
>> =============== Diff against Network-ul.81 ===============
>> 
>> Item was changed:
>>   ----- Method: Url class>>urlClassForScheme: (in category 'parsing') -----
>>   urlClassForScheme: scheme
>>   	(scheme isNil or: [scheme = 'http']) ifTrue: [^HttpUrl].
>> + 	scheme = 'https' ifTrue: [^HttpUrl].
>>   	scheme = 'ftp' ifTrue: [^FtpUrl].
>>   	scheme = 'file' ifTrue: [^FileUrl].
>>   	scheme = 'mailto' ifTrue: [^MailtoUrl].
>>   	scheme = 'browser' ifTrue: [^BrowserUrl].
>>   	^GenericUrl!
> 
> That reminds me: for my SipStack I would need to touch this method (*), as would any other packages using other kinds of URLs.
> 
> Perhaps we need a registry-based approach, so that we can safely load multiple URL-defining packages?
> 
> I see no point in having SipUrl become part of Network, because most images won't use it. Protocols like HTTP and FTP are pretty much ubiquitous on the other hand, so it makes sense to keep them in Network(-Url).
> 
> frank

The canonical way would be to iterate through Url subclasses in reverse superclass-order to find the most specialized subclass willing to handle a particular scheme.

- Bert -





More information about the Squeak-dev mailing list