Issue 5053 in pharo: ZnChunkedReadStream doesNotUnderstand: #next:into:

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Issue 5053 in pharo: ZnChunkedReadStream doesNotUnderstand: #next:into:

pharo
Status: Accepted
Owner: [hidden email]

New issue 5053 by [hidden email]: ZnChunkedReadStream  
doesNotUnderstand: #next:into:
http://code.google.com/p/pharo/issues/detail?id=5053

Pharo image:  1.3 and 1.4

Steps to reproduce:

Evaluate:

Gofer new
        url: 'http://squeaksource.blueplane.jp/Otomatic';
         package: 'Otomatic';
        load

DNU Raised

3 December 2011 1:18:09 pm

VM: Mac OS - intel - 1072 - Croquet Closure Cog VM [CoInterpreter  
VMMaker-oscog.dtl.57] 21.0
Image: Pharo1.4a [Latest update: #14242]

ZnChunkedReadStream(Object)>>doesNotUnderstand: #next:into:
        Receiver: a ZnChunkedReadStream
        Arguments and temporary variables:
                aMessage: next: 74378 into: #[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0  
0 0 0 0...etc...
                exception: MessageNotUnderstood: ZnChunkedReadStream>>next:into:
                resumeValue: nil
        Receiver's instance variables:
                stream: SocketStream[inbuf:4kb/outbuf:4kb]
                chunk: nil
                position: nil
                limit: nil
                atEnd: false
                totalSize: 0
                extraHeaders: nil

ZnByteArrayEntity>>readFrom:
        Receiver: a ZnByteArrayEntity(application/monticello 74378B)
        Arguments and temporary variables:
                stream: a ZnChunkedReadStream
                byteArray: #[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0  
0 0 0 ...etc...
        Receiver's instance variables:
                contentType: application/monticello
                contentLength: 74378
                bytes: nil

ZnEntity class>>readFrom:usingType:andLength:
        Receiver: ZnEntity
        Arguments and temporary variables:
                stream: a ZnChunkedReadStream
                mimeType: application/monticello
                length: 74378
                newEntity: a ZnByteArrayEntity(application/monticello 74378B)
        Receiver's instance variables:
                superclass: Object
                methodDict: a MethodDictionary(#close->(ZnEntity>>#close "a  
CompiledMethod(1006...etc...
                format: 134
                instanceVariables: #('contentType' 'contentLength')
                organization: ('accessing' contentLength contentLength: contentType  
contentType...etc...
                subclasses: {ZnApplicationFormUrlEncodedEntity. ZnByteArrayEntity.  
ZnMultiPartF...etc...
                name: #ZnEntity
                classPool: nil
                sharedPools: nil
                environment: a SystemDictionary(lots of globals)
                category: #'Zinc-HTTP-Core'
                traitComposition: {}
                localSelectors: nil

ZnEntityReader>>readEntityFromStream
        Receiver: a ZnEntityReader
        Arguments and temporary variables:
                entity: nil
                decodedEntityLength: 74378
                chunkedStream: a ZnChunkedReadStream
        Receiver's instance variables:
                headers: a  
ZnHeaders('Content-Length'->'74378' 'Content-Type'->'application/mon...etc...
                stream: a ZnChunkedReadStream
                streaming: nil
                allowReadingUpToEnd: true

ZnEntityReader>>readEntity
        Receiver: a ZnEntityReader
        Arguments and temporary variables:
                entity: nil
        Receiver's instance variables:
                headers: a  
ZnHeaders('Content-Length'->'74378' 'Content-Type'->'application/mon...etc...
                stream: a ZnChunkedReadStream
                streaming: nil
                allowReadingUpToEnd: true

ZnResponse(ZnMessage)>>readEntityFrom:
        Receiver: a ZnResponse(200 OK)
        Arguments and temporary variables:
                stream: SocketStream[inbuf:4kb/outbuf:4kb]
        Receiver's instance variables:
                headers: a  
ZnHeaders('Content-Length'->'74378' 'Content-Type'->'application/mon...etc...
                entity: nil
                statusLine: a ZnStatusLine(200 OK)

ZnResponse>>readEntityFrom:
        Receiver: a ZnResponse(200 OK)
        Arguments and temporary variables:
                stream: SocketStream[inbuf:4kb/outbuf:4kb]
        Receiver's instance variables:
                headers: a  
ZnHeaders('Content-Length'->'74378' 'Content-Type'->'application/mon...etc...
                entity: nil
                statusLine: a ZnStatusLine(200 OK)

ZnResponse(ZnMessage)>>readFrom:
        Receiver: a ZnResponse(200 OK)
        Arguments and temporary variables:
                stream: SocketStream[inbuf:4kb/outbuf:4kb]
        Receiver's instance variables:
                headers: a  
ZnHeaders('Content-Length'->'74378' 'Content-Type'->'application/mon...etc...
                entity: nil
                statusLine: a ZnStatusLine(200 OK)

ZnResponse class(ZnMessage class)>>readFrom:
        Receiver: ZnResponse
        Arguments and temporary variables:
                stream: SocketStream[inbuf:4kb/outbuf:4kb]
        Receiver's instance variables:
                superclass: ZnMessage
                methodDict: a MethodDictionary(#addCookie:->(ZnResponse>>#addCookie: "a  
Compile...etc...
                format: 136
                instanceVariables: #('statusLine')
                organization: ('accessing' addCookie: code cookies location  
setKeepAliveFor: se...etc...
                subclasses: nil
                name: #ZnResponse
                classPool: nil
                sharedPools: nil
                environment: a SystemDictionary(lots of globals)
                category: #'Zinc-HTTP-Core'
                traitComposition: {}
                localSelectors: nil

ZnClient>>executeRequestResponse
        Receiver: a ZnClient
        Arguments and temporary variables:

        Receiver's instance variables:
                request: a ZnRequest(GET /Otomatic/Otomatic-nsh.12.mcz)
                response: nil
                connection: SocketStream[inbuf:4kb/outbuf:4kb]
                lastUsed: nil
                state: #inProgress
                options: a Dictionary(#oneShot->true )
                session: nil
                log: a ZnLogSupport

[self executeRequestResponse] in ZnClient>>getConnectionAndExecute
        Receiver: a ZnClient
        Arguments and temporary variables:

        Receiver's instance variables:
                request: a ZnRequest(GET /Otomatic/Otomatic-nsh.12.mcz)
                response: nil
                connection: SocketStream[inbuf:4kb/outbuf:4kb]
                lastUsed: nil
                state: #inProgress
                options: a Dictionary(#oneShot->true )
                session: nil
                log: a ZnLogSupport

BlockClosure>>ensure:
        Receiver: [self executeRequestResponse]
        Arguments and temporary variables:
                aBlock: [self cleanupConnection]
                complete: nil
                returnValue: nil
        Receiver's instance variables:
                outerContext: ZnClient>>getConnectionAndExecute
                startpc: 132
                numArgs: 0

ZnClient>>getConnectionAndExecute
        Receiver: a ZnClient
        Arguments and temporary variables:

        Receiver's instance variables:
                request: a ZnRequest(GET /Otomatic/Otomatic-nsh.12.mcz)
                response: nil
                connection: SocketStream[inbuf:4kb/outbuf:4kb]
                lastUsed: nil
                state: #inProgress
                options: a Dictionary(#oneShot->true )
                session: nil
                log: a ZnLogSupport

ZnClient>>executeWithRedirectsRemaining:
        Receiver: a ZnClient
        Arguments and temporary variables:
                redirectCount: 3
        Receiver's instance variables:
                request: a ZnRequest(GET /Otomatic/Otomatic-nsh.12.mcz)
                response: nil
                connection: SocketStream[inbuf:4kb/outbuf:4kb]
                lastUsed: nil
                state: #inProgress
                options: a Dictionary(#oneShot->true )
                session: nil
                log: a ZnLogSupport

[self executeWithRedirectsRemaining: self maxNumberOfRedirects] in  
ZnClient>>executeWithRetriesRemaining:
        Receiver: a ZnClient
        Arguments and temporary variables:

        Receiver's instance variables:
                request: a ZnRequest(GET /Otomatic/Otomatic-nsh.12.mcz)
                response: nil
                connection: SocketStream[inbuf:4kb/outbuf:4kb]
                lastUsed: nil
                state: #inProgress
                options: a Dictionary(#oneShot->true )
                session: nil
                log: a ZnLogSupport

BlockClosure>>on:do:
        Receiver: [self executeWithRedirectsRemaining: self maxNumberOfRedirects]
        Arguments and temporary variables:
                exception: Exception
                handlerAction: [:exception | retryCount > 0
                ifTrue: [self handleRetry; execut...etc...
                handlerActive: false
        Receiver's instance variables:
                outerContext: ZnClient>>executeWithRetriesRemaining:
                startpc: 49
                numArgs: 0

ZnClient>>executeWithRetriesRemaining:
        Receiver: a ZnClient
        Arguments and temporary variables:
                retryCount: 0
        Receiver's instance variables:
                request: a ZnRequest(GET /Otomatic/Otomatic-nsh.12.mcz)
                response: nil
                connection: SocketStream[inbuf:4kb/outbuf:4kb]
                lastUsed: nil
                state: #inProgress
                options: a Dictionary(#oneShot->true )
                session: nil
                log: a ZnLogSupport

[self ifFailBlock
                ifNil: [self executeWithRetriesRemaining: self numberOfRetries]
                ifNotNil: [[self executeWithRetriesRemaining: self numberOfRetries]
                                on: Exception
                                do: self ifFailBlock]] in ZnClient>>executeWithTimeout
        Receiver: a ZnClient
        Arguments and temporary variables:

        Receiver's instance variables:
                request: a ZnRequest(GET /Otomatic/Otomatic-nsh.12.mcz)
                response: nil
                connection: SocketStream[inbuf:4kb/outbuf:4kb]
                lastUsed: nil
                state: #inProgress
                options: a Dictionary(#oneShot->true )
                session: nil
                log: a ZnLogSupport

[^ block value] in ZnClient>>withTimeoutDo:
        Receiver: a ZnClient
        Arguments and temporary variables:
                block: [self ifFailBlock
                ifNil: [self executeWithRetriesRemaining: self numbe...etc...
        Receiver's instance variables:
                request: a ZnRequest(GET /Otomatic/Otomatic-nsh.12.mcz)
                response: nil
                connection: SocketStream[inbuf:4kb/outbuf:4kb]
                lastUsed: nil
                state: #inProgress
                options: a Dictionary(#oneShot->true )
                session: nil
                log: a ZnLogSupport

[p psValueAt: index put: anObject.
        aBlock value] in ZnConnectionTimeout(DynamicVariable)>>value:during:
        Receiver: a ZnConnectionTimeout
        Arguments and temporary variables:
                anObject: 10
                aBlock: [^ block value]
                p: a Process in  
MorphicUIManager>>openDebuggerOn:context:label:contents:fullVie...etc...
        Receiver's instance variables:
                index: 1

BlockClosure>>ensure:
        Receiver: [p psValueAt: index put: anObject.
        aBlock value]
        Arguments and temporary variables:
                aBlock: [p psValueAt: index put: oldValue]
                complete: nil
                returnValue: nil
        Receiver's instance variables:
                outerContext: ZnConnectionTimeout(DynamicVariable)>>value:during:
                startpc: 62
                numArgs: 0

ZnConnectionTimeout(DynamicVariable)>>value:during:
        Receiver: a ZnConnectionTimeout
        Arguments and temporary variables:
                anObject: 10
                aBlock: [^ block value]
                p: a Process in  
MorphicUIManager>>openDebuggerOn:context:label:contents:fullVie...etc...
                oldValue: nil
        Receiver's instance variables:
                index: 1

ZnConnectionTimeout class(DynamicVariable class)>>value:during:
        Receiver: ZnConnectionTimeout
        Arguments and temporary variables:
                anObject: 10
                aBlock: [^ block value]
        Receiver's instance variables:
                superclass: DynamicVariable
                methodDict: a MethodDictionary()
                format: 132
                instanceVariables: nil
                organization: ('as yet unclassified')

                subclasses: nil
                name: #ZnConnectionTimeout
                classPool: nil
                sharedPools: nil
                environment: a SystemDictionary(lots of globals)
                category: #'Zinc-HTTP-Support'
                traitComposition: nil
                localSelectors: nil
                hash: 972029952
                soleInstance: a ZnConnectionTimeout

ZnClient>>withTimeoutDo:
        Receiver: a ZnClient
        Arguments and temporary variables:
                block: [self ifFailBlock
                ifNil: [self executeWithRetriesRemaining: self numbe...etc...
        Receiver's instance variables:
                request: a ZnRequest(GET /Otomatic/Otomatic-nsh.12.mcz)
                response: nil
                connection: SocketStream[inbuf:4kb/outbuf:4kb]
                lastUsed: nil
                state: #inProgress
                options: a Dictionary(#oneShot->true )
                session: nil
                log: a ZnLogSupport

ZnClient>>executeWithTimeout
        Receiver: a ZnClient
        Arguments and temporary variables:

        Receiver's instance variables:
                request: a ZnRequest(GET /Otomatic/Otomatic-nsh.12.mcz)
                response: nil
                connection: SocketStream[inbuf:4kb/outbuf:4kb]
                lastUsed: nil
                state: #inProgress
                options: a Dictionary(#oneShot->true )
                session: nil
                log: a ZnLogSupport

ZnClient>>execute
        Receiver: a ZnClient
        Arguments and temporary variables:
                initialMilliseconds: 57743
                result: nil
        Receiver's instance variables:
                request: a ZnRequest(GET /Otomatic/Otomatic-nsh.12.mcz)
                response: nil
                connection: SocketStream[inbuf:4kb/outbuf:4kb]
                lastUsed: nil
                state: #inProgress
                options: a Dictionary(#oneShot->true )
                session: nil
                log: a ZnLogSupport

ZnClient>>get
        Receiver: a ZnClient
        Arguments and temporary variables:

        Receiver's instance variables:
                request: a ZnRequest(GET /Otomatic/Otomatic-nsh.12.mcz)
                response: nil
                connection: SocketStream[inbuf:4kb/outbuf:4kb]
                lastUsed: nil
                state: #inProgress
                options: a Dictionary(#oneShot->true )
                session: nil
                log: a ZnLogSupport

ZnHTTPSocketFacade class>>httpGet:args:user:passwd:
        Receiver: ZnHTTPSocketFacade
        Arguments and temporary variables:
                urlObject:  
        'http://squeaksource.blueplane.jp/Otomatic/Otomatic-nsh.12.mcz'
                queryArguments: nil
                username: ''
                password: ''
                client: a ZnClient
        Receiver's instance variables:
                superclass: Object
                methodDict: a MethodDictionary()
                format: 2
                instanceVariables: nil
                organization: ('as yet unclassified')

                subclasses: nil
                name: #ZnHTTPSocketFacade
                classPool: nil
                sharedPools: nil
                environment: a SystemDictionary(lots of globals)
                category: #'Zinc-HTTP-Client-Server'
                traitComposition: {}
                localSelectors: nil

HTTPSocket class>>httpGet:args:user:passwd:
        Receiver: HTTPSocket
        Arguments and temporary variables:
                url: 'http://squeaksource.blueplane.jp/Otomatic/Otomatic-nsh.12.mcz'
                queryArguments: nil
                username: ''
                password: ''
        Receiver's instance variables:
                superclass: Socket
                methodDict: a  
MethodDictionary(#contentType->(HTTPSocket>>#contentType "a Compi...etc...
                format: 144
                instanceVariables: #('headerTokens' 'headers' 'responseCode')
                organization: ('accessing' contentType contentType: contentsLength:  
getHeader: ...etc...
                subclasses: nil
                name: #HTTPSocket
                classPool: a Dictionary(#HTTPBlabEmail->'' #HTTPProxyCredentials->''  
#HTTPProxy...etc...
                sharedPools: nil
                environment: a SystemDictionary(lots of globals)
                category: #'Network-Protocols'
                traitComposition: nil
                localSelectors: nil

[contents := HTTPSocket
                                httpGet: (self urlForFileNamed: aString)
                                args: nil
                                user: self user
                                passwd: self password] in MCHttpRepository>>readStreamForFileNamed:do:
        Receiver: a MCHttpRepository(http://squeaksource.blueplane.jp/Otomatic)
        Arguments and temporary variables:
                aString: 'Otomatic-nsh.12.mcz'
                contents: #(nil)
        Receiver's instance variables:
                creationTemplate: 'MCHttpRepository
     location: ''http://squeaksource.bluepla...etc...
                storeDiffs: nil
                cache: a Dictionary()
                allFileNames: nil
                location: 'http://squeaksource.blueplane.jp/Otomatic'
                user: ''
                password: ''
                readerCache: a Dictionary()

[workBlock value] in [:bar | [workBlock value]
                on: HTTPProgress
                do: [:ex |
                        (ex total
                                        ifNil: [true]
                                        ifNotNil: [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]] in MCHttpRepository>>displayProgress:during:
        Receiver: a MCHttpRepository(http://squeaksource.blueplane.jp/Otomatic)
        Arguments and temporary variables:
                workBlock: [contents := HTTPSocket
                                httpGet: (self urlForFileNamed: aString)...etc...
        Receiver's instance variables:
                creationTemplate: 'MCHttpRepository
     location: ''http://squeaksource.bluepla...etc...
                storeDiffs: nil
                cache: a Dictionary()
                allFileNames: nil
                location: 'http://squeaksource.blueplane.jp/Otomatic'
                user: ''
                password: ''
                readerCache: a Dictionary()

BlockClosure>>on:do:
        Receiver: [workBlock value]
        Arguments and temporary variables:
                exception: HTTPProgress
                handlerAction: [:ex |
(ex total
                        ifNil: [true]
                        ifNotNil: [ex amount == ni...etc...
                handlerActive: true
        Receiver's instance variables:
                outerContext: [:bar | [workBlock value]
                on: HTTPProgress
                do: [:ex |
                        (ex...etc...
                startpc: 104
                numArgs: 0

[:bar | [workBlock value]
                on: HTTPProgress
                do: [:ex |
                        (ex total
                                        ifNil: [true]
                                        ifNotNil: [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]] in MCHttpRepository>>displayProgress:during:
        Receiver: a MCHttpRepository(http://squeaksource.blueplane.jp/Otomatic)
        Arguments and temporary variables:
                workBlock: [:barValArg |
| barVal return newBarSize |
barVal := barValArg.
        re...etc...
                nextUpdateTime: [contents := HTTPSocket
                                httpGet: (self urlForFileNamed: aSt...etc...
                bar: #(0)
        Receiver's instance variables:
                creationTemplate: 'MCHttpRepository
     location: ''http://squeaksource.bluepla...etc...
                storeDiffs: nil
                cache: a Dictionary()
                allFileNames: nil
                location: 'http://squeaksource.blueplane.jp/Otomatic'
                user: ''
                password: ''
                readerCache: a Dictionary()

[result := workBlock value: progress] in [[result := workBlock value:  
progress]
                on: ProgressNotification
                do: [:ex |
                        ex extraParam isString
                                ifTrue: [SystemProgressMorph uniqueInstance labelAt: progress put: ex  
extraParam].
                        ex resume]] in ProgressInitiationException>>defaultMorphicAction
        Receiver: ProgressInitiationException
        Arguments and temporary variables:
                progress: [:barValArg |
| barVal return newBarSize |
barVal := barValArg.
        ret...etc...
                result: #(nil)
        Receiver's instance variables:
                messageText: nil
                tag: nil
                signaler: a MorphicUIManager
                signalContext: ProgressInitiationException(Exception)>>signal
                handlerContext: nil
                outerContext: nil
                workBlock: [:bar | [workBlock value]
                on: HTTPProgress
                do: [:ex |
                        (ex to...etc...
                maxVal: 1.0
                minVal: 0.0
                aPoint: (488@331)
                progressTitle: 'Downloading Otomatic-nsh.12.mcz'

BlockClosure>>on:do:
        Receiver: [result := workBlock value: progress]
        Arguments and temporary variables:
                exception: ProgressNotification
                handlerAction: [:ex |
ex extraParam isString
                ifTrue: [SystemProgressMorph un...etc...
                handlerActive: true
        Receiver's instance variables:
                outerContext: [[result := workBlock value: progress]
                on: ProgressNotification...etc...
                startpc: 87
                numArgs: 0

[[result := workBlock value: progress]
                on: ProgressNotification
                do: [:ex |
                        ex extraParam isString
                                ifTrue: [SystemProgressMorph uniqueInstance labelAt: progress put: ex  
extraParam].
                        ex resume]] in ProgressInitiationException>>defaultMorphicAction
        Receiver: ProgressInitiationException
        Arguments and temporary variables:
                progress: [:barValArg |
| barVal return newBarSize |
barVal := barValArg.
        ret...etc...
                result: #(nil)
        Receiver's instance variables:
                messageText: nil
                tag: nil
                signaler: a MorphicUIManager
                signalContext: ProgressInitiationException(Exception)>>signal
                handlerContext: nil
                outerContext: nil
                workBlock: [:bar | [workBlock value]
                on: HTTPProgress
                do: [:ex |
                        (ex to...etc...
                maxVal: 1.0
                minVal: 0.0
                aPoint: (488@331)
                progressTitle: 'Downloading Otomatic-nsh.12.mcz'

BlockClosure>>ensure:
        Receiver: [[result := workBlock value: progress]
                on: ProgressNotification
                do: [:ex |
                        ex extr...etc...
        Arguments and temporary variables:
                aBlock: [SystemProgressMorph close: progress]
                complete: nil
                returnValue: nil
        Receiver's instance variables:
                outerContext: ProgressInitiationException>>defaultMorphicAction
                startpc: 81
                numArgs: 0

ProgressInitiationException>>defaultMorphicAction
        Receiver: ProgressInitiationException
        Arguments and temporary variables:
                progress: [:barValArg |
| barVal return newBarSize |
barVal := barValArg.
        ret...etc...
                result: #(nil)
        Receiver's instance variables:
                messageText: nil
                tag: nil
                signaler: a MorphicUIManager
                signalContext: ProgressInitiationException(Exception)>>signal
                handlerContext: nil
                outerContext: nil
                workBlock: [:bar | [workBlock value]
                on: HTTPProgress
                do: [:ex |
                        (ex to...etc...
                maxVal: 1.0
                minVal: 0.0
                aPoint: (488@331)
                progressTitle: 'Downloading Otomatic-nsh.12.mcz'

MorphicUIManager>>progressInitiationExceptionDefaultAction:
        Receiver: a MorphicUIManager
        Arguments and temporary variables:
                anException: ProgressInitiationException
        Receiver's instance variables:
                interactiveParser: nil


--- The full stack ---
ZnChunkedReadStream(Object)>>doesNotUnderstand: #next:into:
ZnByteArrayEntity>>readFrom:
ZnEntity class>>readFrom:usingType:andLength:
ZnEntityReader>>readEntityFromStream
ZnEntityReader>>readEntity
ZnResponse(ZnMessage)>>readEntityFrom:
ZnResponse>>readEntityFrom:
ZnResponse(ZnMessage)>>readFrom:
ZnResponse class(ZnMessage class)>>readFrom:
ZnClient>>executeRequestResponse
[self executeRequestResponse] in ZnClient>>getConnectionAndExecute
BlockClosure>>ensure:
ZnClient>>getConnectionAndExecute
ZnClient>>executeWithRedirectsRemaining:
[self executeWithRedirectsRemaining: self maxNumberOfRedirects] in  
ZnClient>>executeWithRetriesRemaining:
BlockClosure>>on:do:
ZnClient>>executeWithRetriesRemaining:
[self ifFailBlock
                ifNil: [self executeWithRetriesRemaining: self numberOfRetries]
                ifNotNil: [[self executeWithRetriesRemaining: self numberOfRetries]
                                on: Exception
                                do: self ifFailBlock]] in ZnClient>>executeWithTimeout
[^ block value] in ZnClient>>withTimeoutDo:
[p psValueAt: index put: anObject.
        aBlock value] in ZnConnectionTimeout(DynamicVariable)>>value:during:
BlockClosure>>ensure:
ZnConnectionTimeout(DynamicVariable)>>value:during:
ZnConnectionTimeout class(DynamicVariable class)>>value:during:
ZnClient>>withTimeoutDo:
ZnClient>>executeWithTimeout
ZnClient>>execute
ZnClient>>get
ZnHTTPSocketFacade class>>httpGet:args:user:passwd:
HTTPSocket class>>httpGet:args:user:passwd:
[contents := HTTPSocket
                                httpGet: (self urlForFileNamed: aString)
                                args: nil
                                user: self user
                                passwd: self password] in MCHttpRepository>>readStreamForFileNamed:do:
[workBlock value] in [:bar | [workBlock value]
                on: HTTPProgress
                do: [:ex |
                        (ex total
                                        ifNil: [true]
                                        ifNotNil: [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]] in MCHttpRepository>>displayProgress:during:
BlockClosure>>on:do:
[:bar | [workBlock value]
                on: HTTPProgress
                do: [:ex |
                        (ex total
                                        ifNil: [true]
                                        ifNotNil: [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]] in MCHttpRepository>>displayProgress:during:
[result := workBlock value: progress] in [[result := workBlock value:  
progress]
                on: ProgressNotification
                do: [:ex |
                        ex extraParam isString
                                ifTrue: [SystemProgressMorph uniqueInstance labelAt: progress put: ex  
extraParam].
                        ex resume]] in ProgressInitiationException>>defaultMorphicAction
BlockClosure>>on:do:
[[result := workBlock value: progress]
                on: ProgressNotification
                do: [:ex |
                        ex extraParam isString
                                ifTrue: [SystemProgressMorph uniqueInstance labelAt: progress put: ex  
extraParam].
                        ex resume]] in ProgressInitiationException>>defaultMorphicAction
BlockClosure>>ensure:
ProgressInitiationException>>defaultMorphicAction
MorphicUIManager>>progressInitiationExceptionDefaultAction:
  - - - - - - - - - - - - - - -
                        - - - - - - - - - - - - - - - - - -
ProgressInitiationException>>defaultAction
UndefinedObject>>handleSignal:
MethodContext(ContextPart)>>handleSignal:
MethodContext(ContextPart)>>handleSignal:
MethodContext(ContextPart)>>handleSignal:
ProgressInitiationException(Exception)>>signal
ProgressInitiationException>>display:at:from:to:during:
ProgressInitiationException class>>display:at:from:to:during:
MorphicUIManager>>displayProgress:from:to:during:
MCHttpRepository>>displayProgress:during:
MCHttpRepository>>readStreamForFileNamed:do:
MCHttpRepository(MCFileBasedRepository)>>versionReaderForFileNamed:do:
[self resizeCache: readerCache.
        super
                versionReaderForFileNamed: aString
                do: [:r | r
                                ifNotNil: [readerCache at: aString put: r]]] in  
MCHttpRepository>>versionReaderForFileNamed:
Dictionary>>at:ifAbsent:
MCHttpRepository>>versionReaderForFileNamed:
MCHttpRepository>>versionReaderForFileNamed:do:
MCHttpRepository(MCFileBasedRepository)>>loadVersionFromFileNamed:
MCHttpRepository(MCFileBasedRepository)>>goferVersionFrom:
GoferResolvedReference>>version
GoferLoad>>addResolved:
[:each | self addResolved: each] in GoferLoad>>initializeOn:
[:each |
| newLabel |
(count = 0
                        or: [count + 1 = size
                                        or: [(Time millisecondsSince: lastUpdate)
                                                        >= msecs]])
                ifTrue: [bar value: count.
                        oldLabel = (newLabel := (labelBlock value: each)
                                                                ifNil: [oldLabel])
                                ifFalse: [ProgressNotification signal: '' extra: (oldLabel :=  
newLabel)].
                        lastUpdate := Time millisecondClockValue].
        aBlock value: each.
        count := count + 1] in [:bar | self
                do: [:each |
                        | newLabel |
                        (count = 0
                                        or: [count + 1 = size
                                                        or: [(Time millisecondsSince: lastUpdate)
                                                                        >= msecs]])
                                ifTrue: [bar value: count.
                                        oldLabel = (newLabel := (labelBlock value: each)
                                                                                ifNil: [oldLabel])
                                                ifFalse: [ProgressNotification signal: '' extra: (oldLabel :=  
newLabel)].
                                        lastUpdate := Time millisecondClockValue].
                        aBlock value: each.
                        count := count + 1]] in Array(Collection)>>do:displayingProgress:every:
Array(SequenceableCollection)>>do:
[:bar | self
                do: [:each |
                        | newLabel |
                        (count = 0
                                        or: [count + 1 = size
                                                        or: [(Time millisecondsSince: lastUpdate)
                                                                        >= msecs]])
                                ifTrue: [bar value: count.
                                        oldLabel = (newLabel := (labelBlock value: each)
                                                                                ifNil: [oldLabel])
                                                ifFalse: [ProgressNotification signal: '' extra: (oldLabel :=  
newLabel)].
                                        lastUpdate := Time millisecondClockValue].
                        aBlock value: each.
                        count := count + 1]] in Array(Collection)>>do:displayingProgress:every:
[result := workBlock value: progress] in [[result := workBlock value:  
progress]
                on: ProgressNotification
                do: [:ex |
                        ex extraParam isString
                                ifTrue: [SystemProgressMorph uniqueInstance labelAt: progress put: ex  
extraParam].
                        ex resume]] in ProgressInitiationException>>defaultMorphicAction
BlockClosure>>on:do:
[[result := workBlock value: progress]
                on: ProgressNotification
                do: [:ex |
                        ex extraParam isString
                                ifTrue: [SystemProgressMorph uniqueInstance labelAt: progress put: ex  
extraParam].
                        ex resume]] in ProgressInitiationException>>defaultMorphicAction
BlockClosure>>ensure:
ProgressInitiationException>>defaultMorphicAction
MorphicUIManager>>progressInitiationExceptionDefaultAction:
ProgressInitiationException>>defaultAction
UndefinedObject>>handleSignal:
MethodContext(ContextPart)>>handleSignal:
MethodContext(ContextPart)>>handleSignal:
ProgressInitiationException(Exception)>>signal
ProgressInitiationException>>display:at:from:to:during:
ProgressInitiationException class>>display:at:from:to:during:
ByteString(String)>>displayProgressFrom:to:during:
Array(Collection)>>do:displayingProgress:every:
Array(Collection)>>do:displayingProgress:
GoferLoad>>initializeOn:
GoferLoad class(GoferOperation class)>>on:
Gofer>>execute:do:
Gofer>>execute:
Gofer>>load
UndefinedObject>>DoIt
Compiler>>evaluate:in:to:notifying:ifFail:logged:
[rcvr class evaluatorClass new
                evaluate: self selectionForDoitAsStream
                in: ctxt
                to: rcvr
                notifying: self morph
                ifFail: [self morph flash.
                        ^ nil]
                logged: true] in SmalltalkEditor>>evaluateSelectionAndDo:
BlockClosure>>on:do:
SmalltalkEditor>>evaluateSelectionAndDo:
SmalltalkEditor>>printIt
SmalltalkEditor>>printIt:
SmalltalkEditor(TextEditor)>>performCmdActionsWith:shifted:return:
SmalltalkEditor(TextEditor)>>dispatchCommandOn:return:
SmalltalkEditor(TextEditor)>>dispatchOn:
[self dispatchOn: aKeyboardEvent] in SmalltalkEditor(TextEditor)>>keystroke:
SmalltalkEditor(TextEditor)>>handleKeystrokeAction:
SmalltalkEditor(TextEditor)>>handleEditionAction:fromKeyboardEvent:
SmalltalkEditor(TextEditor)>>keystroke:
[editor keystroke: evt] in [| action |
evt keyValue = 13
                ifTrue: [action := self crAction.
                        action
                                ifNotNil: [evt hand newKeyboardFocus: nil.
                                        ^ action value]].
        self
                handleInteraction: [editor keystroke: evt].
        self updateFromParagraph.
        super keyStroke: evt] in TextMorphForEditView(TextMorph)>>keyStroke:
TextMorphForEditView(TextMorph)>>handleInteraction:
TextMorphForEditView>>handleInteraction:
[| action |
evt keyValue = 13
                ifTrue: [action := self crAction.
                        action
                                ifNotNil: [evt hand newKeyboardFocus: nil.
                                        ^ action value]].
        self
                handleInteraction: [editor keystroke: evt].
        self updateFromParagraph.
        super keyStroke: evt] in TextMorphForEditView(TextMorph)>>keyStroke:
ToolRegistry>>codeCompletionAround:textMorph:keyStroke:
SmalltalkEditor>>codeCompletionAround:textMorph:keyStroke:
TextMorphForEditView(TextMorph)>>keyStroke:
TextMorphForEditView>>keyStroke:
TextMorphForEditView(TextMorph)>>handleKeystroke:
KeyboardEvent>>sentTo:
TextMorphForEditView(Morph)>>handleEvent:
TextMorphForEditView(Morph)>>handleFocusEvent:
[ActiveHand := self.
        ActiveEvent := anEvent.
        result := focusHolder
                                handleFocusEvent: (anEvent
                                                transformedBy: (focusHolder transformedFrom: self))] in  
HandMorph>>sendFocusEvent:to:clear:
[aBlock value] in PasteUpMorph>>becomeActiveDuring:
BlockClosure>>on:do:
PasteUpMorph>>becomeActiveDuring:
HandMorph>>sendFocusEvent:to:clear:
HandMorph>>sendEvent:focus:clear:
HandMorph>>sendKeyboardEvent:
HandMorph>>handleEvent:
HandMorph>>processEvents
[:h |
ActiveHand := h.
        h processEvents.
        ActiveHand := nil] in WorldState>>doOneCycleNowFor:
Array(SequenceableCollection)>>do:
WorldState>>handsDo:
WorldState>>doOneCycleNowFor:
WorldState>>doOneCycleFor:
PasteUpMorph>>doOneCycle
[[World doOneCycle.
        Processor yield.
        false] whileFalse.
        nil] in MorphicUIManager>>spawnNewProcess
[self value.
        Processor terminateActive] in BlockClosure>>newProcess



_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5053 in pharo: ZnChunkedReadStream doesNotUnderstand: #next:into:

pharo

Comment #1 on issue 5053 by [hidden email]: ZnChunkedReadStream  
doesNotUnderstand: #next:into:
http://code.google.com/p/pharo/issues/detail?id=5053

Thanks for reporting this, Laurent.

I reduced the problem to:

ZnClient new
        get: 'http://squeaksource.blueplane.jp/Otomatic/Otomatic-nsh.12.mcz'.

I will look into this and fix it ASAP.

Sven


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5053 in pharo: ZnChunkedReadStream doesNotUnderstand: #next:into:

pharo

Comment #2 on issue 5053 by [hidden email]: ZnChunkedReadStream  
doesNotUnderstand: #next:into:
http://code.google.com/p/pharo/issues/detail?id=5053

A new version of Zinc-HTTP was added to project Zinc HTTP Components:
http://www.squeaksource.com/ZincHTTPComponents/Zinc-HTTP-SvenVanCaekenberghe.223.mcz

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

Name: Zinc-HTTP-SvenVanCaekenberghe.223
Author: SvenVanCaekenberghe
Time: 3 December 2011, 5:51:17 pm
UUID: 19ce4497-786a-46a7-bd6c-55fa682dba56
Ancestors: Zinc-HTTP-SvenVanCaekenberghe.222

added missing ZnChunkedReadStream>>#next:into:
that was used by ZnEntityReader when reading a ZnByteArrayEntity
fix to Pharo issue 5053  
(http://code.google.com/p/pharo/issues/detail?id=5053)
thanks Laurent Laffont for reporting



_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5053 in pharo: ZnChunkedReadStream doesNotUnderstand: #next:into:

pharo
Updates:
        Status: FixToInclude

Comment #3 on issue 5053 by [hidden email]: ZnChunkedReadStream  
doesNotUnderstand: #next:into:
http://code.google.com/p/pharo/issues/detail?id=5053

(No comment was entered for this change.)


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5053 in pharo: ZnChunkedReadStream doesNotUnderstand: #next:into:

pharo
Updates:
        Labels: Milestone-1.4 Importance-High

Comment #4 on issue 5053 by [hidden email]: ZnChunkedReadStream  
doesNotUnderstand: #next:into:
http://code.google.com/p/pharo/issues/detail?id=5053

(No comment was entered for this change.)


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5053 in pharo: ZnChunkedReadStream doesNotUnderstand: #next:into:

pharo
Updates:
        Status: Integrated

Comment #5 on issue 5053 by [hidden email]: ZnChunkedReadStream  
doesNotUnderstand: #next:into:
http://code.google.com/p/pharo/issues/detail?id=5053

in 14244


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5053 in pharo: ZnChunkedReadStream doesNotUnderstand: #next:into:

pharo
Updates:
        Cc: [hidden email]

Comment #6 on issue 5053 by [hidden email]: ZnChunkedReadStream  
doesNotUnderstand: #next:into:
http://code.google.com/p/pharo/issues/detail?id=5053

Does it even make sense to pay heed the Content-Length field when chunked  
encoding is specified?
According to w3c (http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html):
"4.4 Message Length

3.If a Content-Length header field (section 14.13) is present, its decimal  
value in OCTETs represents both the entity-length and the transfer-length.  
The Content-Length header field MUST NOT be sent if these two lengths are  
different (i.e., if a Transfer-Encoding
      header field is present). If a message is received with both a
      Transfer-Encoding header field and a Content-Length header field,
      the latter MUST be ignored."

MUST is in capital letters there :)


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5053 in pharo: ZnChunkedReadStream doesNotUnderstand: #next:into:

pharo

Comment #7 on issue 5053 by [hidden email]: ZnChunkedReadStream  
doesNotUnderstand: #next:into:
http://code.google.com/p/pharo/issues/detail?id=5053

Interesting, I never read it that way. Thanks for the pointer.

ZnEntityReader currently does not throw away the content-length if it is  
present to fall back and let the transfer-encoding take over. If there is  
no content-length the entity will be read upToEnd over the chunked stream.

I feel it is (much) more efficient to be able to preallocate the byte array  
or string.

But keeping this remark as a reference for the futurte seems important.



_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5053 in pharo: ZnChunkedReadStream doesNotUnderstand: #next:into:

pharo

Comment #8 on issue 5053 by [hidden email]: ZnChunkedReadStream  
doesNotUnderstand: #next:into:
http://code.google.com/p/pharo/issues/detail?id=5053

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL  
NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this  
document are to be interpreted as described in RFC 2119

1. MUST   This word, or the terms "REQUIRED" or "SHALL", mean that the
    definition is an absolute requirement of the specification.

Efficient solutions aside, what other way is there to read it? ;)


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5053 in pharo: ZnChunkedReadStream doesNotUnderstand: #next:into:

pharo

Comment #9 on issue 5053 by [hidden email]: ZnChunkedReadStream  
doesNotUnderstand: #next:into:
http://code.google.com/p/pharo/issues/detail?id=5053

IE, if present, why not use it as a guideline to an initial buffer size for  
the contents, but let the canonical chunked-encoding way of determining  
when a message is ended determine when you actually stop reading?

If I were to guess, I think it's this way due to easy errors in whether  
content-length should include extra line breaks and chunk lengths present  
in the chunked contents tranferred.

The extra overhead of allocating a stream, and the 2x temporal memory use  
of doing contents can't be that bad, can it?
As long as the stream collection never grows due to being well initialized,  
I mean.


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker