CGI upload files

C language to write the CGI upload files, when HTTP submit data to the CGI through the post, CGI checks the file type, if not the correct type of file, return an error, if it is, return the correct prompt.
Question: when CGI has finished processing, also returns the correct judgment, but IE (window xp IE 6. 0) was suggested to upload files, in fact this time CGI has output to judge, I think IE gave it to omit. When IE progress bar tip after, error page (page not found), the fact that CGI had output.
This kind of problem, who met?

<input type="file">

Started by Eleanor at November 13, 2016 - 7:35 PM

How do you handle?

Posted by Augustine at November 21, 2016 - 7:46 PM

CGI save post files to the standard output to client, stdout page, if the file type is not correct, also the standard output stdout error pages to client

Posted by Eleanor at December 06, 2016 - 8:05 PM

Less clear is how you STDOUT pages will be passed to the Client now.

In the end of the CGI, with similar to the following code generates a new HTML to display the results you need.

print <<END
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    ......
    <head>
        <script type="text/javascript">
        <!--
            alert($result)
        //-->
        </script>
    <title>Post Result</title>
    </head>
    <body>
        ......
    </body>
END

Posted by Wythe at December 21, 2016 - 8:32 PM

The truth is the same, C language using the printf function, the key question is when CGI write back HTML page, IE was suggested to upload files, led to not display CGI returns HTML, when ie prompts finished, the page cache is over, resulting in IE showed no page display.

Posted by Eleanor at December 23, 2016 - 9:12 PM

Online, learning

Posted by Gladys at December 28, 2016 - 10:02 PM

I also want to use C language to write the CGI to the server to upload files, the landlord does not know is how to upload?
To use the CGIC Library?

Posted by Fred at January 12, 2017 - 10:54 PM