[etoys-dev] Etoys Inbox: Monticello-kfr.408.mcz

commits at source.squeak.org commits at source.squeak.org
Mon May 30 00:45:13 EDT 2011

A new version of Monticello was added to project Etoys Inbox:

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

Name: Monticello-kfr.408
Author: kfr
Time: 30 May 2011, 6:44:54 am
UUID: 8b39e6d7-6aa6-fd43-9d62-dac73740638a
Ancestors: Monticello-kfr.407


=============== Diff against Monticello-kfr.405 ===============

Item was changed:
  ----- Method: MCHttpRepository>>writeStreamForFileNamed:replace:do: (in category 'required') -----
  writeStreamForFileNamed: aString replace: ignoreBoolean do: aBlock
  	| stream response statusLine code |
  	stream := RWBinaryOrTextStream on: String new.
  	aBlock value: stream.
  	self displayProgress: 'Uploading ', aString during:[
  		response := HTTPSocket
  					httpPut: stream contents
  					to: (self urlForFileNamed: aString)
  					user: self user
  					passwd: self password.
  	"More robust handling of HTTP responses. Instead of enumerating
  	all possible return codes and http versions, do a quick parse"
  	(response beginsWith: 'HTTP/') ifTrue:[
  		"Looks like an HTTP header, not some error message"
  		statusLine := response copyUpTo: Character cr.
  		code := [(statusLine findTokens: ' ') second asInteger] on: Error do:[].
  	(code isInteger and:[code between: 200 and: 299]) 
+ 		ifFalse:[self error: response].!
- 		ifFalse:[	(code isInteger and:[code = 401]) 
- 							ifTrue:[MCWorkingCopyBrowser editRepository. self storeVersion:aString]
- 	                             ifFalse:[self error: response]].!

More information about the etoys-dev mailing list