[squeak-dev] The Trunk: Network-nice.107.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Feb 16 00:50:38 UTC 2011

Nicolas Cellier uploaded a new version of Network to project The Trunk:

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

Name: Network-nice.107
Author: nice
Time: 16 February 2011, 1:50:18.09 am
UUID: 57204c5b-6965-4865-b29e-f563894d6367
Ancestors: Network-nice.106

In the past I simplified MailMessage>>#readStringLineFrom: to just use generic Stream #nextLine utility.
But it's nothing more than 1-message, 1-implementor, 1-sender so let it just be nothing.
Anyway, when ones reach his quota of adding methods to Squeak, his next duty shall be removing old ones ;)
Note that I bypassed deprecation, fingers crossed.

=============== Diff against Network-nice.106 ===============

Item was changed:
  ----- Method: MailMessage>>fieldsFrom:do: (in category 'parsing') -----
  fieldsFrom: aStream do: aBlock
  	"Invoke the given block with each of the header fields from the given stream. The block arguments are the field name and value. The streams position is left right after the empty line separating header and body."
  	| savedLine line s |
+ 	savedLine := aStream nextLine.
- 	savedLine := self readStringLineFrom: aStream.
  	[aStream atEnd] whileFalse: [
  		line := savedLine.
  		(line isEmpty) ifTrue: [^self].  "quit when we hit a blank line"
+ 		[savedLine := aStream nextLine.
- 		[savedLine := self readStringLineFrom: aStream.
  		 (savedLine size > 0) and: [savedLine first isSeparator]] whileTrue: [
  			"lines starting with white space are continuation lines"
  			s := ReadStream on: savedLine.
  			s skipSeparators.
  			line := line, ' ', s upToEnd].
  		self reportField: line withBlanksTrimmed to: aBlock].
  	"process final header line of a body-less message"
  	(savedLine isEmpty) ifFalse: [self reportField: savedLine withBlanksTrimmed to: aBlock].

Item was removed:
- ----- Method: MailMessage>>readStringLineFrom: (in category 'parsing') -----
- readStringLineFrom: aStream 
- 	"Read and answer the next line from the given stream. Consume the carriage return but do not append it to the string."
- 	^aStream nextLine!

More information about the Squeak-dev mailing list