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

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

Re: POST through sockets

daemon@ATHENA.MIT.EDU (cwilson@spry.com)
Tue Jan 31 13:00:45 1995

Date: Tue, 31 Jan 1995 18:25:28 +0100
Errors-To: listmaster@www0.cern.ch
Reply-To: cwilson@spry.com
From: cwilson@spry.com
To: Multiple recipients of list <www-talk@www0.cern.ch>


Dave Banthorpe EOS <daveb@eos4.eos.co.uk> writes:
>Can anybody help me with this problem:
>...
>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)
>...
>Got any ideas?

It could be that you are not sending the HTTP/1.0 request line properly.  Try 
appending " HTTP/1.0" to the first line (and also make sure you're sending CRLF 
pairs to terminate lines) like so:

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

I think the server is probably not realizing you're doing HTTP/1.0, and assumes 
you're trying a 0.9 request since it is malformed.  If you plan on getting any 
data back, you might also want to send some Accept: lines.

-Chris Wilson

:::::::::::::::::::::<<< NETWORKING THE DESKTOP >>>::::::::::::::::::::
 Chris Wilson            	    Spry, Inc.
 WWW Technology Lead		    316 Occidental Avenue S. 2nd Floor
 Email: cwilson@spry.com	    Seattle, WA  98104
 Phone: (206) 447-0300		    FAX: (206) 447-9008
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::


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