[squeak-dev] The Inbox: Network-ct.244.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Nov 14 18:46:25 UTC 2020


A new version of Network was added to project The Inbox:
http://source.squeak.org/inbox/Network-ct.244.mcz

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

Name: Network-ct.244
Author: ct
Time: 14 November 2020, 7:46:21.777394 pm
UUID: a88f27af-c0a0-c340-9d0d-60c432537f47
Ancestors: Network-mt.243

Fixes FileUrl >> #retrieveContents which did not work for certain contentTypes because of an intermediary invalid content specification. See NetworkTests-ct.61 (inbox).

=============== Diff against Network-mt.243 ===============

Item was added:
+ ----- Method: MIMEDocument class>>contentType: (in category 'private') -----
+ contentType: aString
+ 
+ 	^ self new
+ 		contentTypeHeaderValue: (MIMEHeaderValue fromMIMEHeader: aString);
+ 		yourself!

Item was changed:
  ----- Method: MIMEDocument class>>contentType:content: (in category 'instance creation') -----
  contentType: aString content: content
  	"create a MIMEObject with the given content-type and content"
  	"MIMEDocument contentType: 'text/plain' content: 'This is a test'"
  	
  	| ans |
+ 	ans := self contentType: aString.
  	
- 	ans := self new.
- 
- 	ans contentTypeHeaderValue: (MIMEHeaderValue fromMIMEHeader: aString).
- 
  	(ans isPlaintext or: [ans isHTML])
  		ifTrue:  [ans content: (self tryToDecodeBody: content as: ans charset)]
  		ifFalse: [ans isMultipart
  					ifTrue: [| separator |
  						separator := ans attachmentSeparator asLowercase.
  						separator ifNil: [self error: 'Bad attachment separater'].
  
  						separator := '--', separator withoutTrailingBlanks.
  						ans addAllParts: (self parseParts: content withSeparator:separator).]
  					ifFalse: [ans content: content]].
+ 	
+ 	^ ans!
- 		
- 	^ ans
- !

Item was changed:
  ----- Method: MIMELocalFileDocument class>>contentType:contentStream: (in category 'instance creation') -----
  contentType: aString contentStream: aStream
+ 
+ 	^ (self contentType: aString)
+ 		contentStream: aStream;
+ 		yourself!
- 	^(self contentType: aString content: nil) contentStream: aStream!



More information about the Squeak-dev mailing list