Once I have a problem loading something from SS3 which was a piece of
source code with non-utf8 characters (WideString).
Could it be possible you have some non-utf characters in the source of the
package you are loading?
Cheers,

On Thu, Mar 21, 2013 at 10:08 AM, Sven Van Caekenberghe <s...@stfx.eu>wrote:

> Andrei,
>
> On 21 Mar 2013, at 13:28, Andrei Vasile Chis <chisvasileand...@gmail.com>
> wrote:
>
> > Hi Sven,
> >
> > I tried all the command from your previous mail and the results are
> > the same (output bellow).
>
> Thanks for the feedback.
>
> > The strange thing is that I can download other files from smalltalkhub
> > without problems.
>
> What do you mean, that it only fails for that particular mcz file from
> StHub in Pharo, but that others are OK ?
> That would be very disturbing. Can you give an example of a call that does
> work, with the Transcript output, like
>
> ZnClient new
>         logToTranscript;
>         setAcceptEncodingGzip;
>         get: '
> http://www.smalltalkhub.com/mc/AndreiChis/AnnouncerCentricDebugger/main/ACD-Tests-AndreiChis.1.mcz
> ';
>         response.
>
> 2013-03-20 23:17:17 995343 I Wrote a ZnRequest(GET
> /mc/AndreiChis/AnnouncerCentricDebugger/main/ACD-Tests-AndreiChis.1.mcz)
> 2013-03-20 23:17:17 995343 D Sent headers
> User-Agent: Zinc HTTP Components 1.0
> Accept-Encoding: gzip
> Host: www.smalltalkhub.com
> Accept: */*
>
> 2013-03-20 23:17:17 995343 I Read a ZnResponse(200 OK
> application/x-monticello 3451B)
> 2013-03-20 23:17:17 995343 D Received headers
> Date: Wed, 20 Mar 2013 22:17:18 GMT
> Content-Encoding: gzip
> Transfer-Encoding: chunked
> Content-Length: 3451
> Vary: Accept-Encoding
> Server: KomHttpServer/7.1.3 (unix)
> Content-Type: application/x-monticello
>
> 2013-03-20 23:17:17 995343 T GET
> /mc/AndreiChis/AnnouncerCentricDebugger/main/ACD-Tests-AndreiChis.1.mcz 200
> 3451B 272ms
>
> > A short summary:
> >
> > ZnEntityReader>>#readEntity calls ZnEntityReader>>#readEntityFromStream
> > which does 'GZipReadStream on: stream', after which
> > 'readFrom:usingType:andLength:' is called.
> > In a wrong call,  'GZipReadStream on: stream' always throws
> > ConnectionClosed. This is handled in
> > ZnClient>>executeWithRetriesRemaining:
> > which keeps retrying until retryCount is 0. On the other hand for some
> > files 'GZipReadStream on: stream'
> > returns correctly, no exception is raised and it works ok.
> >
> > The exception is thrown in Socket>>waitForDataFor:ifClosed:ifTimedOut:
> > because Socket>>primSocketConnectionStatus:
> > returns 3 instead of 2.
> >      [(Time millisecondsSince: startTime) < msecsDelta] whileTrue: [
> >                "here 'self primSocketConnectionStatus: socketHandle' is
> 2"
> >               (self primSocketReceiveDataAvailable: socketHandle)
> >                       ifTrue: [Transcript crShow: '    hasData'. ^self].
> >                "here 'self primSocketConnectionStatus: socketHandle' is
> 3, if
> > there is no more content to be read
> >                 so 'self isConnected' will be false."
> >               self isConnected
> >                       ifFalse: [Transcript crShow: '
>  notConnected'.^closedBlock value].
> >               self readSemaphore waitTimeoutMSecs:
> >                       (msecsDelta - (Time millisecondsSince: startTime)
> max: 0).
> >       ].
> >
> > That fact that this exception is raised during the call to
> > 'GZipReadStream on: stream' seem to be the problem,
> > as this does not allow readFrom: stream usingType: self contentType
> andLength:
> >
> > I hope this makes sense.
>
> We probably do not have to look in the socket[stream] layer, the first
> place to look is in ZnEntityReader, more specifically: what was the
> situation wrt headers before it starts reading the body, what decisions
> were taken, and how far was/is it in the reading process.
>
> > I can try to dig more into it tomorrow.
> > If you want me to look at other things let me know.
>
> I am wondering whether we could set some temporary screen sharing over the
> internet, so that I can remotely work in an image running on a machine in
> your network…
>
> Sven
>
> > Cheers,
> > Andrei
> >
> >
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> >
> > $ curl
> http://www.smalltalkhub.com/mc/AndreiChis/AnnouncerCentricDebugger/main/ACD-Tests-AndreiChis.1.mcz
> > -H "Accept-Encoding: gzip" | gunzip > foo.mcz
> >  % Total    % Received % Xferd  Average Speed   Time    Time     Time
>  Current
> >                                 Dload  Upload   Total   Spent    Left
>  Speed
> > 100  3307    0  3307    0     0   7583      0 --:--:-- --:--:-- --:--:--
>  8889
> >
> > $ file foo.mcz
> > foo.mcz: Zip archive data, at least v2.0 to extract
> >
> > $ ls -l foo.mcz
> > -rw-r--r--  1 andrei  staff  3451 Mar 21 09:55 foo.mcz
> >
> > $ unzip -l foo.mcz
> > Archive:  foo.mcz
> >  Length     Date   Time    Name
> > --------    ----   ----    ----
> >       18  03-27-11 02:22   package
> >      188  03-27-11 02:22   version
> >     8588  03-27-11 02:22   snapshot/source.st
> >     9014  03-27-11 02:22   snapshot.bin
> > --------                   -------
> >    17808                   4 files
> >
>
>
>


-- 
Mariano
http://marianopeck.wordpress.com

Reply via email to