[PWS] Fix for PWS>>decodeFields:

Reinier van Loon R.L.J.M.W.van.Loon at inter.nl.net
Thu Dec 9 13:53:36 UTC 1999


Hi,

I ran into trouble with PWS when using a URL in the form like:
http://whatever?a=?a=?b=

Notice that a is there twice without a value. The current code in PWS has
problem with it (add: not understood).
Below is the fix:

replace:

      ((dict at: key) isKindOf: String)
  ifTrue: [ dict at: key put: (OrderedCollection with: (dict at: key)) ].

with:

      (dict at: key) class = OrderedCollection
  ifFalse: [ dict at: key put: (OrderedCollection with: (dict at: key)) ].

I know it is ugly to test on a specific class. If anyone has a better
solution, tell me.

Regards, Reinier.





More information about the Squeak-dev mailing list