www-infrastructure-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (INFRA-7153) mirrors.cgi doesn't ignore all HTML comments
Date Thu, 17 Sep 2015 21:18:04 GMT

    [ https://issues.apache.org/jira/browse/INFRA-7153?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14804521#comment-14804521
] 

Sebb commented on INFRA-7153:
-----------------------------

Note that the Lua script does not handle HTML comments either. It probably should be fixed
at some point.

However the page in question no longer uses the construct which caused the problem (i.e. the
embedded [if ...] text).

As far as I can tell the page is rendering OK, but that is not because of the change to Lua,
it's because the source changed.

> mirrors.cgi doesn't ignore all HTML comments
> --------------------------------------------
>
>                 Key: INFRA-7153
>                 URL: https://issues.apache.org/jira/browse/INFRA-7153
>             Project: Infrastructure
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>            Reporter: Kanak Biscuitwala
>
> We use the following setup for the Apache Helix website:
> 1. Source files are mirrored to http://helix.incubator.apache.org from https://svn.apache.org/repos/asf/incubator/helix/site-content
> 2. The source HTML files may include comments, specifically our download page https://svn.apache.org/repos/asf/incubator/helix/site-content/download.html
contains the following due to the tool we use to generate the pages:
> <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
> <!--[if lt IE 9]>
>     <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
> <![endif]-->
> 3. Our .htaccess contains the following line:
> Redirect /download.html /download.cgi
> 4. Our download.cgi contains the following line:
> exec /www/www.apache.org/dyn/mirrors/mirrors.cgi $*
> 5. When visiting download.html (http://helix.incubator.apache.org/download.html), we
get a Python traceback:
> Traceback (most recent call last):
>   File "/www/www.apache.org/dyn/mirrors/mirrors.cgi", line 143, in mirrorwrap
>     return mirrorsapp(environ, start_response)
>   File "/www/www.apache.org/dyn/mirrors/mirrors.cgi", line 251, in mirrorsapp
>     template.generate(output, data)
>   File "/www/www.apache.org/dyn/mirrors/ezt.py", line 141, in generate
>     self._execute(self.program, fp, ctx)
>   File "/www/www.apache.org/dyn/mirrors/ezt.py", line 301, in _execute
>     method(method_args, fp, ctx, filename, line_number)
>   File "/www/www.apache.org/dyn/mirrors/ezt.py", line 321, in _cmd_subst
>     fmt = _get_value(valref, ctx, filename, line_number)
>   File "/www/www.apache.org/dyn/mirrors/ezt.py", line 486, in _get_value
>     raise UnknownReference(refname, filename, line_number)
> UnknownReference: if in file /x1/www/helix.apache.org/download.html at line 30
> 6. Manually removing the commented lines I noted above fixes the issue.
> The mirror script should ignore all commented HTML when it's trying to generate the webpage,
right?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message