PEPmodel documentation PEPmodel HTTP

SampleSession

This most innclusive sample is one in which the client goes throuth a proxy to get to a server with which it engages in several transactions. The server and proxy client engage in additional connection negotiation.

This page was created by redirecting the output from the client, proxy server and server to the same file:

Running

java w3c.model.tools.basicweb.Server >>monitor.txt &
java w3c.model.tools.basicweb.ProxyServer >>monitor.txt &
java w3c.model.tools.basicweb.Client -proxy localhost 8887 \
http://localhost:8888/doc/Overview.html \
http://localhost:8888/escaped/countable/doc/Overview.html \
-remocon status -remocon help \
http://localhost:8888/escaped/doc/Overview.html >>monitor.txt

Display

The ouput is color coded for the four agent roles.

Annotated output

server and proxy server start
<srver>server port: 8888
<srver>server root: "/nfs/u/eric/WWW-eric/WWW/Protocols/PEP/PEPmodel/src/classes/"
<pSrvr>proxy server port: 8887
client sends request to proxy
<clint>writing line: GET http://localhost:8888/doc/Overview.html HTTP/1.1
<clint>writing line: Host: localhost
<clint>writing line: Date: Fri, 1 Aug 1997 17:18:4 GMT
<clint>writing line
proxy server reads request and sends it to proxy client
<pSrvr>reading "GET http://localhost:8888/doc/Overview.html HTTP/1.1"
<pClnt>writing line: GET /doc/Overview.html HTTP/1.1
<pClnt>writing line: Host: localhost
<pClnt>writing line: Date: Fri, 1 Aug 1997 17:18:4 GMT
<pClnt>writing line: 
server reads and handles request for proxy client
<srver>reading "GET /doc/Overview.html HTTP/1.1"
<srver>writing line: HTTP/1.1 200 OK
<srver>writing line: Content-Length: 3581
<srver>writing line: Date: Fri, 1 Aug 1997 17:18:4 GMT
<srver>writing line: Content-Type: text/html
<srver>writing line: 
<pClnt>reading "HTTP/1.1 200 OK"
proxy server get reply from proxy client and sends to client
<pSrvr>writing line: HTTP/1.1 200 OK
<pSrvr>writing line: Content-Length: 3581
<pSrvr>writing line: Content-Type: text/html
<pSrvr>writing line: Date: Fri, 1 Aug 1997 17:18:4 GMT
<pSrvr>writing line: 
<pClnt>done with Socket[addr=localhost/127.0.0.1,port=8888,localport=34943]
client reads request and sends body to NullOutputStream
<clint>reading "HTTP/1.1 200 OK"
<srver>client seems sated: java.io.IOException: fini
<srver>closing Socket[addr=localhost/127.0.0.1,port=34943,localport=8888]
<clint>NullOutputStream: 3581 bytes
<clint>done with Socket[addr=localhost/127.0.0.1,port=8887,localport=34942]
<pSrvr>client seems sated: java.io.IOException: fini
<pSrvr>closing
Socket[addr=localhost/127.0.0.1,port=34942,localport=8887]
client starts next request
<clint>writing line: GET http://localhost:8888/escaped/countable/doc/Overview.html HTTP/1.1
<clint>writing line: Host: localhost
<clint>writing line: Date: Fri, 1 Aug 1997 17:18:4 GMT
<clint>writing line: 
proxy server passes it on to proxy client
<pSrvr>reading "GET http://localhost:8888/escaped/countable/doc/Overview.html HTTP/1.1"
<pClnt>writing line: GET /escaped/countable/doc/Overview.html HTTP/1.1
<pClnt>writing line: Host: localhost
<pClnt>writing line: Date: Fri, 1 Aug 1997 17:18:4 GMT
<pClnt>writing line: 
server recieves and it finds it lacking the EscapeBody extension
<srver>reading "GET /escaped/countable/doc/Overview.html HTTP/1.1"
<srver>writing line: HTTP/1.1 420 Bad Extensions
<srver>writing line: Content-Length: 85
<srver>writing line: Date: Fri, 1 Aug 1997 17:18:5 GMT
<srver>writing line: Content-Type: text/html
<srver>writing line: C-PEP-Info: {{id "http://localhost:8887/src/classes/escapeBody"}{for "/escaped/" *}{strength must}}
<srver>writing line: PEP-Info: {{id "http://localhost:8887/src/classes/accessCounter"}{for "/countable/" *,"/metered/" *}{strength may}}
<srver>writing line: 
proxy client recieves error, loads extension, and resubmits
<pClnt>reading "HTTP/1.1 420 Bad Extensions"
<pClnt>writing line: PEP-GET /escaped/countable/doc/Overview.html HTTP/1.1
<pClnt>writing line: Host: localhost
<pClnt>writing line: EscapeBody-: e
<pClnt>writing line: Date: Fri, 1 Aug 1997 17:18:4 GMT
<pClnt>writing line: C-PEP: {{map "http://localhost:8887/src/classes/escapeBody" EscapeBody-}{strength must}}
<pClnt>writing line: 
server handles request, calling the EscapeBody extension to encode the data and sending an end-to-end policy declaration for optional extension AccessCounter
<srver>reading "PEP-GET /escaped/countable/doc/Overview.html HTTP/1.1"
<srver>Other side using escape character "e"
<srver>writing line: HTTP/1.1 200 OK
<srver>writing line: Content-Length: 3581
<srver>writing line: Date: Fri, 1 Aug 1997 17:18:6 GMT
<srver>writing line: EscapeBody-: e
<srver>writing line: Content-Type: text/html
<srver>writing line: PEP-Info: {{id "http://localhost:8887/src/classes/accessCounter"}{for "/countable/" *,"/metered/" *}{strength may}}
<srver>writing line: 
proxy client reads reply and decodes it with the key, ignoring to end-to-end policy
<pClnt>reading "HTTP/1.1 200 OK"
<pClnt>Other side using escape character "e"
proxy server passes reply unencoded to client
<pSrvr>writing line: HTTP/1.1 200 OK
<pSrvr>writing line: PEP-Info: {{id "http://localhost:8887/src/classes/accessCounter"}{for "/countable/" *,"/metered/" *}{strength may}}
<pSrvr>writing line: Content-Length: 3581
<pSrvr>writing line: Content-Type: text/html
<pSrvr>writing line: EscapeBody-: e
<pSrvr>writing line: Date: Fri, 1 Aug 1997 17:18:6 GMT
<pSrvr>writing line: 
<pClnt>escapeBody: end of escaped stream
<clint>reading "HTTP/1.1 200 OK"
<clint>NullOutputStream: 3581 bytes
<clint>done with Socket[addr=localhost/127.0.0.1,port=8887,localport=34944]
<pClnt>done with Socket[addr=localhost/127.0.0.1,port=8888,localport=34945]
<srver>client seems sated: java.io.IOException: fini
<srver>closing Socket[addr=localhost/127.0.0.1,port=34945,localport=8888]
<pSrvr>closing Socket[addr=localhost/127.0.0.1,port=34944,localport=8887]
client starts another request, one that uses the AccessCounter policy that it just recieved and the required Remocon extension that the user demanded with the -remocon command line arguments
<clint>writing line: PEP-GET http://localhost:8888/escaped/doc/Overview.html HTTP/1.1
<clint>writing line: RemoCon-0: status
<clint>writing line: Host: localhost
<clint>writing line: Date: Fri, 1 Aug 1997 17:18:7 GMT
<clint>writing line: RemoCon-1: help
<clint>writing line: PEP: {{map "http://localhost:8887/src/classes/remoteControl" RemoCon-*}{strength must}}
<clint>writing line: 
proxy server ignores the end-to-end extension
<pSrvr>reading "PEP-GET http://localhost:8888/escaped/doc/Overview.html HTTP/1.1"
proxy client invokes the previously discovered EscapeBody extension
<pClnt>writing line: PEP-GET /escaped/doc/Overview.html HTTP/1.1
<pClnt>writing line: EscapeBody-1367361355: e
<pClnt>writing line: RemoCon-0: status
<pClnt>writing line: PEP: {{map "http://localhost:8887/src/classes/remoteControl" RemoCon-*}{strength must}}
<pClnt>writing line: Host: localhost
<pClnt>writing line: RemoCon-1: help
<pClnt>writing line: Date: Fri, 1 Aug 1997 17:18:7 GMT
<pClnt>writing line: C-PEP: {{map "http://localhost:8887/src/classes/escapeBody" EscapeBody-1367361355}{strength must}}
<pClnt>writing line: 
server handles the escaped stream and the Remocon demand
<srver>reading "PEP-GET /escaped/doc/Overview.html HTTP/1.1"
<srver>Other side using escape character "e"
<srver>Other side wants us to "status"
<srver>Other side wants us to "help"
<srver>writing line: HTTP/1.1 200 OK
<srver>writing line: RemoCon-0: hunky dory
<srver>writing line: EscapeBody-1367361355: e
<srver>writing line: Content-Length: 3581
<srver>writing line: Date: Fri, 1 Aug 1997 17:18:8 GMT
<srver>writing line: RemoCon-1: unknown command "help"
<srver>writing line: Content-Type: text/html
<srver>writing line: 
proxy client passes unescaped stream back to proxy server...
<pClnt>reading "HTTP/1.1 200 OK"
<srver>closing Socket[addr=localhost/127.0.0.1,port=34947,localport=8888]
<pClnt>Other side using escape character "e"
...which passes it on to the client
<pSrvr>writing line: HTTP/1.1 200 OK
<pSrvr>writing line: EscapeBody-1367361355: e
<pSrvr>writing line: RemoCon-0: hunky dory
<pSrvr>writing line: Content-Length: 3581
<pSrvr>writing line: Content-Type: text/html
<pSrvr>writing line: RemoCon-1: unknown command "help"
<pSrvr>writing line: Date: Fri, 1 Aug 1997 17:18:8 GMT
<pSrvr>writing line: 
the client reads the results of the Remocon call to the server
<clint>reading "HTTP/1.1 200 OK"
<clint>Server responded to "status" with "hunky dory"
<clint>Server responded to "help" with "unknown command "help""
<pClnt>escapeBody: end of escaped stream
<clint>NullOutputStream: 3581 bytes
<clint>done with Socket[addr=localhost/127.0.0.1,port=8887,localport=34946]
<pClnt>done with Socket[addr=localhost/127.0.0.1,port=8888,localport=34947]
<pSrvr>closing Socket[addr=localhost/127.0.0.1,port=34946,localport=8887]

Eric Prud'hommeaux, eric@w3.org,
@(#) $Id: SampleSession.html,v 1.2 1997/08/03 00:38:58 eric Exp $