Re: missing 13; upload script
- Posted by Salix <salix at freemail.hu> Sep 10, 2006
- 498 views
Actually I'm experimenting with HTTP. The upload is started with a multipart/form-data HTML FORM. I tested it with Opera and Abyss webserver. I parse the input but does not replace {13,10} with {10} but it simply skips 13 sometimes. (But not all 13 bytes!) Eg. some sequence parts:
s1[i1..i2]={10,12,20,13,12,11,11} s2[i1..i2]={10,12,20,12,11,11,12}
The way I found this problem was comparing the original and the uploaded JPG byte by byte. I am clueless. Should be something really obvious... Regards, Salix Robert Craig wrote: > > Salix wrote: > > I'm struggling with an upload CGI script. (Again.) > > > > The problem is rather strange... I collect the input with get_bytes(0,i) but > > the returned sequence sometimes misses some 13 bytes from the file part. > > What > > is going on? Any idea? > > Be careful to upload binary files using the BINARY option (not ASCII) > in your FTP program. Otherwise you might have 13 10 (i.e. CR LF) > character combinations converted to just a 10. > > Regards, > Rob Craig > Rapid Deployment Software > <a href="http://www.RapidEuphoria.com">http://www.RapidEuphoria.com</a>