Return-Path: Delivered-To: apmail-hc-httpclient-users-archive@www.apache.org Received: (qmail 87801 invoked from network); 29 Feb 2008 14:37:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 Feb 2008 14:37:06 -0000 Received: (qmail 54111 invoked by uid 500); 29 Feb 2008 14:37:00 -0000 Delivered-To: apmail-hc-httpclient-users-archive@hc.apache.org Received: (qmail 54044 invoked by uid 500); 29 Feb 2008 14:37:00 -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 54035 invoked by uid 99); 29 Feb 2008 14:37:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Feb 2008 06:37:00 -0800 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG 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; Fri, 29 Feb 2008 14:36:25 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1JV6Li-0002j2-8v for httpclient-users@hc.apache.org; Fri, 29 Feb 2008 06:36:34 -0800 Message-ID: <15759846.post@talk.nabble.com> Date: Fri, 29 Feb 2008 06:36:34 -0800 (PST) From: ripok To: httpclient-users@hc.apache.org Subject: Whole HTTP response as InputStream? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: rkopisto@gmail.com X-Virus-Checked: Checked by ClamAV on apache.org I have a little problemo: I'm making HTTP request to a server that gives me back a kind of mime message in the response, so the content-type of the HTTP response will be "Content-Type: multipart/related;boundary='xxxx'". When I'm parsing that mime message (I use mime4j), the parser needs that content type declaration because there is the boundary definition and it is part of the message. However if I just get the response body from HttpMethod, that content-type declaration is not within it because it's in the HTTP response headers. One way I can handle this is to get the response body as string (or byte array) and add that content-type response header to the first line of the body before giving it to mime parser. However I don't like this because I want to handle the response as an InputStream to prevent storing the whole response in memory before handling (the response can be quite big). So is there a way to get the whole HTTP response as an InputStream, so that there are the response headers with it. Or can I somehow insert that content type header to to beginning of response body InputStream? I'm using HttpClient version 3.1. -ripok- -- View this message in context: http://www.nabble.com/Whole-HTTP-response-as-InputStream--tp15759846p15759846.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