[libvirt] [PATCH 1/3] docs: fix 404 page when fetched from different location
Eric Blake
eblake at redhat.com
Thu Aug 9 14:25:00 UTC 2012
On 08/09/2012 08:17 AM, Martin Kletzander wrote:
> Error 404 page had relative paths specified for both the image and
> stylesheets which caused a problem when requested URL included a
> subfolder (e.g. http://libvirt.org/asdf/asdf ). This patch corrects
> this behaviour by modifying href_base to '/' and changing the src of
> the image.
> ---
> docs/404.html.in | 2 +-
> docs/site.xsl | 11 ++++++++++-
> 2 files changed, 11 insertions(+), 2 deletions(-)
I'm no xsl expert, but
> - <xsl:variable name="href_base" select="''"/>
> + <xsl:variable name="href_base">
> + <xsl:choose>
> + <xsl:when test="$pagename = '404.html'">
> + <xsl:value-of select="'/'"/>
> + </xsl:when>
> + <xsl:otherwise>
> + <xsl:value-of select="''"/>
> + </xsl:otherwise>
> + </xsl:choose>
> + </xsl:variable>
this reads pretty straightforward, so I'm okay giving:
ACK.
--
Eric Blake eblake at redhat.com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120809/aa1b9a18/attachment-0001.sig>
More information about the libvir-list
mailing list