The Trunk: Network-pre.233.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-pre.233.mcz

commits-2
Patrick Rein uploaded a new version of Network to project The Trunk:
http://source.squeak.org/trunk/Network-pre.233.mcz

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

Name: Network-pre.233
Author: pre
Time: 9 May 2019, 4:32:56.848225 pm
UUID: bac3997e-f06a-074d-90cc-12fdca08da2d
Ancestors: Network-pre.232

Deprecates classes and methods related to executing Squeak in a web browser through a browser plugin. They can be loaded through the 60Deprecated-NSPlugin-System-Support package.

=============== Diff against Network-pre.232 ===============

Item was removed:
- ----- Method: FileStream class>>httpPostDocument:args: (in category '*network') -----
- httpPostDocument: url args: argsDict
- | argString |
- argString := argsDict
- ifNotNil: [argString := HTTPSocket argString: argsDict]
- ifNil: [''].
- ^self post: argString url: url , argString ifError: [self halt]!

Item was removed:
- ----- Method: FileStream class>>httpPostMultipart:args: (in category '*network') -----
- httpPostMultipart: url args: argsDict
- | mimeBorder argsStream crLf resultStream result |
- " do multipart/form-data encoding rather than x-www-urlencoded "
-
- crLf := String crlf.
- mimeBorder := '----squeak-', Time millisecondClockValue printString, '-stuff-----'.
- "encode the arguments dictionary"
- argsStream := WriteStream on: String new.
- argsDict associationsDo: [:assoc |
- assoc value do: [ :value | | fieldValue |
- "print the boundary"
- argsStream nextPutAll: '--', mimeBorder, crLf.
- " check if it's a non-text field "
- argsStream nextPutAll: 'Content-disposition: form-data; name="', assoc key, '"'.
- (value isKindOf: MIMEDocument)
- ifFalse: [fieldValue := value]
- ifTrue: [argsStream nextPutAll: ' filename="', value url pathForFile, '"', crLf, 'Content-Type: ', value contentType.
- fieldValue := (value content
- ifNil: [(FileStream fileNamed: value url pathForFile) contentsOfEntireFile]
- ifNotNil: [value content]) asString].
- " Transcript show: 'field=', key, '; value=', fieldValue; cr. "
- argsStream nextPutAll: crLf, crLf, fieldValue, crLf.
- ]].
- argsStream nextPutAll: '--', mimeBorder, '--'.
-
- resultStream := self
- post:
- ('Content-type: multipart/form-data; boundary=', mimeBorder, crLf,
- 'Content-length: ', argsStream contents size printString, crLf, crLf,
- argsStream contents)
- url: url ifError: [^'Error in post ' url asString].
- "get the header of the reply"
- result := resultStream upToEnd.
- ^MIMEDocument content: result!

Item was removed:
- ----- Method: FileStream class>>post:target:url:ifError: (in category '*network') -----
- post: data target: target url: url ifError: errorBlock
- ^self concreteStream new post: data target: target url: url ifError: errorBlock!

Item was removed:
- ----- Method: FileStream class>>post:url:ifError: (in category '*network') -----
- post: data url: url ifError: errorBlock
- ^self post: data target: nil url: url ifError: errorBlock!

Item was removed:
- ----- Method: FileStream class>>requestURL:target: (in category '*network') -----
- requestURL: url target: target
- "FileStream requestURL:'http://isgwww.cs.uni-magdeburg.de/~raab' target: ':=blank' "
- ^self concreteStream new requestURL: url target: target!

Item was removed:
- ----- Method: FileStream class>>requestURLStream: (in category '*network') -----
- requestURLStream: url
- "FileStream requestURLStream:'http://isgwww.cs.uni-magdeburg.de/~raab'"
- ^self concreteStream new requestURLStream: url!

Item was removed:
- ----- Method: FileStream class>>requestURLStream:ifError: (in category '*network') -----
- requestURLStream: url ifError: errorBlock
- "FileStream requestURLStream:'http://isgwww.cs.uni-magdeburg.de/~raab'"
- ^self concreteStream new requestURLStream: url ifError: errorBlock!