Return-Path: Delivered-To: apmail-jakarta-commons-httpclient-dev-archive@www.apache.org Received: (qmail 24401 invoked from network); 9 May 2004 16:31:07 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 9 May 2004 16:31:07 -0000 Received: (qmail 97601 invoked by uid 500); 9 May 2004 16:30:59 -0000 Delivered-To: apmail-jakarta-commons-httpclient-dev-archive@jakarta.apache.org Received: (qmail 97575 invoked by uid 500); 9 May 2004 16:30:59 -0000 Mailing-List: contact commons-httpclient-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Commons HttpClient Project" Reply-To: "Commons HttpClient Project" Delivered-To: mailing list commons-httpclient-dev@jakarta.apache.org Received: (qmail 97558 invoked from network); 9 May 2004 16:30:58 -0000 Received: from unknown (HELO mail2.bluewin.ch) (195.186.4.73) by daedalus.apache.org with SMTP; 9 May 2004 16:30:58 -0000 Received: from [192.168.0.2] (81.63.89.111) by mail2.bluewin.ch (Bluewin AG 7.0.027) id 40559C20009404B9 for commons-httpclient-dev@jakarta.apache.org; Sun, 9 May 2004 16:31:01 +0000 Subject: Re: Problems with HttpClient From: Oleg Kalnichevski Reply-To: olegk@apache.org To: Commons HttpClient Project In-Reply-To: References: Content-Type: text/plain Message-Id: <1084120260.20342.16.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 (1.4.5-7) Date: Sun, 09 May 2004 18:31:00 +0200 Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Anoop, My guess is that some of the methods simply timeout while reading the response from the server. Unfortunately, HttpClient does not handle this situation well. Do not use HttpMethodBase#getResponseBody or HttpMethodBase#getResponseBodyAsString methods. They are plain broken. Both methods are made to ignore I/O errors and return null instead of propagating IOException-s to the caller. Whoever designed those methods did HttpClient a bad service. Use getResponseBodyAsStream and do the reading from the input stream as you see fit Cheers, Oleg On Fri, 2004-05-07 at 17:01, Anoop Adya wrote: > Hi > We have developed a client solution with the help of HttpClient. > During the trial run we noticed that it works smoothly for clients and > server within the same domain. However, if i try to use HttpClient over > multiple domains, I get a NullPointerException as getResponseBody returns > null. > Do we need to do something special to handle cross domain requests? > Note however that the user is in the same domain as the server we try to > access. > > Any pointers would be greatly appreciated. > > regards, Anoop. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org > For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org