The Trunk: WebClient-Core-ul.116.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: WebClient-Core-ul.116.mcz

commits-2
Levente Uzonyi uploaded a new version of WebClient-Core to project The Trunk:
http://source.squeak.org/trunk/WebClient-Core-ul.116.mcz

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

Name: WebClient-Core-ul.116
Author: ul
Time: 6 July 2018, 11:40:06.899387 pm
UUID: dadb7f92-0eba-43cc-9462-1d19bd874a51
Ancestors: WebClient-Core-ul.115

Handle quoted-string valued parameter for charsets in WebMessage >> textConverterForContentType. Also, don't raise an error when the specified encoding has no matching converter. This fixes a failing SqueakSSL test.

=============== Diff against WebClient-Core-ul.115 ===============

Item was changed:
  ----- Method: WebMessage>>textConverterForContentType (in category 'accessing') -----
  textConverterForContentType
 
  | index contentType |
  contentType := self contentType.
  contentType size < 8 ifTrue: [ ^nil ].
  index := contentType findString: 'charset=' startingAt: 1 caseSensitive: false.
  index = 0 ifTrue: [ ^nil ].
+ contentType := contentType allButFirst: index + 7. "'charset=' size - 1".
+ (contentType beginsWith: '"') ifTrue: [
+ "quoted content-type parameter. see rfc2068 section 3.7"
+ contentType := contentType
+ copyFrom: 2
+ to: (contentType indexOf: $" startingAt: 2) ].
+ ^[ TextConverter newForEncoding: contentType ]
+ on: NoConverterFound
+ do: [ nil ]!
- ^TextConverter newForEncoding: (contentType allButFirst: index + 7) "'charset=' size - 1"!