Subject: | rt.cpan.org #35933 -- patch |
Date: | Sun, 08 Sep 2013 06:22:24 -0400 |
To: | bug-CGI-SSI [...] rt.cpan.org |
From: | insaner <cpan_bugs_NOSPAMPLEASE [...] insaner.com> |
Hi JAMES and colin.fine (and whoever else will read this),
I just installed CGI::SSI and immediately ran into bug request #35933 "'echo' doesn't support the 'encoding' parameter" (dated 2008??) where having the encoding set in the echo directive does causes the echo to not print anything.
so I decided to poke around the code and see if I could fix it. After trying a couple simple things, I found a (sort of) workaround. If you move the "encoding" bit to after the "var" bit, it prints the var's value fine, in other words, if you change this:
<!--#echo encoding="none" var="extra_header_tags" -->
to this:
<!--#echo var="extra_header_tags" encoding="none" -->
it seems to do the trick. But, apparently it breaks normal apache ssi directives.. strange (a bug for that needs to be filed I guess). Some more poking, and I wrote up a bit of code that fixes it for me. I have attached a patch. Hopefully one of you can turn this into 0.93 if everything is in order. I tried my best to keep to the module's programming indentation etc, hope that's ok too.
--
-insaner
http://www.insaner.com
I just installed CGI::SSI and immediately ran into bug request #35933 "'echo' doesn't support the 'encoding' parameter" (dated 2008??) where having the encoding set in the echo directive does causes the echo to not print anything.
so I decided to poke around the code and see if I could fix it. After trying a couple simple things, I found a (sort of) workaround. If you move the "encoding" bit to after the "var" bit, it prints the var's value fine, in other words, if you change this:
<!--#echo encoding="none" var="extra_header_tags" -->
to this:
<!--#echo var="extra_header_tags" encoding="none" -->
it seems to do the trick. But, apparently it breaks normal apache ssi directives.. strange (a bug for that needs to be filed I guess). Some more poking, and I wrote up a bit of code that fixes it for me. I have attached a patch. Hopefully one of you can turn this into 0.93 if everything is in order. I tried my best to keep to the module's programming indentation etc, hope that's ok too.
--
-insaner
http://www.insaner.com
Message body is not shown because sender requested not to inline it.