You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by Johannes Koch <jo...@fit.fraunhofer.de> on 2007/11/16 13:14:03 UTC

[HttpClient] Exception not caught in DefaultResponseParser

Hi,

the method hasProtocolVersion in o.a.h.message.BaseLineParser 
(httpcore-alpha6) throws an IndexOutOfBoundsException which is not 
cahught by the parseHead method in the 
o.a.h.impl.conn.DefaultResponseParser. Is this intentional?

This happens e.g. when making a request to http://google.com (Note: no 
'/' at the end). BTW, are applications using HttpClient expected to add 
a '/' if the path component of the URI is null? Or should this be the 
responsibility of HttpClient?

-- 
Johannes Koch
BIKA Web Compliance Center - Fraunhofer FIT
Schloss Birlinghoven, D-53757 Sankt Augustin, Germany
Phone: +49-2241-142628    Fax: +49-2241-142065

---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org


Re: [HttpClient] Exception not caught in DefaultResponseParser

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Fri, 2007-11-16 at 13:14 +0100, Johannes Koch wrote:
> Hi,
> 
> the method hasProtocolVersion in o.a.h.message.BaseLineParser 
> (httpcore-alpha6) throws an IndexOutOfBoundsException which is not 
> cahught by the parseHead method in the 
> o.a.h.impl.conn.DefaultResponseParser. Is this intentional?
> 

No, it is not.

> This happens e.g. when making a request to http://google.com (Note: no 
> '/' at the end). BTW, are applications using HttpClient expected to add 
> a '/' if the path component of the URI is null? Or should this be the 
> responsibility of HttpClient?
> 

HttpClient should be intelligent enough to handle cases like that.
Please open a JIRA for this issue. It is clearly a bug in HttpClient (or
HttpCore).

Oleg  


---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org