[7453] in www-talk@info.cern.ch

home help back first fref pref prev next nref lref last post

POST through sockets

daemon@ATHENA.MIT.EDU (Dave Banthorpe EOS)
Tue Jan 31 11:31:50 1995

Date: Tue, 31 Jan 1995 16:48:06 +0100
Errors-To: listmaster@www0.cern.ch
Reply-To: daveb@eos4.eos.co.uk
From: "Dave Banthorpe EOS" <daveb@eos4.eos.co.uk>
To: Multiple recipients of list <www-talk@www0.cern.ch>

Can anybody help me with this problem:

I have a plain text file (256 bytes long) that I wish to send via HTTP to a CGI
for processing.
At present I do the following:

Open a socket to the HTTP server (where the CGI is held).
Open the text file for reading and send the following down the socket:

POST /cgi-bin/testprogram
Content-type: text/plain
Content-length: 256
(file gets put here)

The server picks up the POST query and initiates the CGI but it does not set
the Content-type and Content-length environment variables.
Got any ideas?
Am I using the MIME type headers incorrectly?
Is there a better way to do this?
Dave Banthorpe (EOS).


home help back first fref pref prev next nref lref last post