Bug 74812

Summary: rpm2html should avoid repeating the slashes.
Product: [Retired] Red Hat Linux Reporter: Aleksey Nogin <aleksey>
Component: rpm2htmlAssignee: Daniel Veillard <veillard>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-08-30 17:07:29 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Aleksey Nogin 2002-10-01 21:04:56 UTC
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 16:49:58 UTC
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 22:05:23 UTC
> 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 17:07:29 UTC
rpm2html is not part of the distro for quite some time, this won't get
fixed.

Daniel