You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Stephen Warren <sw...@paramanet.com> on 2004/03/31 00:41:21 UTC

URI escaping in repository URLs

I attempted to do the following:

svn import . "http://localhost/repos/document/System Hardware" -m xxxx

which complained about the URI not being URI-encoded. The following fixed it:

svn import . "http://localhost/repos/document/System%20Hardware" -m xxxx

My question is: Why doesn't the svn client do this for me? I found some bugs discussing this in the issue tracker, but didn't really follow why the client couldn't do this (I can just about see why the internal repository access libraries can't)

Is it not as simple as changing every non A-Za-z0-9 and a few others to %xx encoding? Isn't it still this simple even with international characters - any character not in the previous list is just forcably encoded into UTF-8?

The requirement for the user to do this encoding, especially for simple cases like spaces, is a bit of a pain - it's really exposing internal implementation details (URIs) to the end-user, who probably doesn't care...

--
Stephen Warren, Software Engineer, Parama Networks, San Jose, CA
http://www.wwwdotorg.org/work_contact/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


Re: URI escaping in repository URLs

Posted by "C. Michael Pilato" <cm...@collab.net>.
"Stephen Warren" <sw...@paramanet.com> writes:

> I attempted to do the following:
> 
> svn import . "http://localhost/repos/document/System Hardware" -m xxxx
> 
> which complained about the URI not being URI-encoded. The following fixed it:
> 
> svn import . "http://localhost/repos/document/System%20Hardware" -m xxxx
> 
> My question is: Why doesn't the svn client do this for me? 

Because we don't want to be in the business of deciding whether or not
"url://host/repos/My%25Path" means "url://host/repos/My%25Path" or
"url://host/repos/My%2525Path".  In other words, you cannot look at a
URI-ish thing and say with certainty that it has been URI-encoded
(though you can definitely say it hasn't).  So the right way to deal
with the situation is to say, "Alrighty then, the user must provide to
use a properly encoded URL so there are no misunderstandings."

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org