Re: NT IIS Upload problem

by "Kevin Haidl" <kevinh(at)actofmind.com>

 Date:  Mon, 6 Mar 2000 00:44:33 -0800
 To:  "Languages" <hwg-languages(at)hwg.org>
  todo: View Thread, Original
[sigh] . . . always trust the docs Kevin.

I think I answered my own question:  Perl built-in function "binmode
FILEHANDLE" is specifically designed to deal with this (complete with thinly
veiled anti-ms rhetoric).  Unless somebody knows different, I answered my
own question.

Unfortunately the client has muddied the file permissions so I can't test
till tomorrow.

Kevin Haidl
Act of Mind Communications
Web Assessment, Site Design, Site Production and Site Promotion
kevinh(at)actofmind.com     http://www.actofmind.com     (604) 734-5098

----- Original Message -----
From: "Kevin Haidl" <kevinh(at)actofmind.com>
To: "Languages" <hwg-languages(at)hwg.org>
Sent: March 6, 2000 12:13 AM
Subject: NT IIS Upload problem


> We're using a Web form to upload jpgs to a Perl script on a IIS NT server.
> The data arrives, but as DOS text, i.e., with extraneous ^M characters at
> the end of each line instead of the nice binary we need.
>
> Yes the encryption type is "mulitpart/form-data".
>
> The script works properly when tested on Apache on Linux.
>
> Anybody have any idea what's causing the DOS-text?
>
> Failing a fix for the ultimate cause, does anybody have
> any ideas as to how to cleanse it of ^Ms?
>
> The relevant portion of my script:
>
> open(OUTFILE, ">$loc") or die "Couldn't open $loc; $!";
> while ($bytesRead = read($fh,$buffer,1024)){
>     print OUTFILE $buffer or die " Couldn't print to $loc; $!";
>     $totalBytes += $bytesRead;
> }
> close OUTFILE or die " Couldn't close $loc; $!";
>
> Kevin Haidl
> Act of Mind Communications
> Web Assessment, Site Design, Site Production and Site Promotion
> kevinh(at)actofmind.com     http://www.actofmind.com     (604) 734-5098
>
>

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA