achrefB3 / google-api-java-client

Automatically exported from code.google.com/p/google-api-java-client
0 stars 0 forks source link

GenericUrl path encode/decode methods causing URL errors #233

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
version: 1.4.1-beta on App Engine 1.5.0.1

As an example of this issue, according to Google's documentation to retrieve 
the ACL Feed for a Google Docs List Entry, the link specified requires the 
form: 

https://docs.google.com/feeds/default/private/full/document%3Adocument_id/acl

The %3A is critical as the following url (with %3A replaced by a colon) returns 
a 404 for us:

https://docs.google.com/feeds/default/private/full/document:document_id/acl

That automatic decoding from %3A to : happens within the internals of the 
GenericUrl class. 

As an attempt to work around this, I replaced the "%" with a "%25" with the 
hopes that GoogleUrl would properly escape the "%25" back to a "%" and all 
would be well:  

https://docs.google.com/feeds/default/private/full/document%253Adocument_id/acl

However, this only resulted in the GenericUrl building an unchanged, incorrect 
url:

https://docs.google.com/feeds/default/private/full/document%253Adocument_id/acl

Since the methods that encode and decode within GenericUrl are final/private, 
there does not appear to be a way to properly construct a url to access the 
Google Docs ACL Feed using the class. 

Original issue reported on code.google.com by szieg...@cloudsherpas.com on 14 Jun 2011 at 6:11

GoogleCodeExporter commented 9 years ago
http://code.google.com/p/google-http-java-client/issues/detail?id=26

Original comment by yan...@google.com on 16 Aug 2011 at 3:18