Uploading Binary Files
Uploading Binary Files
(OP)
Hello, I'm relatively new to CGI programming. I just finished several routines learning how to parse query strings. (Coded in straight C.) Now I'm trying to learn about multipart/form-data. I thew together a quick HTML form with some text fields and a file upload button and attached a simple text file and hit submit. My CGI simply does a text dump, so I see the boundary-separated info, including the file contents. But when I try try to upload anything besides a text file, something hangs. I never see the output. I don't think it's my CGI, but it seems to be sensitive to file extensions. I took my file "stuff.txt" (which uploaded successfully), renamed the extension: "stuff.abc", and the form hangs. I actually have to reboot my server to fix it. I can't find anything in my server settings that pertain to this. Any help is appreciated!
RE: Uploading Binary Files
CODE --> C
So, I just tried making an in-between-size file - about 80 bytes. The CGI only displays part of it??
RE: Uploading Binary Files
CODE --> C
And everything worked fine (even though I changed stdin to binary and am writing to a text file). The text file has all the form info.
So the problem seems to have been writing to stdout. But why? What is causing output to the browser client area to get "bogged down" if that's even what's happening?