abdera-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James M Snell <jasn...@gmail.com>
Subject Re: A problem about URL parsing
Date Fri, 03 Aug 2007 06:30:44 GMT
The reasoning behind the error is that the characters [ and ] are
gen-delims and are not legal within IRI segments.  See section 2.2 of
RFC 3987 for more detail.  Those characters need to be percent-encoded.
 A quick test of firefox shows that the browser is, in fact,
percent-encoding those characters when it sends the request over the
wire.  e.g., I typed "http://www.snellspace.com/public/[test]" but it is
sent as http://www.snellspace.com/public/%5Btest%5D.

- James


Zi Xuan Zhang wrote:
> Hi,
> 
> I am encoutering an exception when executing http request
> (get/post/put/delete) when the URL includes '[' and ']'
> 
> org.apache.abdera.protocol.client.ClientException:
> java.lang.IllegalArgumentException: Invalid uri
> 'http://localhost/dm/atom/library/[@PzzxLibrary/@RMain.nsf]/feed':
> escaped absolute path not valid
> at
> org.apache.abdera.protocol.client.CommonsClient.execute(CommonsClient.java:158)
> at org.apache.abdera.protocol.client.Client.post(Client.java:140)
> 
> I think this should be an valid URL, since I can get the correct
> response from browser. Can you provide some information about this
> exception? Thanks a lot!
> 
> Best regards,
> 
> ___________________________________________________________
> *
> Zixuan Zhang(张子轩),*
> 
> IBM Lotus Qucikr API Automation, CSDL,
> zhangzix@cn.ibm.com,
> 86-10-62782244 ext.4648,
> 2/F, Deshi Building, No. 9, East Road, ShangDi, Beijing 100085, P.R.China.
> 
> <http://www.ibm.com/lotus/quickr>
> 

Mime
View raw message