You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Eugeny N Dzhurinsky <eu...@jdevelop.com> on 2005/07/27 09:02:55 UTC

abs_path not valid

For some weird reason URL like
http://www.environmental-auditing.org?layout=print

throwing the exception 

abs_path requested

But in browser everything is OK. Is there anything to do with that?

I'm using the HttpClient 3.0 RC3
-- 
Eugene N Dzhurinsky

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


Re: abs_path not valid

Posted by Eugeny N Dzhurinsky <eu...@jdevelop.com>.
On Wed, Jul 27, 2005 at 03:14:31PM +0800, William Cai wrote:
> 
> I am not sure. Just refer to the relevant specifications. However, it should
> work to handle the issue out of httpclient.
> Good luck.

Well, I found this workaround seem to work:

URI uri = new URI(url_string,false);
if ("".equals(uri.getPath()) && uri.getQuery() != null)
    uri.setPath("/");

I would be really happy if something like this will be done inside the
HTTPClient when parsing the URL in Get/Head/PostMethod. Just a thought thus =)

-- 
Eugene N Dzhurinsky

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


Re: abs_path not valid

Posted by Eugeny N Dzhurinsky <eu...@jdevelop.com>.
On Wed, Jul 27, 2005 at 09:23:40AM +0200, Roland Weber wrote:
> Hi Eugeny
> 
> > > I find the URL like http://www.environmental-auditing.org?layout=print 
> is
> > > transferred to http://www.environmental-auditing.org/?layout=print
> > > automatically by IE. 
> > Hmm, so you think the same thing should be done outside the httpclient?
> You can file a bug report about this. RFC 2396, Section 3 does not rule out
> a query part without an absolute path. If you want to make your code work
> without waiting for an update to HttpClient, the version with a / after the
> host name will be understood.

Well, see my previous mail in this thread =)

-- 
Eugene N Dzhurinsky

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


Re: abs_path not valid

Posted by Roland Weber <RO...@de.ibm.com>.
Hi Eugeny

> > I find the URL like http://www.environmental-auditing.org?layout=print 
is
> > transferred to http://www.environmental-auditing.org/?layout=print
> > automatically by IE. 
> 
> Hmm, so you think the same thing should be done outside the httpclient?

You can file a bug report about this. RFC 2396, Section 3 does not rule 
out
a query part without an absolute path. If you want to make your code work
without waiting for an update to HttpClient, the version with a / after 
the
host name will be understood.

cheers,
  Roland


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


RE: abs_path not valid

Posted by William Cai <wc...@xwarelabs.com>.
I am not sure. Just refer to the relevant specifications. However, it should
work to handle the issue out of httpclient.

Good luck.

-William

-----Original Message-----
From: Eugeny N Dzhurinsky [mailto:eugenydzh@jdevelop.com] 
Sent: Wednesday, July 27, 2005 3:10 PM
To: httpclient-user@jakarta.apache.org
Subject: Re: abs_path not valid

On Wed, Jul 27, 2005 at 03:07:58PM +0800, William Cai wrote:
> 
> I find the URL like http://www.environmental-auditing.org?layout=print is
> transferred to http://www.environmental-auditing.org/?layout=print
> automatically by IE. 

Hmm, so you think the same thing should be done outside the httpclient?

-- 
Eugene N Dzhurinsky

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




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


Re: abs_path not valid

Posted by Eugeny N Dzhurinsky <eu...@jdevelop.com>.
On Wed, Jul 27, 2005 at 03:07:58PM +0800, William Cai wrote:
> 
> I find the URL like http://www.environmental-auditing.org?layout=print is
> transferred to http://www.environmental-auditing.org/?layout=print
> automatically by IE. 

Hmm, so you think the same thing should be done outside the httpclient?

-- 
Eugene N Dzhurinsky

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


RE: abs_path not valid

Posted by William Cai <wc...@xwarelabs.com>.
I find the URL like http://www.environmental-auditing.org?layout=print is
transferred to http://www.environmental-auditing.org/?layout=print
automatically by IE. 

-William

-----Original Message-----
From: Eugeny N Dzhurinsky [mailto:eugenydzh@jdevelop.com] 
Sent: Wednesday, July 27, 2005 3:03 PM
To: httpclient-user@jakarta.apache.org
Subject: abs_path not valid

For some weird reason URL like
http://www.environmental-auditing.org?layout=print

throwing the exception 

abs_path requested

But in browser everything is OK. Is there anything to do with that?

I'm using the HttpClient 3.0 RC3
-- 
Eugene N Dzhurinsky

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



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