The Trunk: Network-eem.224.mcz

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

The Trunk: Network-eem.224.mcz

commits-2
Eliot Miranda uploaded a new version of Network to project The Trunk:
http://source.squeak.org/trunk/Network-eem.224.mcz

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

Name: Network-eem.224
Author: eem
Time: 3 May 2018, 12:54:19.600192 am
UUID: d2a302ef-6dfa-405c-af25-c428b2e90431
Ancestors: Network-pre.223

Use isAsciiString instead of inlining it using isAscii, which permits performance improvement if isAsciiString is well-implemented.

=============== Diff against Network-pre.223 ===============

Item was changed:
  ----- Method: MIMEHeaderValue>>asHeaderValue (in category 'printing') -----
  asHeaderValue
  | strm result |
  strm := WriteStream on: (String new: 20).
  strm nextPutAll: mainValue.
  parameters associationsDo: [:e |
  strm
  nextPut: $; ;
  nextPutAll: e key;
  nextPutAll: '=';
  nextPutAll: e value].
+ ^ (result := strm contents) isAsciiString
+ ifFalse: [QEncodingMimeConverter mimeEncode: result]
+ ifTrue: [result]
- ^ ((result := strm contents) anySatisfy: [:c | c isAscii not])
- ifTrue: [QEncodingMimeConverter mimeEncode: result]
- ifFalse: [result]
  !