Return-Path: X-Original-To: apmail-hc-httpclient-users-archive@www.apache.org Delivered-To: apmail-hc-httpclient-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 82BC5F368 for ; Tue, 7 May 2013 21:16:14 +0000 (UTC) Received: (qmail 28381 invoked by uid 500); 7 May 2013 21:16:14 -0000 Delivered-To: apmail-hc-httpclient-users-archive@hc.apache.org Received: (qmail 28256 invoked by uid 500); 7 May 2013 21:16:13 -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 28245 invoked by uid 99); 7 May 2013 21:16:13 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 May 2013 21:16:13 +0000 X-ASF-Spam-Status: No, hits=-0.1 required=5.0 tests=HK_RANDOM_ENVFROM,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lbrtchx@gmail.com designates 209.85.223.172 as permitted sender) Received: from [209.85.223.172] (HELO mail-ie0-f172.google.com) (209.85.223.172) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 May 2013 21:16:08 +0000 Received: by mail-ie0-f172.google.com with SMTP id 16so1909261iea.17 for ; Tue, 07 May 2013 14:15:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=bxSre6buiWBcHKcbVBuCzPifj6w7lomjIhZkenvyZWg=; b=e9mAR7haNERB3z6mKYRWou351PeKo1t9NvZoJcBCFOfCCZGskNo6zGJo7a9tk4i6ld 12Bp/KCBWyLx9e6DIRfiefVqiTgwYWivH5Qw4ovycDkQacB7pMoc4H1KZHLsZsLit3FU S31c7ye2OEVG9GDA2oW7iUuicq7qHClyZl0Iv1sdV++HUPFzoDYWDeWF4fF4phY12PDS NmBJnSC1aETY5mAs8lXRcKkdofA0OfLyjvQBHS9zbJiLN/ELuy8Ged0HWxANVtRS8wtE 0QDLpmWqjD/aaO6bqVl41L7ovKUSIXASGHP/5Lv0K7dsAs5YKSL10foniVb0qc/bAqXM SYGQ== MIME-Version: 1.0 X-Received: by 10.50.17.234 with SMTP id r10mr4608792igd.102.1367961348319; Tue, 07 May 2013 14:15:48 -0700 (PDT) Received: by 10.43.90.4 with HTTP; Tue, 7 May 2013 14:15:48 -0700 (PDT) In-Reply-To: References: Date: Tue, 7 May 2013 17:15:48 -0400 Message-ID: Subject: Re: why are so different the response headers as reported by wget and httpclient? From: Albretch Mueller To: HttpClient User Discussion Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org > I'd suggest you not set the Host header manually ... That did it! HC is seamlessly handling redirection, yet I still have 2 questions: 1) even if, since all I need are the headers, for which I "only" need to go: Header[] RspnsHdrs = httpResponse.getAllHeaders(); // __ closing underlying stream (just getting all HTTP headers for this URL's connection) InputStream IS = httpEnt.getContent(); IS.close(); the InputStream is taking like a minute to actually close. Why is that happening? It seems once you go "GET ..." the server does as you tell it and sends the data anyway, which seems to be patiently swallowed by HC, even if the data is not saved to local storage Is there a way to just get the headers and the negotiation without the actual payload? (like the spider option of wget) 2) What is the listener interface you need to implement to replicate with HC what you get from the wire log via commons logging? Thanks, lbrtchx --------------------------------------------------------------------- To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org For additional commands, e-mail: httpclient-users-help@hc.apache.org