Karl Ramberg uploaded a new version of Environments to project The Trunk:
http://source.squeak.org/trunk/Environments-kfr.59.mcz
==================== Summary ====================
Name: Environments-kfr.59
Author: kfr
Time: 21 November 2015, 10:33:48.689 pm
UUID: 28f20424-19f0-4333-90c3-7fe53fbd51b5
Ancestors: Environments-eem.58
Colin's suggested workaround for Bindings
http://lists.squeakfoundation.org/pipermail/squeak-dev/2014-September/18001…
=============== Diff against Environments-eem.58 ===============
Item was changed:
----- Method: Binding>>objectForDataStream: (in category 'as yet unclassified') -----
+ objectForDataStream: refStrm
+ | dp |
+ "I am about to be written on an object file. If I am a known global, write a proxy that will hook up with the same resource in the destination system."
+ self flag: #environments.
+
+ ^ (Smalltalk globals associationAt: key ifAbsent: [nil]) == self
+ ifTrue: [dp := DiskProxy global: #Smalltalk selector: #associationOrUndeclaredAt:
+ args: (Array with: key).
+ refStrm replace: self with: dp.
+ dp]
+ ifFalse: [self]!
- objectForDataStream: refStream
- "It's not yet clear how serialization should work in the presence of environments"
-
- self shouldBeImplemented.!
Karl Ramberg uploaded a new version of Environments to project The Trunk:
http://source.squeak.org/trunk/Environments-kfr.59.mcz
==================== Summary ====================
Name: Environments-kfr.59
Author: kfr
Time: 21 November 2015, 10:33:48.689 pm
UUID: 28f20424-19f0-4333-90c3-7fe53fbd51b5
Ancestors: Environments-eem.58
Colin's suggested workaround for Bindings
http://lists.squeakfoundation.org/pipermail/squeak-dev/2014-September/18001…
=============== Diff against Environments-eem.58 ===============
Item was changed:
----- Method: Binding>>objectForDataStream: (in category 'as yet unclassified') -----
+ objectForDataStream: refStrm
+ | dp |
+ "I am about to be written on an object file. If I am a known global, write a proxy that will hook up with the same resource in the destination system."
+ self flag: #environments.
+
+ ^ (Smalltalk globals associationAt: key ifAbsent: [nil]) == self
+ ifTrue: [dp := DiskProxy global: #Smalltalk selector: #associationOrUndeclaredAt:
+ args: (Array with: key).
+ refStrm replace: self with: dp.
+ dp]
+ ifFalse: [self]!
- objectForDataStream: refStream
- "It's not yet clear how serialization should work in the presence of environments"
-
- self shouldBeImplemented.!
Chris Muller uploaded a new version of WebClient-HTTP to project The Trunk:
http://source.squeak.org/trunk/WebClient-HTTP-cmm.4.mcz
==================== Summary ====================
Name: WebClient-HTTP-cmm.4
Author: cmm
Time: 20 November 2015, 5:30:31.892 pm
UUID: 8f2d17a2-99b0-4216-8808-5d3276f15ae0
Ancestors: WebClient-HTTP-cmm.3
Support the 'args' variable in HTTPSocket class>>#httpGet:args:user:passwd:.
This fixes the in-image 'mc history' and origin functions for methods and classes.
=============== Diff against WebClient-HTTP-cmm.3 ===============
Item was changed:
----- Method: HTTPSocket class>>httpGet:args:user:passwd: (in category '*webclient-http') -----
httpGet: url args: args user: user passwd: passwd
"Upload the contents of the stream to a file on the server.
WARNING: This method will send a basic auth header proactively.
This is necessary to avoid breaking MC and SqueakSource since SS does not
return a 401 when accessing a private (global no access) repository."
| urlString xhdrs client resp progress |
+ "Normalize the url and append args"
- "Normalize the url"
urlString := (Url absoluteFromText: url) asString.
+ args ifNotNil: [
+ urlString := urlString, (self argString: args)
+ ].
"Some raw extra headers which historically have been added"
xhdrs := HTTPProxyCredentials,
HTTPBlabEmail. "may be empty"
client := WebClient new.
client username: user; password: passwd.
^[resp := client httpGet: urlString do:[:req|
"HACK: Proactively send a basic auth header.
See comment above."
req headerAt: 'Authorization' put: 'Basic ', (user, ':', passwd) base64Encoded.
"Accept anything"
req addHeader: 'Accept' value: '*/*'.
"Add the additional headers"
(WebUtils readHeadersFrom: xhdrs readStream)
do:[:assoc| req addHeader: assoc key value: assoc value]].
progress := [:total :amount|
(HTTPProgress new) total: total; amount: amount; signal: 'Downloading...'
].
"Simulate old HTTPSocket return behavior"
(resp code between: 200 and: 299)
ifTrue:[^(RWBinaryOrTextStream with: (resp contentWithProgress: progress)) reset]
ifFalse:[resp asString, resp content].
] ensure:[client destroy].
!
Chris Muller uploaded a new version of WebClient-HTTP to project The Trunk:
http://source.squeak.org/trunk/WebClient-HTTP-cmm.4.mcz
==================== Summary ====================
Name: WebClient-HTTP-cmm.4
Author: cmm
Time: 20 November 2015, 5:30:31.892 pm
UUID: 8f2d17a2-99b0-4216-8808-5d3276f15ae0
Ancestors: WebClient-HTTP-cmm.3
Support the 'args' variable in HTTPSocket class>>#httpGet:args:user:passwd:.
This fixes the in-image 'mc history' and origin functions for methods and classes.
=============== Diff against WebClient-HTTP-cmm.3 ===============
Item was changed:
----- Method: HTTPSocket class>>httpGet:args:user:passwd: (in category '*webclient-http') -----
httpGet: url args: args user: user passwd: passwd
"Upload the contents of the stream to a file on the server.
WARNING: This method will send a basic auth header proactively.
This is necessary to avoid breaking MC and SqueakSource since SS does not
return a 401 when accessing a private (global no access) repository."
| urlString xhdrs client resp progress |
+ "Normalize the url and append args"
- "Normalize the url"
urlString := (Url absoluteFromText: url) asString.
+ args ifNotNil: [
+ urlString := urlString, (self argString: args)
+ ].
"Some raw extra headers which historically have been added"
xhdrs := HTTPProxyCredentials,
HTTPBlabEmail. "may be empty"
client := WebClient new.
client username: user; password: passwd.
^[resp := client httpGet: urlString do:[:req|
"HACK: Proactively send a basic auth header.
See comment above."
req headerAt: 'Authorization' put: 'Basic ', (user, ':', passwd) base64Encoded.
"Accept anything"
req addHeader: 'Accept' value: '*/*'.
"Add the additional headers"
(WebUtils readHeadersFrom: xhdrs readStream)
do:[:assoc| req addHeader: assoc key value: assoc value]].
progress := [:total :amount|
(HTTPProgress new) total: total; amount: amount; signal: 'Downloading...'
].
"Simulate old HTTPSocket return behavior"
(resp code between: 200 and: 299)
ifTrue:[^(RWBinaryOrTextStream with: (resp contentWithProgress: progress)) reset]
ifFalse:[resp asString, resp content].
] ensure:[client destroy].
!