The first thing (file sizes changing) seems to be due to the MIME content
separator that has been chosen by the browser being of different lengths on
different runs. The POST content is divided up by these separators and so if
the separator length changes by one character, the content length changes by
3 characters (in this case). In this example the separator is
"-----------------------------61761395515514"

Content-length:  572
-----------------------------61761395515514
Content-Disposition: form-data; name="file_name";
filename="C:\TEMP\jabberfr.txt"
Content-Type: text/plain

Il brilgue: les toves libricilleux
        Se gyrent et frillant dans le guave,
Enmimes sont les gougebosquex,
        Et le momerade horgrave.
                -- Lewis Carrol, "Through the Looking Glass"

-----------------------------61761395515514
Content-Disposition: form-data; name="Submit"

 Submit 
-----------------------------61761395515514--



> -----Original Message-----
> From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, December 07, 1999 11:48 AM
> To:   [EMAIL PROTECTED]
> Subject:      [REBOL] CGI File uploading Re:
> 
> As a followup to my own post, I tried the test code in Internet Explorer
> (I was using Navigator before), and got slightly more consistent results.
> The file sizes flipped back and forth by 3 bytes. When I saved each
> version, one was three bytes larger than the other (but both were 26 bytes
> larger than the content-length given). 
> 
> Also, the beginning of the file is consistently repeated at the end of the
> block, as if the series wrapped over form the tail to the head to fulfill
> the write request. This happens even when I try to count the bytes and
> only write the exact content-length as given by system/options/CGI. Could
> the content-length be off?
> 
> *********** REPLY SEPARATOR  ***********
> 
> On 12/6/1999 at 6:43 PM [EMAIL PROTECTED] wrote:
> 
> I'm working on a script to upload a file using the "file" type in late
> model browsers. I started with the general example in the How-To Guide
> ("CGI Post Method") but found that the content-length seems to vary
> between calls. First it tells me the content is 6229 bytes long, then I
> repeat the same call and the content is 6291 bytes, then 6299, 6303, et
> al. 
> 
> <snip>
> 
> 
> 
> 
> 

Reply via email to