dragonking
May 6th, 1999, 10:52 PM
Hello everyone,
I am trying to write a CGI in C to run on NT. The CGI is to
handle file upload from client html. The client html is as follow:
<FORM ACTION="http://192.168.0.12/scripts/securein/filetrans.exe" ENCTYPE="multipart/form-data" METHOD="POST">
Attach file <input type="file" name="filename">
<input type=submit value=submit name=submit>
</FORM>
So, on the CGI side, I just write some codes to read in the char stream
from stdin and parse it; the content of the file is in one of the
'content-disposition' section, right?
I tested it and it works with small files; the file content is in 'content-disposition' section.
However, when I try with a file of a few hundred KB, I get the error
"The Internet Explorer cannot open the site http://192..../filetrans.exe
The connection with the server was reset."
I just cannot understand why this happen. I commented all the lines in the
cgi script and have it just print a simple string, it still happens.
Just do not where to fix it! I downloaded a cgi exe from CGI Resource Index
and it never have this problem regardless of file size. However, no source code
is available for my research.
Please tell me what is wrong.
rehards,
shumman
I am trying to write a CGI in C to run on NT. The CGI is to
handle file upload from client html. The client html is as follow:
<FORM ACTION="http://192.168.0.12/scripts/securein/filetrans.exe" ENCTYPE="multipart/form-data" METHOD="POST">
Attach file <input type="file" name="filename">
<input type=submit value=submit name=submit>
</FORM>
So, on the CGI side, I just write some codes to read in the char stream
from stdin and parse it; the content of the file is in one of the
'content-disposition' section, right?
I tested it and it works with small files; the file content is in 'content-disposition' section.
However, when I try with a file of a few hundred KB, I get the error
"The Internet Explorer cannot open the site http://192..../filetrans.exe
The connection with the server was reset."
I just cannot understand why this happen. I commented all the lines in the
cgi script and have it just print a simple string, it still happens.
Just do not where to fix it! I downloaded a cgi exe from CGI Resource Index
and it never have this problem regardless of file size. However, no source code
is available for my research.
Please tell me what is wrong.
rehards,
shumman