[Helma-user] Bug in Http.js of Helma?

Hannes Wallnoefer hannes at helma.at
Tue Apr 22 12:49:20 CEST 2008


Thanks, Anton. I committed your patch to svn trunk.

hannes

2008/4/21 Anton Pirker <helma at gmiatlich.net>:
> Hello!
>
>  A friend of mine (a brand new Helma developer!) just tried to read an
> RSS-Feed with Helma and discovered that if there is a ; in the
> charset-string an error is thrown.
>
>  We found the problem in Http.js in modules/helma.
>  The Charset-String is parsed from the result of the helma.Http() result. I
> have attached a little fix.
>
>  Could someone of the commiters please check this and maybe commit it?
>
>  Cheers,
>  Anton
>
>  --
>  DI(FH) Anton Pirker, Helma Freelancer
>
>
> Index: Http.js
>  ===================================================================
>  --- Http.js     (revision 8795)
>  +++ Http.js     (working copy)
>  @@ -577,7 +577,7 @@
>
>          if (result.type && result.type.indexOf("charset=") != -1) {
>             var charset =
> result.type.substring(result.type.indexOf("charset=") + 8);
>  -           charset = charset.replace('"', ' ').trim();
>  +           charset = charset.replace(/[;"]/g, '');
>             result.charset = charset;
>          }
>
>
> _______________________________________________
>  Helma-user mailing list
>  Helma-user at helma.org
>  http://helma.org/mailman/listinfo/helma-user
>
>


More information about the Helma-user mailing list