Return-Path: Delivered-To: apmail-jakarta-httpclient-user-archive@www.apache.org Received: (qmail 67470 invoked from network); 22 Jul 2005 06:33:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 22 Jul 2005 06:33:09 -0000 Received: (qmail 95375 invoked by uid 500); 22 Jul 2005 06:33:09 -0000 Delivered-To: apmail-jakarta-httpclient-user-archive@jakarta.apache.org Received: (qmail 95260 invoked by uid 500); 22 Jul 2005 06:33:08 -0000 Mailing-List: contact httpclient-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: "HttpClient User Discussion" Reply-To: "HttpClient User Discussion" Delivered-To: mailing list httpclient-user@jakarta.apache.org Received: (qmail 95247 invoked by uid 99); 22 Jul 2005 06:33:08 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Jul 2005 23:33:08 -0700 X-ASF-Spam-Status: No, hits=0.8 required=10.0 tests=DNS_FROM_RFC_ABUSE,SPF_HELO_FAIL,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of ROLWEBER@de.ibm.com designates 195.212.29.151 as permitted sender) Received: from [195.212.29.151] (HELO mtagate2.de.ibm.com) (195.212.29.151) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Jul 2005 23:33:03 -0700 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate2.de.ibm.com (8.12.10/8.12.10) with ESMTP id j6M6X58j162140 for ; Fri, 22 Jul 2005 06:33:05 GMT Received: from d12av04.megacenter.de.ibm.com (d12av04.megacenter.de.ibm.com [9.149.165.229]) by d12nrmr1607.megacenter.de.ibm.com (8.12.10/NCO/VERS6.7) with ESMTP id j6M6X5O1172224 for ; Fri, 22 Jul 2005 08:33:05 +0200 Received: from d12av04.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av04.megacenter.de.ibm.com (8.12.11/8.13.3) with ESMTP id j6M6X5Ln030796 for ; Fri, 22 Jul 2005 08:33:05 +0200 Received: from d12ml067.megacenter.de.ibm.com (d12ml067.megacenter.de.ibm.com [9.149.164.162]) by d12av04.megacenter.de.ibm.com (8.12.11/8.12.11) with ESMTP id j6M6X5oa030792 for ; Fri, 22 Jul 2005 08:33:05 +0200 In-Reply-To: <9a8e432805072123227f99ac55@mail.gmail.com> To: "HttpClient User Discussion" MIME-Version: 1.0 Subject: Re: Problems displaying a PNG graphics file X-Mailer: Lotus Notes Release 6.5.4 March 27, 2005 From: Roland Weber X-MIMETrack: S/MIME Sign by Notes Client on Roland Weber/Germany/IBM(Release 6.5.4|March 27, 2005) at 22.07.2005 08:32:55, Serialize by Notes Client on Roland Weber/Germany/IBM(Release 6.5.4|March 27, 2005) at 22.07.2005 08:32:55, Serialize complete at 22.07.2005 08:32:55, S/MIME Sign failed at 22.07.2005 08:32:55: The cryptographic key was not found, Serialize by Router on D12ML067/12/M/IBM(Release 6.53HF247 | January 6, 2005) at 22/07/2005 08:33:04, Serialize complete at 22/07/2005 08:33:04 Message-ID: Date: Fri, 22 Jul 2005 08:33:03 +0200 Content-Type: text/plain; charset="US-ASCII" X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hello Manohar, > request my packet sniffer seems to always record a "Content-Length :0" being > sent over the network!! That is indeed a problem. You did not forget to add some data to your request? That would be the most simple explanation. > Therefore I was wondering if there was a way of > manually > setting the Content-Length after calculation. I shall try disabling the > expect-continue handshake + passing in a HttpState object. > How come the Content-Length is not getting calculated automatically when i " > POST.execute_method" ? There are situations when the length of the request body can not be determined at all, for example if the data is provided as a stream. The preferred method for HTTP/1.1 is to use chunked encoding instead of a content-length header. If that is not possible or disabled, then HttpClient will get the content length from the request entity and add the content-length header. Since you are seeing a content-length header, it looks as if HttpClient did not decide to use the chunked encoding. And since the value of the content-length header is 0, it looks as if your PostMethod was not given anything to post. hope that helps, Roland --------------------------------------------------------------------- To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: httpclient-user-help@jakarta.apache.org