lists.squeakfoundation.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Packages
December 2009
----- 2024 -----
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
packages@lists.squeakfoundation.org
1 participants
1032 discussions
Start a n
N
ew thread
The Trunk: Monticello-ar.346.mcz
by commits@source.squeak.org
30 Dec '09
30 Dec '09
Andreas Raab uploaded a new version of Monticello to project The Trunk:
http://source.squeak.org/trunk/Monticello-ar.346.mcz
==================== Summary ==================== Name: Monticello-ar.346 Author: ar Time: 30 December 2009, 5:04:52 am UUID: 305a6619-474d-314a-9331-9a03c6d97588 Ancestors: Monticello-ar.345 Include names of repository and package in up and download progress. =============== Diff against Monticello-ar.345 =============== Item was changed: ----- Method: MCHttpRepository>>readStreamForFileNamed:do: (in category 'required') ----- readStreamForFileNamed: aString do: aBlock | contents | + self displayProgress: 'Downloading ', aString during:[ + contents := HTTPSocket httpGet: (self urlForFileNamed: aString) args: nil user: self user passwd: self password. + ]. - contents := HTTPSocket httpGet: (self urlForFileNamed: aString) args: nil user: self user passwd: self password. ^ contents isString ifFalse: [aBlock value: contents]! Item was changed: ----- Method: MCHttpRepository>>writeStreamForFileNamed:replace:do: (in category 'required') ----- writeStreamForFileNamed: aString replace: ignoreBoolean do: aBlock | stream response | stream := RWBinaryOrTextStream on: String new. aBlock value: stream. + self displayProgress: 'Uploading ', aString during:[ - self displayProgress: 'Uploading package' during:[ response := HTTPSocket httpPut: stream contents to: (self urlForFileNamed: aString) user: self user passwd: self password. ]. (#( 'HTTP/1.1 201 ' 'HTTP/1.1 200 ' 'HTTP/1.0 201 ' 'HTTP/1.0 200 ') anySatisfy: [:code | response beginsWith: code ]) ifFalse: [self error: response].! Item was changed: ----- Method: MCHttpRepository>>allFileNames (in category 'required') ----- allFileNames | index | + self displayProgress: 'Updating ', self description during:[ - self displayProgress: 'Updating repository' during:[ index := HTTPSocket httpGet: self locationWithTrailingSlash, '?C=M;O=D' args: nil user: self user passwd: self password. ]. index isString ifTrue: [self error: 'Could not access ', location]. ^ self parseFileNamesFromStream: index !
1
0
0
0
The Trunk: Monticello-ar.346.mcz
by commits@source.squeak.org
30 Dec '09
30 Dec '09
Andreas Raab uploaded a new version of Monticello to project The Trunk:
http://source.squeak.org/trunk/Monticello-ar.346.mcz
==================== Summary ==================== Name: Monticello-ar.346 Author: ar Time: 30 December 2009, 5:04:52 am UUID: 305a6619-474d-314a-9331-9a03c6d97588 Ancestors: Monticello-ar.345 Include names of repository and package in up and download progress. =============== Diff against Monticello-ar.345 =============== Item was changed: ----- Method: MCHttpRepository>>readStreamForFileNamed:do: (in category 'required') ----- readStreamForFileNamed: aString do: aBlock | contents | + self displayProgress: 'Downloading ', aString during:[ + contents := HTTPSocket httpGet: (self urlForFileNamed: aString) args: nil user: self user passwd: self password. + ]. - contents := HTTPSocket httpGet: (self urlForFileNamed: aString) args: nil user: self user passwd: self password. ^ contents isString ifFalse: [aBlock value: contents]! Item was changed: ----- Method: MCHttpRepository>>writeStreamForFileNamed:replace:do: (in category 'required') ----- writeStreamForFileNamed: aString replace: ignoreBoolean do: aBlock | stream response | stream := RWBinaryOrTextStream on: String new. aBlock value: stream. + self displayProgress: 'Uploading ', aString during:[ - self displayProgress: 'Uploading package' during:[ response := HTTPSocket httpPut: stream contents to: (self urlForFileNamed: aString) user: self user passwd: self password. ]. (#( 'HTTP/1.1 201 ' 'HTTP/1.1 200 ' 'HTTP/1.0 201 ' 'HTTP/1.0 200 ') anySatisfy: [:code | response beginsWith: code ]) ifFalse: [self error: response].! Item was changed: ----- Method: MCHttpRepository>>allFileNames (in category 'required') ----- allFileNames | index | + self displayProgress: 'Updating ', self description during:[ - self displayProgress: 'Updating repository' during:[ index := HTTPSocket httpGet: self locationWithTrailingSlash, '?C=M;O=D' args: nil user: self user passwd: self password. ]. index isString ifTrue: [self error: 'Could not access ', location]. ^ self parseFileNamesFromStream: index !
1
0
0
0
The Trunk: Monticello-ar.346.mcz
by commits@source.squeak.org
30 Dec '09
30 Dec '09
Andreas Raab uploaded a new version of Monticello to project The Trunk:
http://source.squeak.org/trunk/Monticello-ar.346.mcz
==================== Summary ==================== Name: Monticello-ar.346 Author: ar Time: 30 December 2009, 5:04:52 am UUID: 305a6619-474d-314a-9331-9a03c6d97588 Ancestors: Monticello-ar.345 Include names of repository and package in up and download progress. =============== Diff against Monticello-ar.345 =============== Item was changed: ----- Method: MCHttpRepository>>readStreamForFileNamed:do: (in category 'required') ----- readStreamForFileNamed: aString do: aBlock | contents | + self displayProgress: 'Downloading ', aString during:[ + contents := HTTPSocket httpGet: (self urlForFileNamed: aString) args: nil user: self user passwd: self password. + ]. - contents := HTTPSocket httpGet: (self urlForFileNamed: aString) args: nil user: self user passwd: self password. ^ contents isString ifFalse: [aBlock value: contents]! Item was changed: ----- Method: MCHttpRepository>>writeStreamForFileNamed:replace:do: (in category 'required') ----- writeStreamForFileNamed: aString replace: ignoreBoolean do: aBlock | stream response | stream := RWBinaryOrTextStream on: String new. aBlock value: stream. + self displayProgress: 'Uploading ', aString during:[ - self displayProgress: 'Uploading package' during:[ response := HTTPSocket httpPut: stream contents to: (self urlForFileNamed: aString) user: self user passwd: self password. ]. (#( 'HTTP/1.1 201 ' 'HTTP/1.1 200 ' 'HTTP/1.0 201 ' 'HTTP/1.0 200 ') anySatisfy: [:code | response beginsWith: code ]) ifFalse: [self error: response].! Item was changed: ----- Method: MCHttpRepository>>allFileNames (in category 'required') ----- allFileNames | index | + self displayProgress: 'Updating ', self description during:[ - self displayProgress: 'Updating repository' during:[ index := HTTPSocket httpGet: self locationWithTrailingSlash, '?C=M;O=D' args: nil user: self user passwd: self password. ]. index isString ifTrue: [self error: 'Could not access ', location]. ^ self parseFileNamesFromStream: index !
1
0
0
0
The Trunk: Network-ar.47.mcz
by commits@source.squeak.org
30 Dec '09
30 Dec '09
Andreas Raab uploaded a new version of Network to project The Trunk:
http://source.squeak.org/trunk/Network-ar.47.mcz
==================== Summary ==================== Name: Network-ar.47 Author: ar Time: 30 December 2009, 4:40:24 am UUID: 429af7d7-a121-3342-a5c5-2f6c27f10bbe Ancestors: Network-ar.46 Add HTTPProgress for put operations (uploads). =============== Diff against Network-ar.46 =============== Item was added: + ----- Method: HTTPSocket>>sendCommandWithProgress: (in category 'as yet unclassified') ----- + sendCommandWithProgress: commandString + "Send the given command as a single line followed by a <CR><LF> terminator." + + self sendDataWithProgress: commandString, CrLf. + ! Item was changed: ----- Method: HTTPSocket class>>httpPut:to:user:passwd: (in category 'get the page') ----- httpPut: contents to: url user: user passwd: passwd "Upload the contents of the stream to a file on the server" | bare serverName specifiedServer port page serverAddr authorization s list header firstData length aStream command digest | Socket initializeNetwork. "parse url" bare := (url asLowercase beginsWith: 'http://') ifTrue: [url copyFrom: 8 to: url size] ifFalse: [url]. serverName := bare copyUpTo: $/. specifiedServer := serverName. (serverName includes: $:) ifFalse: [ port := self defaultPort ] ifTrue: [ port := (serverName copyFrom: (serverName indexOf: $:) + 1 to: serverName size) asNumber. serverName := serverName copyUpTo: $:. ]. page := bare copyFrom: (bare indexOf: $/) to: bare size. page size = 0 ifTrue: [page := '/']. (self shouldUseProxy: serverName) ifTrue: [ page := 'http://', serverName, ':', port printString, page. "put back together" serverName := self httpProxyServer. port := self httpProxyPort]. "make the request" serverAddr := NetNameResolver addressForName: serverName timeout: 20. serverAddr ifNil: [ ^ 'Could not resolve the server named: ', serverName]. authorization := ' Basic ', (user , ':' , passwd) base64Encoded. [ s := HTTPSocket new. s connectTo: serverAddr port: port. s waitForConnectionUntil: self standardDeadline. Transcript cr; show: url; cr. command := 'PUT ', page, ' HTTP/1.0', CrLf, self userAgentString, CrLf, 'Host: ', specifiedServer, CrLf, 'ACCEPT: */*', CrLf, HTTPProxyCredentials, 'Authorization: ' , authorization , CrLf , 'Content-length: ', contents size printString, CrLf , CrLf , contents. + s sendCommandWithProgress: command. - s sendCommand: command. "get the header of the reply" list := s getResponseUpTo: CrLf, CrLf ignoring: String cr. "list = header, CrLf, CrLf, beginningOfData" header := list at: 1. "Transcript show: page; cr; show: argsStream contents; cr; show: header; cr." firstData := list at: 3. "dig out some headers" s header: header. (authorization beginsWith: 'Digest ') not and: [(digest := self digestFrom: s method: 'PUT' url: url user: user password: passwd) notNil]] whileTrue: [authorization := 'Digest ', digest]. length := s getHeader: 'content-length'. length ifNotNil: [ length := length asNumber ]. + "Suppress progress during response handling" + [aStream := s getRestOfBuffer: firstData totalLength: length] + on: HTTPProgress do:[:ex| ex resume]. - aStream := s getRestOfBuffer: firstData totalLength: length. s destroy. "Always OK to destroy!!" ^ header, aStream contents! Item was added: + ----- Method: HTTPSocket>>sendDataWithProgress: (in category 'as yet unclassified') ----- + sendDataWithProgress: aStringOrByteArray + "Send all of the data in the given array, even if it requires multiple calls to send it all. Return the number of bytes sent." + + "An experimental version use on slow lines: Longer timeout and smaller writes to try to avoid spurious timeouts." + + | bytesSent bytesToSend count | + bytesToSend := aStringOrByteArray size. + bytesSent := 0. + [bytesSent < bytesToSend] whileTrue: [ + (HTTPProgress new) + total: bytesToSend; + amount: bytesSent; + signal: 'Uploading...'. + (self waitForSendDoneUntil: (Socket deadlineSecs: 60)) + ifFalse: [ConnectionTimedOut signal: 'send data timeout; data not sent']. + count := self primSocket: socketHandle + sendData: aStringOrByteArray + startIndex: bytesSent + 1 + count: (bytesToSend - bytesSent min: 5000). + bytesSent := bytesSent + count]. + + ^ bytesSent + !
1
0
0
0
The Trunk: Network-ar.47.mcz
by commits@source.squeak.org
30 Dec '09
30 Dec '09
Andreas Raab uploaded a new version of Network to project The Trunk:
http://source.squeak.org/trunk/Network-ar.47.mcz
==================== Summary ==================== Name: Network-ar.47 Author: ar Time: 30 December 2009, 4:40:24 am UUID: 429af7d7-a121-3342-a5c5-2f6c27f10bbe Ancestors: Network-ar.46 Add HTTPProgress for put operations (uploads). =============== Diff against Network-ar.46 =============== Item was added: + ----- Method: HTTPSocket>>sendCommandWithProgress: (in category 'as yet unclassified') ----- + sendCommandWithProgress: commandString + "Send the given command as a single line followed by a <CR><LF> terminator." + + self sendDataWithProgress: commandString, CrLf. + ! Item was changed: ----- Method: HTTPSocket class>>httpPut:to:user:passwd: (in category 'get the page') ----- httpPut: contents to: url user: user passwd: passwd "Upload the contents of the stream to a file on the server" | bare serverName specifiedServer port page serverAddr authorization s list header firstData length aStream command digest | Socket initializeNetwork. "parse url" bare := (url asLowercase beginsWith: 'http://') ifTrue: [url copyFrom: 8 to: url size] ifFalse: [url]. serverName := bare copyUpTo: $/. specifiedServer := serverName. (serverName includes: $:) ifFalse: [ port := self defaultPort ] ifTrue: [ port := (serverName copyFrom: (serverName indexOf: $:) + 1 to: serverName size) asNumber. serverName := serverName copyUpTo: $:. ]. page := bare copyFrom: (bare indexOf: $/) to: bare size. page size = 0 ifTrue: [page := '/']. (self shouldUseProxy: serverName) ifTrue: [ page := 'http://', serverName, ':', port printString, page. "put back together" serverName := self httpProxyServer. port := self httpProxyPort]. "make the request" serverAddr := NetNameResolver addressForName: serverName timeout: 20. serverAddr ifNil: [ ^ 'Could not resolve the server named: ', serverName]. authorization := ' Basic ', (user , ':' , passwd) base64Encoded. [ s := HTTPSocket new. s connectTo: serverAddr port: port. s waitForConnectionUntil: self standardDeadline. Transcript cr; show: url; cr. command := 'PUT ', page, ' HTTP/1.0', CrLf, self userAgentString, CrLf, 'Host: ', specifiedServer, CrLf, 'ACCEPT: */*', CrLf, HTTPProxyCredentials, 'Authorization: ' , authorization , CrLf , 'Content-length: ', contents size printString, CrLf , CrLf , contents. + s sendCommandWithProgress: command. - s sendCommand: command. "get the header of the reply" list := s getResponseUpTo: CrLf, CrLf ignoring: String cr. "list = header, CrLf, CrLf, beginningOfData" header := list at: 1. "Transcript show: page; cr; show: argsStream contents; cr; show: header; cr." firstData := list at: 3. "dig out some headers" s header: header. (authorization beginsWith: 'Digest ') not and: [(digest := self digestFrom: s method: 'PUT' url: url user: user password: passwd) notNil]] whileTrue: [authorization := 'Digest ', digest]. length := s getHeader: 'content-length'. length ifNotNil: [ length := length asNumber ]. + "Suppress progress during response handling" + [aStream := s getRestOfBuffer: firstData totalLength: length] + on: HTTPProgress do:[:ex| ex resume]. - aStream := s getRestOfBuffer: firstData totalLength: length. s destroy. "Always OK to destroy!!" ^ header, aStream contents! Item was added: + ----- Method: HTTPSocket>>sendDataWithProgress: (in category 'as yet unclassified') ----- + sendDataWithProgress: aStringOrByteArray + "Send all of the data in the given array, even if it requires multiple calls to send it all. Return the number of bytes sent." + + "An experimental version use on slow lines: Longer timeout and smaller writes to try to avoid spurious timeouts." + + | bytesSent bytesToSend count | + bytesToSend := aStringOrByteArray size. + bytesSent := 0. + [bytesSent < bytesToSend] whileTrue: [ + (HTTPProgress new) + total: bytesToSend; + amount: bytesSent; + signal: 'Uploading...'. + (self waitForSendDoneUntil: (Socket deadlineSecs: 60)) + ifFalse: [ConnectionTimedOut signal: 'send data timeout; data not sent']. + count := self primSocket: socketHandle + sendData: aStringOrByteArray + startIndex: bytesSent + 1 + count: (bytesToSend - bytesSent min: 5000). + bytesSent := bytesSent + count]. + + ^ bytesSent + !
1
0
0
0
The Trunk: Network-ar.47.mcz
by commits@source.squeak.org
30 Dec '09
30 Dec '09
Andreas Raab uploaded a new version of Network to project The Trunk:
http://source.squeak.org/trunk/Network-ar.47.mcz
==================== Summary ==================== Name: Network-ar.47 Author: ar Time: 30 December 2009, 4:40:24 am UUID: 429af7d7-a121-3342-a5c5-2f6c27f10bbe Ancestors: Network-ar.46 Add HTTPProgress for put operations (uploads). =============== Diff against Network-ar.46 =============== Item was added: + ----- Method: HTTPSocket>>sendCommandWithProgress: (in category 'as yet unclassified') ----- + sendCommandWithProgress: commandString + "Send the given command as a single line followed by a <CR><LF> terminator." + + self sendDataWithProgress: commandString, CrLf. + ! Item was changed: ----- Method: HTTPSocket class>>httpPut:to:user:passwd: (in category 'get the page') ----- httpPut: contents to: url user: user passwd: passwd "Upload the contents of the stream to a file on the server" | bare serverName specifiedServer port page serverAddr authorization s list header firstData length aStream command digest | Socket initializeNetwork. "parse url" bare := (url asLowercase beginsWith: 'http://') ifTrue: [url copyFrom: 8 to: url size] ifFalse: [url]. serverName := bare copyUpTo: $/. specifiedServer := serverName. (serverName includes: $:) ifFalse: [ port := self defaultPort ] ifTrue: [ port := (serverName copyFrom: (serverName indexOf: $:) + 1 to: serverName size) asNumber. serverName := serverName copyUpTo: $:. ]. page := bare copyFrom: (bare indexOf: $/) to: bare size. page size = 0 ifTrue: [page := '/']. (self shouldUseProxy: serverName) ifTrue: [ page := 'http://', serverName, ':', port printString, page. "put back together" serverName := self httpProxyServer. port := self httpProxyPort]. "make the request" serverAddr := NetNameResolver addressForName: serverName timeout: 20. serverAddr ifNil: [ ^ 'Could not resolve the server named: ', serverName]. authorization := ' Basic ', (user , ':' , passwd) base64Encoded. [ s := HTTPSocket new. s connectTo: serverAddr port: port. s waitForConnectionUntil: self standardDeadline. Transcript cr; show: url; cr. command := 'PUT ', page, ' HTTP/1.0', CrLf, self userAgentString, CrLf, 'Host: ', specifiedServer, CrLf, 'ACCEPT: */*', CrLf, HTTPProxyCredentials, 'Authorization: ' , authorization , CrLf , 'Content-length: ', contents size printString, CrLf , CrLf , contents. + s sendCommandWithProgress: command. - s sendCommand: command. "get the header of the reply" list := s getResponseUpTo: CrLf, CrLf ignoring: String cr. "list = header, CrLf, CrLf, beginningOfData" header := list at: 1. "Transcript show: page; cr; show: argsStream contents; cr; show: header; cr." firstData := list at: 3. "dig out some headers" s header: header. (authorization beginsWith: 'Digest ') not and: [(digest := self digestFrom: s method: 'PUT' url: url user: user password: passwd) notNil]] whileTrue: [authorization := 'Digest ', digest]. length := s getHeader: 'content-length'. length ifNotNil: [ length := length asNumber ]. + "Suppress progress during response handling" + [aStream := s getRestOfBuffer: firstData totalLength: length] + on: HTTPProgress do:[:ex| ex resume]. - aStream := s getRestOfBuffer: firstData totalLength: length. s destroy. "Always OK to destroy!!" ^ header, aStream contents! Item was added: + ----- Method: HTTPSocket>>sendDataWithProgress: (in category 'as yet unclassified') ----- + sendDataWithProgress: aStringOrByteArray + "Send all of the data in the given array, even if it requires multiple calls to send it all. Return the number of bytes sent." + + "An experimental version use on slow lines: Longer timeout and smaller writes to try to avoid spurious timeouts." + + | bytesSent bytesToSend count | + bytesToSend := aStringOrByteArray size. + bytesSent := 0. + [bytesSent < bytesToSend] whileTrue: [ + (HTTPProgress new) + total: bytesToSend; + amount: bytesSent; + signal: 'Uploading...'. + (self waitForSendDoneUntil: (Socket deadlineSecs: 60)) + ifFalse: [ConnectionTimedOut signal: 'send data timeout; data not sent']. + count := self primSocket: socketHandle + sendData: aStringOrByteArray + startIndex: bytesSent + 1 + count: (bytesToSend - bytesSent min: 5000). + bytesSent := bytesSent + count]. + + ^ bytesSent + !
1
0
0
0
The Trunk: Monticello-ar.345.mcz
by commits@source.squeak.org
30 Dec '09
30 Dec '09
Andreas Raab uploaded a new version of Monticello to project The Trunk:
http://source.squeak.org/trunk/Monticello-ar.345.mcz
==================== Summary ==================== Name: Monticello-ar.345 Author: ar Time: 30 December 2009, 4:43:26 am UUID: 41d6d7f1-8398-464f-afa8-9d67fa71271f Ancestors: Monticello-ar.344 Display progress during common MC operations on HTTP repositories. =============== Diff against Monticello-ar.344 =============== Item was added: + ----- Method: MCHttpRepository>>displayProgress:during: (in category 'required') ----- + displayProgress: label during: workBlock + | nextUpdateTime | + nextUpdateTime := 0. + ^UIManager default displayProgress: label at: Display center + from: 0.0 to: 1.0 during:[:bar| + [workBlock value] on: HTTPProgress do:[:ex| + (ex total == nil or:[ex amount == nil]) ifFalse:[ + (nextUpdateTime < Time millisecondClockValue + or:[ex total = ex amount]) ifTrue:[ + bar value: ex amount asFloat / ex total asFloat. + nextUpdateTime := Time millisecondClockValue + 100. + ]. + ]. + ex resume. + ] + ]. + ! Item was changed: ----- Method: MCHttpRepository>>writeStreamForFileNamed:replace:do: (in category 'required') ----- writeStreamForFileNamed: aString replace: ignoreBoolean do: aBlock | stream response | stream := RWBinaryOrTextStream on: String new. aBlock value: stream. + self displayProgress: 'Uploading package' during:[ + response := HTTPSocket - response := HTTPSocket httpPut: stream contents to: (self urlForFileNamed: aString) user: self user passwd: self password. + ]. - (#( 'HTTP/1.1 201 ' 'HTTP/1.1 200 ' 'HTTP/1.0 201 ' 'HTTP/1.0 200 ') anySatisfy: [:code | response beginsWith: code ]) ifFalse: [self error: response].! Item was changed: ----- Method: MCHttpRepository>>allFileNames (in category 'required') ----- allFileNames | index | + self displayProgress: 'Updating repository' during:[ + index := HTTPSocket httpGet: self locationWithTrailingSlash, '?C=M;O=D' args: nil user: self user passwd: self password. + ]. - index := HTTPSocket httpGet: self locationWithTrailingSlash, '?C=M;O=D' args: nil user: self user passwd: self password. index isString ifTrue: [self error: 'Could not access ', location]. ^ self parseFileNamesFromStream: index !
1
0
0
0
The Trunk: Monticello-ar.345.mcz
by commits@source.squeak.org
30 Dec '09
30 Dec '09
Andreas Raab uploaded a new version of Monticello to project The Trunk:
http://source.squeak.org/trunk/Monticello-ar.345.mcz
==================== Summary ==================== Name: Monticello-ar.345 Author: ar Time: 30 December 2009, 4:43:26 am UUID: 41d6d7f1-8398-464f-afa8-9d67fa71271f Ancestors: Monticello-ar.344 Display progress during common MC operations on HTTP repositories. =============== Diff against Monticello-ar.344 =============== Item was added: + ----- Method: MCHttpRepository>>displayProgress:during: (in category 'required') ----- + displayProgress: label during: workBlock + | nextUpdateTime | + nextUpdateTime := 0. + ^UIManager default displayProgress: label at: Display center + from: 0.0 to: 1.0 during:[:bar| + [workBlock value] on: HTTPProgress do:[:ex| + (ex total == nil or:[ex amount == nil]) ifFalse:[ + (nextUpdateTime < Time millisecondClockValue + or:[ex total = ex amount]) ifTrue:[ + bar value: ex amount asFloat / ex total asFloat. + nextUpdateTime := Time millisecondClockValue + 100. + ]. + ]. + ex resume. + ] + ]. + ! Item was changed: ----- Method: MCHttpRepository>>writeStreamForFileNamed:replace:do: (in category 'required') ----- writeStreamForFileNamed: aString replace: ignoreBoolean do: aBlock | stream response | stream := RWBinaryOrTextStream on: String new. aBlock value: stream. + self displayProgress: 'Uploading package' during:[ + response := HTTPSocket - response := HTTPSocket httpPut: stream contents to: (self urlForFileNamed: aString) user: self user passwd: self password. + ]. - (#( 'HTTP/1.1 201 ' 'HTTP/1.1 200 ' 'HTTP/1.0 201 ' 'HTTP/1.0 200 ') anySatisfy: [:code | response beginsWith: code ]) ifFalse: [self error: response].! Item was changed: ----- Method: MCHttpRepository>>allFileNames (in category 'required') ----- allFileNames | index | + self displayProgress: 'Updating repository' during:[ + index := HTTPSocket httpGet: self locationWithTrailingSlash, '?C=M;O=D' args: nil user: self user passwd: self password. + ]. - index := HTTPSocket httpGet: self locationWithTrailingSlash, '?C=M;O=D' args: nil user: self user passwd: self password. index isString ifTrue: [self error: 'Could not access ', location]. ^ self parseFileNamesFromStream: index !
1
0
0
0
The Trunk: Monticello-ar.345.mcz
by commits@source.squeak.org
30 Dec '09
30 Dec '09
Andreas Raab uploaded a new version of Monticello to project The Trunk:
http://source.squeak.org/trunk/Monticello-ar.345.mcz
==================== Summary ==================== Name: Monticello-ar.345 Author: ar Time: 30 December 2009, 4:43:26 am UUID: 41d6d7f1-8398-464f-afa8-9d67fa71271f Ancestors: Monticello-ar.344 Display progress during common MC operations on HTTP repositories. =============== Diff against Monticello-ar.344 =============== Item was added: + ----- Method: MCHttpRepository>>displayProgress:during: (in category 'required') ----- + displayProgress: label during: workBlock + | nextUpdateTime | + nextUpdateTime := 0. + ^UIManager default displayProgress: label at: Display center + from: 0.0 to: 1.0 during:[:bar| + [workBlock value] on: HTTPProgress do:[:ex| + (ex total == nil or:[ex amount == nil]) ifFalse:[ + (nextUpdateTime < Time millisecondClockValue + or:[ex total = ex amount]) ifTrue:[ + bar value: ex amount asFloat / ex total asFloat. + nextUpdateTime := Time millisecondClockValue + 100. + ]. + ]. + ex resume. + ] + ]. + ! Item was changed: ----- Method: MCHttpRepository>>writeStreamForFileNamed:replace:do: (in category 'required') ----- writeStreamForFileNamed: aString replace: ignoreBoolean do: aBlock | stream response | stream := RWBinaryOrTextStream on: String new. aBlock value: stream. + self displayProgress: 'Uploading package' during:[ + response := HTTPSocket - response := HTTPSocket httpPut: stream contents to: (self urlForFileNamed: aString) user: self user passwd: self password. + ]. - (#( 'HTTP/1.1 201 ' 'HTTP/1.1 200 ' 'HTTP/1.0 201 ' 'HTTP/1.0 200 ') anySatisfy: [:code | response beginsWith: code ]) ifFalse: [self error: response].! Item was changed: ----- Method: MCHttpRepository>>allFileNames (in category 'required') ----- allFileNames | index | + self displayProgress: 'Updating repository' during:[ + index := HTTPSocket httpGet: self locationWithTrailingSlash, '?C=M;O=D' args: nil user: self user passwd: self password. + ]. - index := HTTPSocket httpGet: self locationWithTrailingSlash, '?C=M;O=D' args: nil user: self user passwd: self password. index isString ifTrue: [self error: 'Could not access ', location]. ^ self parseFileNamesFromStream: index !
1
0
0
0
The Trunk: Network-ar.46.mcz
by commits@source.squeak.org
30 Dec '09
30 Dec '09
Andreas Raab uploaded a new version of Network to project The Trunk:
http://source.squeak.org/trunk/Network-ar.46.mcz
==================== Summary ==================== Name: Network-ar.46 Author: ar Time: 30 December 2009, 4:23:24 am UUID: 62689cdd-d137-f546-acfb-840508ca3502 Ancestors: Network-ar.45 Add an HTTPProgress notification that can be used to display progress during HTTPSocket httpGet: operations. =============== Diff against Network-ar.45 =============== Item was changed: ----- Method: HTTPSocket class>>httpGetDocument:args:accept:request: (in category 'get the page') ----- httpGetDocument: url args: args accept: mimeType request: requestString "Return the exact contents of a web object. Asks for the given MIME type. If mimeType is nil, use 'text/html'. An extra requestString may be submitted and must end with crlf. The parsed header is saved. Use a proxy server if one has been registered. tk 7/23/97 17:12" "Note: To fetch raw data, you can use the MIME type 'application/octet-stream'." | serverName serverAddr port bare page index connectToHost connectToPort aStream portSuffix | Socket initializeNetwork. bare := (url asLowercase beginsWith: 'http://') ifTrue: [url copyFrom: 8 to: url size] ifFalse: [url]. bare := bare copyUpTo: $#. "remove fragment, if specified" serverName := bare copyUpTo: $/. page := bare copyFrom: serverName size + 1 to: bare size. (serverName includes: $:) ifTrue: [ index := serverName indexOf: $:. port := (serverName copyFrom: index+1 to: serverName size) asNumber. portSuffix := ':', port printString. serverName := serverName copyFrom: 1 to: index-1. ] ifFalse: [ port := self defaultPort. portSuffix := ''. ]. page size = 0 ifTrue: [page := '/']. "add arguments" args ifNotNil: [page := page, (self argString: args) ]. (self shouldUseProxy: serverName) ifFalse: [ connectToHost := serverName. connectToPort := port ] ifTrue: [ page := 'http://', serverName, portSuffix, page. "put back together" connectToHost := self httpProxyServer. connectToPort := self httpProxyPort]. + HTTPProgress signal: 'Looking up ', connectToHost. serverAddr := NetNameResolver addressForName: connectToHost timeout: 20. + serverAddr ifNil: [^ 'Could not resolve the server named: ', connectToHost]. - serverAddr ifNil: [ - ^ 'Could not resolve the server named: ', connectToHost]. 3 timesRepeat: [ | sock length firstData list type header newUrl | sock := HTTPSocket new. sock connectTo: serverAddr port: connectToPort. (sock waitForConnectionUntil: (self deadlineSecs: 30)) ifFalse: [ Socket deadServer: connectToHost. sock destroy. ^ 'Server ',connectToHost,' is not responding']. "Transcript cr;show: url; cr. Transcript show: page; cr." sock sendCommand: 'GET ', page, ' HTTP/1.0', CrLf, (mimeType ifNotNil: ['ACCEPT: ', mimeType, CrLf] ifNil: ['']), 'ACCEPT: text/html', CrLf, "Always accept plain text" HTTPBlabEmail, "may be empty" requestString, "extra user request. Authorization" self userAgentString, CrLf, 'Host: ', serverName, portSuffix, CrLf. "blank line automatically added" list := sock getResponseUpTo: CrLf, CrLf ignoring: (String with: CR). "list = header, CrLf, CrLf, beginningOfData" header := list at: 1. "Transcript show: page; cr; show: header; cr." firstData := list at: 3. header isEmpty ifTrue: [aStream := 'server aborted early'] ifFalse: [ "dig out some headers" sock header: header. length := sock getHeader: 'content-length'. length ifNotNil: [ length := length asNumber ]. type := sock getHeader: 'content-type'. sock responseCode first = $3 ifTrue: [ newUrl := sock getHeader: 'location'. newUrl ifNotNil: [ Transcript show: 'redirecting to ', newUrl; cr. sock destroy. newUrl := self expandUrl: newUrl ip: serverAddr port: connectToPort. ^self httpGetDocument: newUrl args: args accept: mimeType request: requestString] ]. aStream := sock getRestOfBuffer: firstData totalLength: length. "a 400-series error" sock responseCode first = $4 ifTrue: [^ header, aStream contents]. ]. sock destroy. "Always OK to destroy!!" aStream class ~~ String ifTrue: [ ^ MIMEDocument contentType: type content: aStream contents url: url]. aStream = 'server aborted early' ifTrue: [ ^aStream ]. ]. {'HTTPSocket class>>httpGetDocument:args:accept:request:'. aStream. url} inspect. ^'some other bad thing happened!!'! Item was added: + Notification subclass: #HTTPProgress + instanceVariableNames: 'total amount' + classVariableNames: '' + poolDictionaries: '' + category: 'Network-Protocols'! + + !HTTPProgress commentStamp: 'ar 12/30/2009 16:16' prior: 0! + HTTP progress notification. Includes: + - total: The total size of the download (if known) + - amount: The completed amount of the download (if known) + ! Item was changed: ----- Method: HTTPSocket>>getRestOfBuffer:totalLength: (in category 'as yet unclassified') ----- getRestOfBuffer: beginning totalLength: length "Reel in a string of a fixed length. Part of it has already been received. Close the connection after all chars are received. We do not strip out linefeed chars. tk 6/16/97 22:32" "if length is nil, read until connection close. Response is of type text, not binary." | buf response bytesRead | length ifNil: [^ self getRestOfBuffer: beginning]. buf := String new: length. response := RWBinaryOrTextStream on: buf. response nextPutAll: beginning. buf := String new: length. [(response position < length) & (self isConnected | self dataAvailable)] whileTrue: [ + (HTTPProgress new) + total: length; + amount: response position; + signal: 'Downloading...'. (self waitForDataUntil: (Socket deadlineSecs: 5)) ifFalse: [ Transcript show: 'data was slow'; cr]. bytesRead := self primSocket: socketHandle receiveDataInto: buf startingAt: 1 count: (length - response position). bytesRead > 0 ifTrue: [ response nextPutAll: (buf copyFrom: 1 to: bytesRead)] ]. "Transcript cr; show: 'data byte count: ', response position printString." "Transcript cr; show: ((self isConnected) ifTrue: ['Over length by: ', bytesRead printString] ifFalse: ['Socket closed'])." response position < length ifTrue: [^ 'server aborted early']. response reset. "position: 0." ^ response! Item was added: + ----- Method: HTTPProgress>>total (in category 'accessing') ----- + total + "Answer the total size of the download, if known" + ^total! Item was added: + ----- Method: HTTPProgress>>amount: (in category 'accessing') ----- + amount: bytes + "Set the completed amount of the download (if known)" + amount := bytes! Item was added: + ----- Method: HTTPProgress>>total: (in category 'accessing') ----- + total: bytes + "Answer the total size of the download, if known" + total := bytes! Item was added: + ----- Method: HTTPProgress>>amount (in category 'accessing') ----- + amount + "Answer the completed amount of the download (if known)" + ^amount!
1
0
0
0
← Newer
1
...
7
8
9
10
11
12
13
...
104
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
Results per page:
10
25
50
100
200