On Tue, May 27, 2014 at 03:46:30PM -0400, Richard Hipp wrote:
> On Tue, May 27, 2014 at 3:43 PM, Warren Young <[email protected]> wrote:

Hi there,

> > I had a file called README-Visual-C++.txt in one of my repositories and
> > wanted to link to the tip version of it from an outside web page.  I
> > discovered the "doc URL" feature in Fossil, but it didn't work with that
> > file.  Apparently there's some kind of data sanitization going on here that
> > turns the +'s into spaces.

> I think that's an HTTP thing.  In a URL, spaces are encoded as "+".  So
> fossil is doing the right thing in converting "+" characters in the URL
> into spaces.

Strictly, space is only encoded as "+" in the QUERY_STRING part of a URL.

So fossil is incorrect to convert + to space if it is before the first
? in the URL.

It's an edge case, but it turns out that someone has hit it.

> If the filename really does contain "+" symbols, then the URL should have
> "%2b" for each plus.  ex:
> http://localhost/doc/trunk/README-Visual-C%2b%2b.txt

That's a valid encoding, but not a required one (outside of fossil).

You could also validly encode the C as %43 and the . as %2e or %2E,
and everything should continue to work. (But that usually isn't done.)

The no-code-change answer is just to document that fossil requires that +
be encoded as %2b everywhere in a URL, but that's probably not a great
long-term option.

        f
-- 
Francis Daly        [email protected]
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to