[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] CGI Script wwwcount2.5
- Subject: Re: [cobalt-users] CGI Script wwwcount2.5
- From: flash22@xxxxxxx
- Date: Sun Feb 25 16:13:56 2001
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
On Sun, 25 Feb 2001, Carrie Bartkowiak wrote:
> > Subject: Re: [cobalt-users] CGI Script wwwcount2.5
> > Always upload files in _binary_ mode, not ASCII.
>
> > Thank you, transferring in binary did the trick
>
> HUH???
> Oh I am *so* confused now. CGI is supposed to be uploaded in ASCII...
> Unless he had a tarred/zipped file that he uploaded to the server, and
> wasn't uploading file by file...
>
> I know I haven't been to sleep in over 36hours but this makes *no* sense to
> me.
> If you upload a CGI script in binary it will wrap lines, put nasty new-line
> blocks on the end of everything, and generally break the script...
>
> What am I missing?
It really has *nothing* to do with it being 'cgi' , *text* files should be
uploaded in 'text' mode, data files and machine programs have to be
uploaded in 'binary' mode, cgi's that are perl scripts are in fact 'text'
, thus the often given advice to upload in text mode, but some cgi's are
in fact compiled programs and thus are binary data, trying to convert
cr/lf just corrupts them.
I'd also note that text mode is *never* the right mde when transferring
from machine to machine where both machines are the same type, since text
format is the same on both machines, in addition, if you download a text
file from a machine in binary , you can upload it to the same type of
machine in binary and it will come out right...confused yet? ;0
Incidently, binary mode does not wrap lines or modify the file in any way,
it does an image transfer, the file is uploaded with no changes
whatsoever, the purpose of 'text' mode is iun fact to modify the file to
deal with the fact different machines have different characters to end a
line of text, that's all it does...
eg 'end of line' is:
line feed on unix
carrage return+newline on pc's
carrage-return on macs
ps: there are modes in addition to ascii and binary, fortunatly the
machines that require them are mostly obsolete, cept an occasional stray
vaxen ;0
gsh