Return-Path: Delivered-To: apmail-hc-httpclient-users-archive@www.apache.org Received: (qmail 32556 invoked from network); 15 Feb 2010 18:47:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 15 Feb 2010 18:47:46 -0000 Received: (qmail 77979 invoked by uid 500); 15 Feb 2010 11:41:05 -0000 Delivered-To: apmail-hc-httpclient-users-archive@hc.apache.org Received: (qmail 77914 invoked by uid 500); 15 Feb 2010 11:41:04 -0000 Mailing-List: contact httpclient-users-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpClient User Discussion" Delivered-To: mailing list httpclient-users@hc.apache.org Received: (qmail 77903 invoked by uid 99); 15 Feb 2010 11:41:04 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Feb 2010 11:41:04 +0000 X-ASF-Spam-Status: No, hits=1.1 required=10.0 tests=FORGED_HOTMAIL_RCVD2,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Feb 2010 11:40:56 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1NgzJb-0000pO-FU for httpclient-users@hc.apache.org; Mon, 15 Feb 2010 03:40:35 -0800 Message-ID: <27592543.post@talk.nabble.com> Date: Mon, 15 Feb 2010 03:40:35 -0800 (PST) From: brownie74 To: httpclient-users@hc.apache.org Subject: Downloading binaries through NTLM proxy MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: pbrown74@hotmail.com Hi, I'm downloading binaries (jar files) from a website using HttpClient 4.0 with JCIFS for NTLM support. I'm going through an NTLM proxy using HTTP/1.1. 90% of the files download OK. The remainder are getting chopped off at 13K - and this is the problem. I am getting an EOF on the InputStream at 13K. No error code in the HTTP response. Everything looks fine, except the jars are getting chopped at 13K. When I use my browser to download the jars (also through same proxy), they download in their entirety, OK. These are not the largest jars that I am downloading either. Much much larger ones are downloading with no issues. Much smaller ones are also downloading fine. I've also tried HTTP/1.0 in order to switch off chunked encoding. It made no difference. Here is the sort of code i'm doing to process the response: DefaultHttpClient httpclient = new DefaultHttpClient(); ... HttpGet httpGet = makeURL(); HttpResponse response = httpclient.execute(targetHost, httpGet); HttpEntity entity = response.getEntity(); if (entity != null) { entity.consumeContent(); } response = httpclient.execute(targetHost, httpGet); entity = response.getEntity(); if(response.getStatusLine().getStatusCode()!=HttpStatus.SC_OK) { throw new DownloadException(response.getStatusLine().getStatusCode()); } if (entity != null) { File output = new File(directory, filename); FileOutputStream fos = new FileOutputStream(output); entity.writeTo(fos); fos.close(); } httpclient.getConnectionManager().shutdown(); I've also tried removing the entity.writeTo and doing my own loop on entity.getContent() ... this made no difference. This is reproducable. Anybody seen anything similar? Thanks, brownie74 -- View this message in context: http://old.nabble.com/Downloading-binaries-through-NTLM-proxy-tp27592543p27592543.html Sent from the HttpClient-User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org For additional commands, e-mail: httpclient-users-help@hc.apache.org