Article delegate-en/1201 of [1-5169] on the server localhost:119
  upper oldest olders older1 this newer1 newers latest
search
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]

Newsgroups: mail-lists.delegate-en

[DeleGate-En] Multipart Form
15 Jun 2001 15:40:35 GMT pwecabdyi-aipdtqyecffr.ml@ml.delegate.org


Hello,
I am running a perl script as a FTOCL CFI filter.  The problem is, since I
have implemented it, my multipart/form-data ENCTYPE forms no longer work.
What would be a good work arond for this?  Everything else seems to work
perfect.  Just the forms that allow HTTP uploads do not.  Thoughts?


jf.cfi file:
#!cfi
Content-Type: text/html
Filter: /usr/scripts/jf.pl

jf.pl file:
#!/usr/bin/perl
$wamserver="http://wam.jwt.com:8888";
$server="";
$found = 0;
$p=0;
while(<STDIN>){
  $line=$_;
  @lines[$p]=$line;

  if($found==0){
    $w = index($line,"/-_-");

    if(($found==0) && ($w > -1)) {
      $s1=substr($line,$w,$line-1);
      $found=1;
      @s2=split(/\//,$s1);
      $mailserver=@s2[3];
      }
    }

  $p++;
}
$mailserver1="-_-http://$mailserver";

for($u=0;$u<@lines;$u++){

  $y = index(@lines[$u],"PARAM");
  $z1 = index(@lines[$u],"GIF?");
  $z2 = index(@lines[$u],"gif?");
  $z3 = index(@lines[$u],"Action('/");
  $z4 = index(@lines[$u],"Path_Info");
  $c = index(@lines[$u],"CODEBASE=");


  if(($y>-1)&&(($z1>-1)||($z2>-1))){
    @lines[$u]=~s/\/mail\//\/$mailserver1\/mail\//;
    }

  if($z3>-1){
    @lines[$u]=~s/Action\(\'\//Action\(\'\/\/$mailserver1\//;
    }

  if($z4>-1){
    @lines[$u]=~s/VALUE=\"/VALUE=\"\/$mailserver1/;
    }

  if ($c > -1){
    @lines[$u]=~s/CODEBASE=\"/CODEBASE=\"$wamserver/;
    }

  print @lines[$u];
}
------------------------------------
This transmission is confidential and
intended solely for the person or
organization to whom it is addressed.
It may contain privileged and
confidential information.  If you are
not the intended recipient, you
should not copy, distribute or take
any action in reliance on it.

If you believe you received this
transmission in error, please
notify the sender.
------------------------------------


  admin search upper oldest olders older1 this newer1 newers latest
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
@_@V