OCP/HTTP ad banner filtering example

This is a possible OCP message flow using an HTTP profile.
It filters this simple HTML file which a HTTP client downloads through the OPES processor.

Notes:
- This example should be compliant to OCP Core Draft Version 04 and HTTP adaptation Draft Version 02.
- The connection is kept open at the end - being prepared for the next transaction.

OPES processor Callout server
CS;
CS;
SGC 10 ({"23:webwasher.com/ad-filter"});
 
NO ({"38:http://iana.org/opes/ocp/HTTP/response"
Aux-Parts: (request-header,request-body)
},{"29:http://iana.org/opes/ocp/MIME"})
SG: 10
;
NR {"38:http://iana.org/opes/ocp/HTTP/response"
Aux-Parts: (request-header)
Content-Encodings: (gzip)
}
SG: 10
;
TS 88 10;
 
AMS 88
AM-EL: 95
;
 
DUM 88 0
AM-Part: request-header

65:GET /opes/adsample.html HTTP/1.1
Host: www.martin-stecher.de


;
 
DUM 88 65
Kept: 65 64
AM-Part: response-header

64:HTTP/1.1 200 OK
Content-Type: text/html
Content-Length: 95


;
 
DUM 88 129
Kept: 65 90
AM-Part: response-body

26:<html>
<body>
This is my
;
AMS 88;
DUM 88 155
Kept: 65 159
AM-Part: response-body

69: new ad: <img src="my_ad.gif" width=88 height=31>
</body>
</html>

;
DUM 88 0
AM-Part: response-header

63:HTTP/1.1 200 OK
Content-Type: text/html
Connection: close


;
DPI 88 129 2147483647;
AME 88;
DUM 88 63
AM-Part: response-body

55:<html>
<body>
This is my new ad: 
</body>
</html>

;
DPI 88 129 0;
TE 88;
AME 88;
 
TE 88;

Back to Martin's OPES page