From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,b338d78de52bfcdb,start X-Google-Attributes: gidfa528,public From: "John Rea" Subject: Using APACHE with POST command, Parsing File Date: 2000/06/16 Message-ID: <8idgqu$9cc$1@kermit.esat.net>#1/1 X-Deja-AN: 635367586 X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 X-Complaints-To: abuse@esat.net X-Trace: kermit.esat.net 961169054 9612 193.120.120.129 (16 Jun 2000 15:24:14 GMT) Organization: Esat Net X-MSMail-Priority: Normal NNTP-Posting-Date: 16 Jun 2000 15:24:14 GMT Newsgroups: comp.unix.tru64 Hi, I am running Apache on Dec Unix 4.0 I have a Web Page that calls a cgi script and passes a file using the POST method & ENCTYPE="multipart/form-data" My script is written in shell and a bit slow. Is there any utility out there to take this file & parse it. It would be brilliant if it would take the the values passed in single variables & put these to system environment. If you are unfamilure with the exact config this is what happens. The web page allows you browse to a file & sent the contents of the file to the cgi script. The cgi script gets the contents of the file as STDIN in text. Each field on the form is a different MIME field & is seperated by a boundry so from the following eg I want to be able to pass the text "SH,2103" to a variable that I can identify as representing LocationCode the text/plain bit should go to STDOUT or a file. The method is brilliant but the code makes it hard to implement many versions. I would program it in C, if I knew how to program C! -----------------------------7d046369c8 Content-Disposition: form-data; name="LocationCode" SH,2103 -----------------------------7d046369c8 Content-Disposition: form-data; name="UploadFile"; filename="G:\HANDHELD\stmar00.dat" Content-Type: text/plain 0000000070331,8,000125 0000000089142,2,000125 ... 5098982734124,46,000125 0000000052818,25,000125 -----------------------------7d046369c8-- #