W3C home > Mailing lists > Public > ietf-http-wg-old@w3.org > September to December 1995

HTTP POST streaming

From: Philip Thrift <thrift@osage.csc.ti.com>
Date: Fri, 10 Nov 1995 08:26:25 -0600 (CST)
Message-Id: <199511101426.IAA29685@osage.csc.ti.com>
To: http-wg%cuckoo.hpl.hp.com@hplb.hpl.hp.com
Cc: thrift@osage.csc.ti.com

I am interested in applications that can make use of having a
continuous two-way connection to a web server and HTTP protocols that
support it (and especially how HTTP proxies support it).

Relevant is the IETF HTTP-WG Session Extension protocol, HTTP-NG,
Keep-Alive, and perhaps server push, client pull protocols, although I
am trying to sort them out in the context of my little test example below.

Here is an example CGI script that is continuously reading data from
the client (in this example, telnet is used for the client) and
responding in a dialog fashion. This works using the NCSA httpd. (I
say Content-Length: -1 just to mean I don't know how much data I will
send). It doesn't work going through a CERN proxy, since the proxy
seems to buffer up the POST data before sending it.


#  Server: NCSA httpd 1.4
#  CGI:    /cgi-bin/nph-test-session.p
#  Usage:
#  % telnet <host> <port>
#  POST /cgi-bin/nph-test-session.p HTTP/1.0
#  Content-Length: -1
#  <empty line here>
#  (type some non-empty lines with return and end with empty line)

require "flush.pl";
print "HTTP/1.0 200\n";
print "Content-type: multipart/x-mixed-replace;boundary=---ThisRandomString---\n\n";
while (<STDIN>) {         # read POST data as it comes in
    chop; chop;           # get rid of CRLF
    if (length($_) < 1) { exit 0; }  # exit when blank line is sent
    &printflush(stdout,"Content-type: text/plain\n\n");
    printf("You said  %s   and transmitted %d chars\n",$_,length($_));

Here is an example use, where > indicates data typed by the client:

> telnet gamera 8001
Trying ...
Connected to gamera.
Escape character is '^]'.
POST /cgi-bin/nph-test-session.p HTTP/1.0
Content-Length: -1
HTTP/1.0 200
Content-type: multipart/x-mixed-replace;boundary=---ThisRandomString---
> hello
Content-type: text/plain
You said  hello   and transmitted 5 chars
> there
Content-type: text/plain
You said  there   and transmitted 5 chars
Connection closed by foreign host.

Here the idea is that POST data is continuously streaming to the
server and the server streams back (examples: continuously
moving in a VRML world while the other participants are moving around
you, moving a robot arm, bi-directional video communication, ...).

I am interested in how "POST streaming" fits into the current
session ideas.

                                      Philip Thrift

NET: thrift@ti.com                    TI Corporate Software Laboratory
TEL:(214) 995-7906                    P.O. Box  655474  M.S. 238
FAX:(214) 995-0304                    Dallas, TX 75265

URL: http://www.nowhere.net/~thrift/
URL: http://mothra.csc.ti.com:8001/                  (TI Internal)
Received on Friday, 10 November 1995 06:29:50 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:40:15 UTC