Обсуждение: [pgsql-www] Two trailing / on ftp symlink

Поиск
Список
Период
Сортировка

[pgsql-www] Two trailing / on ftp symlink

От
Daniel Gustafsson
Дата:
The “latest” symlink on ftp/ contains a trailing slash in the pickle file (I
presume, without having seen it), but the template tacks on a trailing slash as
well making the href "ftp/source/v9.6.2//".  While this leads to the right page,
the “parent directory” link gets confused since it now links to the same page as
"ftp/source/v9.6.2/“.

Rather than changing the template code, the simplest fix seems to be to remove
the trailing slash in the data file?

cheers ./daniel


Re: [pgsql-www] Two trailing / on ftp symlink

От
Daniel Gustafsson
Дата:
> On 01 May 2017, at 13:26, Daniel Gustafsson <daniel@yesql.se> wrote:
>
> The “latest” symlink on ftp/ contains a trailing slash in the pickle file (I
> presume, without having seen it), but the template tacks on a trailing slash as
> well making the href "ftp/source/v9.6.2//".  While this leads to the right page,
> the “parent directory” link gets confused since it now links to the same page as
> "ftp/source/v9.6.2/“.

After having been pointed in the right direction out-of-band, it seems the
issue is that we don’t strip trailing slashes from symlinks, only directory
entries. The attached patch seems to fix it.

cheers ./daniel


-- 
Sent via pgsql-www mailing list (pgsql-www@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-www

Вложения

Re: [pgsql-www] Two trailing / on ftp symlink

От
Magnus Hagander
Дата:


On Tue, May 2, 2017 at 9:12 AM, Daniel Gustafsson <daniel@yesql.se> wrote:
> On 01 May 2017, at 13:26, Daniel Gustafsson <daniel@yesql.se> wrote:
>
> The “latest” symlink on ftp/ contains a trailing slash in the pickle file (I
> presume, without having seen it), but the template tacks on a trailing slash as
> well making the href "ftp/source/v9.6.2//".  While this leads to the right page,
> the “parent directory” link gets confused since it now links to the same page as
> "ftp/source/v9.6.2/“.

After having been pointed in the right direction out-of-band, it seems the
issue is that we don’t strip trailing slashes from symlinks, only directory
entries. The attached patch seems to fix it.

Slightly modified version applied, thanks. 


--