[Newbies] HTTPSocket>>argString:args

ernst ernst at hisplace.net
Mon Aug 14 11:23:01 UTC 2006


Is there a bug in this method?
An association in the  args dictionary will contain the name of a prameter
and its value as a string. The iteration    assoc value do: [ :value |   
will operate on characters of the value which I think is not intended.
....
args associationsDo: [ :assoc |
		assoc value do: [ :value |
			first ifTrue: [ first := false ] ifFalse: [ argsString nextPut: $& ].
			argsString nextPutAll: assoc key encodeForHTTP.
			argsString nextPut: $=.
			argsString nextPutAll: value encodeForHTTP. ] ].

should be?
....
args associationsDo: [ :assoc |
			first ifTrue: [ first := false ] ifFalse: [ argsString nextPut: $& ].
			argsString nextPutAll: assoc key encodeForHTTP.
			argsString nextPut: $=.
			argsString nextPutAll: assoc value encodeForHTTP ].

-- 
View this message in context: http://www.nabble.com/HTTPSocket%3E%3EargString%3Aargs-tf2102777.html#a5794952
Sent from the Squeak - Beginners forum at Nabble.com.



More information about the Beginners mailing list