- 论坛徽章:
- 1
|
这个应该算是微软的IE的JS bug吧!
google的事實上是HTTP送出去的時候,經過IE,mozilla轉碼後看到的的東西...因為他是用GET method送的...form裡面的method是GET..
所以其實不是他轉碼的..是IE轉碼後送出去的...
這段代碼你run一下就曉得了...其實你不需要做編碼的動作啦..
- #!/usr/bin/perl
- ## Split the parameter of CGI
- sub SplitParam {
- if ($ENV{'REQUEST_METHOD'} eq 'POST')
- {
- read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
- }
- else
- {
- $buffer=$ENV{'QUERY_STRING'};
- }
- @pairs = split(/&/, $buffer);
- foreach $pair (@pairs)
- {
- ($name, $value) = split(/=/, $pair);
- $value =~ tr/+/ /;
- $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
- $value =~ s/~!/ ~!/g;
- if($FORM{$name} eq ""){
- $FORM{$name} =$value;
- }else{
- if($FORM{$name} !~ /$value/){
- $FORM{$name} .= ",".$value;
- }
- }
- }
- }
- $input_t = $FORM{input_t};
- print "Content-type: text/html\n\n";
- print <<TTT;
- <html>;
- <head>;<title>;TTTT</title>;
- </head>;
- <body>;
- inpu_t is $input_t
-
- <form name=form1 method="GET" action="./tt2.pl">;
- <input type="text" name="input_t" value="">;
- <input type="submit" name="btnsubmit" value="送出">;
- </form>;
- </body>;
- </html>;
- TTT
复制代码 |
|