Bug 74812 - rpm2html should avoid repeating the slashes.
rpm2html should avoid repeating the slashes.
Status: CLOSED WONTFIX
Product: Red Hat Linux
Classification: Retired
Component: rpm2html (Show other bugs)
8.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Daniel Veillard
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-10-01 17:04 EDT by Aleksey Nogin
Modified: 2007-04-18 12:46 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-08-30 13:07:29 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Aleksey Nogin 2002-10-01 17:04:56 EDT
rpm2html is certain cases crates relative links that contain double-slash. In
some cases thios is annoying and in some cases it makes things not work.

Scenario:

- use "url=/" in your rpm2htmlrc

Result: almost all the links are written as
href="//...". Mozilla gets really unhappy, for it "//a/b..." = "http://a/b...",
while waht we really wanted was an "http://same_host/a/b". Some links will be
wirtten with even 3 slashes (for example, the links to individual packages in
"ByDate").

Workaround:

- use "url=" (e.g.empty) in your rpm2htmlrc

Pretty counterintuitive, but seems to work.

rpm2html whould either complain, or work correctly when "url" (and other similar
variables) ends with a slash.
Comment 1 Daniel Veillard 2002-11-07 11:49:58 EST
the pages generated are not supposed to be loaded directly.
In that case use href="file:///"
I take patches, the // problem seems to only be a real one
if you use it as the start of the URL and the right way to 
build such URLs is to use file:/// (see RFC 2396 and Co.),
but if you really think it's a problem well point me at the
set of places where you think it should be fixed.

Daniel
Comment 2 Aleksey Nogin 2002-11-07 17:05:23 EST
> the pages generated are not supposed to be loaded directly.

Where did I say anything about loading directly??? The real URL is
"http://rpm.nogin.org/", and it is generated correctly using the line
url=
in the config file. But when I tried using
url=/
it did not work (see original report).

> if you really think it's a problem well point me at the
> set of places where you think it should be fixed

Whatever parses the config file should drop check whether the "url" variable
both starts and end with a '/'. If so, the '/' at the end should be dropped.

> the // problem seems to only be a real one
> if you use it as the start of the URL

It's a big problem with "url=/". It's a smaller problem with "url=/.../" - there
everything would work, but since some links would have double slashes in them
and some would be correct, you would have issues with things like "visited"
status of the URLs, etc.
Comment 3 Daniel Veillard 2004-08-30 13:07:29 EDT
rpm2html is not part of the distro for quite some time, this won't get
fixed.

Daniel

Note You need to log in before you can comment on or make changes to this bug.