On 19 Apr 2013, at 05:38, "Sean P. DeNigris" <sean@clipperadams.com> wrote:
Norbert Hartl wrote
- the guys at dl.aragost.com didn't configure the web server correct. They didn't at a content type handler for .war so it says text/plain
Oy! Nice investigation :) The weird thing is that curl seemed to work reliably (albeit only a handful of test runs). I'll use curl for the time being :/
Nooooo ;-) Norbert actually demonstrated with curl that different servers returned different results, so it is/was not the client (either Zinc or curl). If you leave out the #accept: ZnClient won't tell you that you get an unexpected return type, just like curl. The following worked for me (mirror selection is probably location based): ZnClient new systemPolicy; logToTranscript; url: 'http://mirrors.jenkins-ci.org/war/latest/jenkins.war'; downloadTo: FileLocator imageDirectory; response. 2013-04-19 08:55:39 760189 I Wrote a ZnRequest(GET /war/latest/jenkins.war) 2013-04-19 08:55:39 760189 D Sent headers Accept: */* User-Agent: Zinc HTTP Components 1.0 Host: mirrors.jenkins-ci.org 2013-04-19 08:55:39 760189 I Read a ZnResponse(302 Found text/html;charset=iso-8859-1 333B) 2013-04-19 08:55:39 760189 D Received headers Vary: Accept-Encoding Content-Length: 333 Connection: close Set-Cookie: SERVERID=Local; path=/ Content-Type: text/html; charset=iso-8859-1 Date: Fri, 19 Apr 2013 06:55:38 GMT Location: http://ftp.nluug.nl/programming/jenkins/war/1.511/jenkins.war X-Mirrorbrain-Realm: region X-Mirrorbrain-Mirror: ftp.nluug.nl Server: Apache/2.2.14 (Ubuntu) 2013-04-19 08:55:39 760189 D Redirecting 2013-04-19 08:55:39 760189 D Received cookie: SERVERID=Local; path=/; domain=mirrors.jenkins-ci.org 2013-04-19 08:55:39 760189 I Wrote a ZnRequest(GET /programming/jenkins/war/1.511/jenkins.war) 2013-04-19 08:55:39 760189 D Sent headers Accept: */* User-Agent: Zinc HTTP Components 1.0 Host: ftp.nluug.nl 2013-04-19 08:55:39 760189 I Read a ZnResponse(200 OK text/plain;charset=UTF-8 53866436B) 2013-04-19 08:55:39 760189 D Received headers Date: Fri, 19 Apr 2013 06:55:38 GMT Content-Length: 53866436 Etag: "8c6442f-335efc4-4da5c37a13200" Server: Apache/2.2.15 (CentOS) Accept-Ranges: bytes Last-Modified: Mon, 15 Apr 2013 01:31:52 GMT Content-Type: text/plain; charset=UTF-8 2013-04-19 08:55:39 760189 T GET /programming/jenkins/war/1.511/jenkins.war 200 53866436B 349ms And I tested the .war using jar -tvf so I guess it is OK. Zinc might fail interpreting binary data as text, as text/plain defaults to UTF-8, but it didn't in the example above while returning/using text/plain; charset=UTF-8 Sven -- Sven Van Caekenberghe Proudly supporting Pharo http://pharo.org http://association.pharo.org http://consortium.pharo.org