Been looking for it, but I'm trying to find where the Restlet framework does 
any URL decoding at all ... my apps get a lot of special characters in URIs, 
and we have to decode them explicitly with URLDecoder.decode(...) or 
Reference.decode(...) which wraps it. Restlet's Reference class is pretty 
adamant about not doing any transparent decoding of entities. 
java.net.URLDecoder.decode(...) should support both upper and lowercase hex in 
all compliant JREs. 

Can you say any more about the application? I'd suspect something below the 
Router level. Is it using Restlet-supplied Directory etc. to find some sort of 
static files, or is there custom code for Finders and Resources (or generic 
Restlets doing the same functions). 

----- Original Message ----- 
From: "Paul Kaiser" <[EMAIL PROTECTED]> 
To: "Discuss Restlets" <[email protected]> 
Sent: Tuesday, September 4, 2007 10:10:03 PM (GMT-0500) America/New_York 
Subject: Routing and URL decoding 

I have a "special" situation in an application that allows "/" characters in 
usernames. If I define a URI that include a username as a path element, the 
Router gets confused when presented with a URI with an encoded "/" (%2f); 
something like http://localhost:8182/users/foo%2fbar/orders. Changing it to 
http://localhost:8182/users/foo%2Fbar/orders works, however. 

Is there a reason for the case sensitivity? RFC 1738 suggests that lowercase 
hexadecimal be accepted also. 

I happened on this behavior when typing URIs into a browser. I'm going to look 
at a possible work-around if I need it; probably a custom filter placed ahead 
of the router. If there is a better approach, please let me know. 

Thanks, 
Paul 





____________________________________________________________________________________
 
Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for 
today's economy) at Yahoo! Games. 
http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow 

Reply via email to