[OSM-talk] GPX upload via API

Tom Hughes tom at compton.nu
Thu Aug 23 08:50:07 BST 2007

In message <46CD208D.2000302 at gmx.at>
        Christof Dallermassl <cdaller.hw at gmx.at> wrote:

>> Yep - tags are still restricted though as they are used in URLs.
> as long as they are url-encoded, this should not be any problem. So
> when I url-encode a "?" in the tags/description this should work.

As I believe I explained before, the problem here is not with the
way the URL is handled by the HTTP protocol, which would indeed be
solved by URL encoding, but in the way rails parses URLs.

Basically takes (decoded) URL and splits it on a small set of
characters (including slash) and then tries to match those components
against a route in it's configuration file.

A typical route that uses tags in our configuration looks like:

  map.connect '/traces/tag/:tag', :controller => 'trace', :action => 'list'

If the tag value contains a slash (for example "foo/bar") then, regardless 
of any URL encoding, we wind up trying to match four components against
that route which only has three components and we fail.


Tom Hughes (tom at compton.nu)

More information about the talk mailing list