[Pkg] The Trunk: Network-ul.225.mcz

commits at source.squeak.org commits at source.squeak.org
Fri May 18 10:52:26 UTC 2018


Levente Uzonyi uploaded a new version of Network to project The Trunk:
http://source.squeak.org/trunk/Network-ul.225.mcz

==================== Summary ====================

Name: Network-ul.225
Author: ul
Time: 18 May 2018, 12:52:04.236589 pm
UUID: 296fc64b-8ae0-44f7-8ff8-e7ab979be83e
Ancestors: Network-eem.224

Fixed MailAddressTokenizer class >> #nonAtomSet.
It returned 0 instead of a CharacterSet on first invocation.
It initialized CSNonAtom to a Set instead of a CharacterSet.
Added more comments too.

=============== Diff against Network-eem.224 ===============

Item was changed:
  ----- Method: MailAddressTokenizer class>>nonAtomSet (in category 'class initialization') -----
  nonAtomSet
+ 	"Create a ByteCharacterSet to ensure quick parsing of the email address string, which must be a ByteString (UTF-8 encoded)"
- 	"(from RFC 6531)"
  
+ 	^CSNonAtom ifNil: [
+ 		CSNonAtom := CharacterSet new
+ 			"Atom characters as defined in RFC 2822 3.2.4"
- 	^CSNonAtom ifNil: [ | notAtoms | 
- 		notAtoms := CharacterSet new
  			addAll: ($A to: $Z);
  			addAll: ($a to: $z);
  			addAll: ($0 to: $9);
  			addAll: '!!#$%&''*+-/=?^_`{|}~';
+ 			"RFC 6531 allows characters with value > 127 encoded as UTF-8, which means values between 128 and 255 may appear as part of atoms."
+ 			addAll: ((Character value: 128) to: (Character value: 255));
+ 			byteComplement ]!
- 			complement.
- 		CSNonAtom := Set new.
- 		0 to: 127 do: [:v | | c |
- 			c := Character value: v.
- 			(notAtoms includes: c) ifTrue: [CSNonAtom add: c]]]!

Item was changed:
+ (PackageInfo named: 'Network') postscript: '"Rebuild CSNonAtom."
- (PackageInfo named: 'Network') postscript: '"below, add code to be run after the loading of this package"
  MailAddressTokenizer cleanUp: false'!



More information about the Packages mailing list