[perl.apache.org keeps on timing out once in a while :( reposting]

Tom Schindl wrote:
> Problems with Apache::compat
>
> CGI-PARAM-STRING: header=%DC%DC%DC%DC&body=%D6%D6%D6%D6&type=save_thread
>
> ------------------------cut--------------------------------------
> [Sun Dec 08 21:39:09 2002] [error] [client 127.0.0.1] Character in "c"
> format wrapped at
> /usr/bestsolution/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/Apache2/Apache/compat.pm line 217.
> , referer: http://localhost/discussion-board
> ------------------------cut--------------------------------------
>
> When I copy the lines of interest into a small perl program and execute
> it, everything works perfectly. What's going wrong there?
>
> ------------------------cut--------------------------------------
> map { s/%([0-9a-fA-F]{2})/pack("c",hex($1))/ge; $_; } split /[=&;]/,
> $string, -1
> ------------------------cut--------------------------------------

Doug has fixed this already in the cvs version of mod_perl. Ditto for the
s/+/ / transform:

revision 1.71
date: 2002/11/23 22:35:06; author: dougm; state: Exp; lines: +2 -0
PR:
Obtained from:
Submitted by: Walery Studennikov <[EMAIL PROTECTED]>
Reviewed by: dougm
tr/+/ /; in parse_args compat method
----------------------------
revision 1.70
date: 2002/10/21 20:21:34; author: dougm; state: Exp; lines: +1 -1
PR:
Obtained from:
Submitted by: Walery Studennikov <[EMAIL PROTECTED]>
Reviewed by: dougm
fix parse_args compat method to support non-ascii characters

The problem was that the buggy code was doing pack("c", $num) which expects a
number in range -128..127, whereas a fixed version does pack("C", $num), which works with 0..255.




_____________________________________________________________________
Stas Bekman JAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide http://perl.apache.org/guide
mailto:[EMAIL PROTECTED] http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/


Reply via email to