1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509
|
<pre>Network Working Group A. Rousskov
Request for Comments: 4236 The Measurement Factory
Category: Standards Track M. Stecher
CyberGuard Corporation
November 2005
<span class="h1">HTTP Adaptation with Open Pluggable Edge Services (OPES)</span>
Status of This Memo
This document specifies an Internet standards track protocol for the
Internet community, and requests discussion and suggestions for
improvements. Please refer to the current edition of the "Internet
Official Protocol Standards" (STD 1) for the standardization state
and status of this protocol. Distribution of this memo is unlimited.
Copyright Notice
Copyright (C) The Internet Society (2005).
Abstract
Open Pluggable Edge Services (OPES) framework documents several
application-agnostic mechanisms such as OPES tracing, OPES bypass,
and OPES callout protocol. This document extends those generic
mechanisms for Hypertext Transfer Protocol (HTTP) adaptation.
Together, application-agnostic OPES documents and this HTTP profile
constitute a complete specification for HTTP adaptation with OPES.
<span class="grey">Rousskov & Stecher Standards Track [Page 1]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
<span class="grey"><a href="./rfc4236">RFC 4236</a> HTTP Adaptation with OPES November 2005</span>
Table of Contents
<a href="#section-1">1</a>. Scope ...........................................................<a href="#page-3">3</a>
<a href="#section-2">2</a>. OPES Document Map ...............................................<a href="#page-3">3</a>
<a href="#section-3">3</a>. Callout Protocol ................................................<a href="#page-4">4</a>
<a href="#section-3.1">3.1</a>. Application Message Parts ..................................<a href="#page-5">5</a>
<a href="#section-3.2">3.2</a>. Application Profile Features ...............................<a href="#page-6">6</a>
<a href="#section-3.2.1">3.2.1</a>. Profile Parts .......................................<a href="#page-6">6</a>
<a href="#section-3.2.2">3.2.2</a>. Profile Structure ...................................<a href="#page-8">8</a>
<a href="#section-3.2.3">3.2.3</a>. Aux-Parts ...........................................<a href="#page-8">8</a>
<a href="#section-3.2.4">3.2.4</a>. Pause-At-Body .......................................<a href="#page-9">9</a>
<a href="#section-3.2.5">3.2.5</a>. Stop-Receiving-Body ................................<a href="#page-10">10</a>
<a href="#section-3.2.6">3.2.6</a>. Preservation-Interest-Body .........................<a href="#page-10">10</a>
<a href="#section-3.2.7">3.2.7</a>. Content-Encodings ..................................<a href="#page-11">11</a>
<a href="#section-3.2.8">3.2.8</a>. Profile Negotiation Example ........................<a href="#page-12">12</a>
<a href="#section-3.3">3.3</a>. Application Message Start Message .........................<a href="#page-13">13</a>
<a href="#section-3.4">3.4</a>. DUM Message ...............................................<a href="#page-13">13</a>
<a href="#section-3.5">3.5</a>. Selective Adaptation ......................................<a href="#page-14">14</a>
<a href="#section-3.6">3.6</a>. Hop-by-hop Headers ........................................<a href="#page-15">15</a>
<a href="#section-3.7">3.7</a>. Transfer Encodings ........................................<a href="#page-15">15</a>
<a href="#section-3.8">3.8</a>. HTTP Header Correctness ...................................<a href="#page-16">16</a>
<a href="#section-3.8.1">3.8.1</a>. Message Size Recalculation .........................<a href="#page-16">16</a>
<a href="#section-3.8.2">3.8.2</a>. Content-MD5 Header .................................<a href="#page-17">17</a>
<a href="#section-3.9">3.9</a>. Examples ..................................................<a href="#page-18">18</a>
<a href="#section-4">4</a>. Tracing ........................................................<a href="#page-22">22</a>
<a href="#section-5">5</a>. Bypass .........................................................<a href="#page-24">24</a>
<a href="#section-6">6</a>. IAB Considerations .............................................<a href="#page-24">24</a>
<a href="#section-7">7</a>. Security Considerations ........................................<a href="#page-24">24</a>
<a href="#section-8">8</a>. IANA Considerations ............................................<a href="#page-24">24</a>
<a href="#section-9">9</a>. Compliance .....................................................<a href="#page-25">25</a>
<a href="#section-10">10</a>. References ....................................................<a href="#page-25">25</a>
<a href="#section-10.1">10.1</a>. Normative References .....................................<a href="#page-25">25</a>
<a href="#section-10.2">10.2</a>. Informative References ...................................<a href="#page-25">25</a>
<span class="grey">Rousskov & Stecher Standards Track [Page 2]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
<span class="grey"><a href="./rfc4236">RFC 4236</a> HTTP Adaptation with OPES November 2005</span>
<span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. Scope</span>
The Open Pluggable Edge Services (OPES) framework documents several
application-agnostic mechanisms such as OPES processor and endpoints
communications [<a href="./rfc3897" title=""Open Pluggable Edge Services (OPES) Entities and End Points Communication"">RFC3897</a>] or OPES callout protocol [<a href="./rfc4037" title=""Open Pluggable Edge Services (OPES) Callout Protocol (OCP) Core"">RFC4037</a>]. This
document extends those generic mechanisms for adaptation of a
specific application protocol, HTTP [<a href="./rfc2616" title=""Hypertext Transfer Protocol -- HTTP/1.1"">RFC2616</a>]. Together,
application-agnostic OPES documents and this HTTP profile constitute
a complete specification for HTTP adaptation with OPES.
The primary sections of this document specify HTTP-specific
extensions for the corresponding application-agnostic mechanisms
documented elsewhere.
<span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. OPES Document Map</span>
This document belongs to a large set of OPES specifications produced
by the IETF OPES Working Group. Familiarity with the overall OPES
approach and typical scenarios is often essential when trying to
comprehend isolated OPES documents. This section provides an index
of OPES documents to assist the reader with finding "missing"
information.
o The document on "OPES Use Cases and Deployment Scenarios"
[<a href="./rfc3752" title=""Open Pluggable Edge Services (OPES) Use Cases and Deployment Scenarios"">RFC3752</a>] describes a set of services and applications that are
considered in scope for OPES and have been used as a motivation
and guidance in designing the OPES architecture.
o The OPES architecture and common terminology are described in "An
Architecture for Open Pluggable Edge Services (OPES)" [<a href="./rfc3835" title=""An Architecture for Open Pluggable Edge Services (OPES)"">RFC3835</a>].
o "Policy, Authorization and Enforcement Requirements of OPES"
[<a href="./rfc3838" title=""Policy, Authorization, and Enforcement Requirements of the Open Pluggable Edge Services (OPES)"">RFC3838</a>] outlines requirements and assumptions on the policy
framework, without specifying concrete authorization and
enforcement methods.
o "Security Threats and Risks for OPES" [<a href="./rfc3837" title=""Security Threats and Risks for Open Pluggable Edge Services (OPES)"">RFC3837</a>] provides OPES risk
analysis, without recommending specific solutions.
o "OPES Treatment of IAB Considerations" [<a href="./rfc3914" title=""Open Pluggable Edge Services (OPES) Treatment of IAB Considerations"">RFC3914</a>] addresses all
architecture-level considerations expressed by the IETF Internet
Architecture Board (IAB) when the OPES WG was chartered.
o At the core of the OPES architecture are the OPES processor and
the callout server, two network elements that communicate with
each other via an OPES Callout Protocol (OCP). The requirements
for such protocol are discussed in "Requirements for OPES Callout
Protocols" [<a href="./rfc3836" title=""Requirements for Open Pluggable Edge Services (OPES) Callout Protocols"">RFC3836</a>].
<span class="grey">Rousskov & Stecher Standards Track [Page 3]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
<span class="grey"><a href="./rfc4236">RFC 4236</a> HTTP Adaptation with OPES November 2005</span>
o "OPES Callout Protocol Core" [<a href="./rfc4037" title=""Open Pluggable Edge Services (OPES) Callout Protocol (OCP) Core"">RFC4037</a>] specifies an application
agnostic protocol core to be used for the communication between
OPES processor and callout server.
o "OPES entities and end points communications" [<a href="./rfc3897" title=""Open Pluggable Edge Services (OPES) Entities and End Points Communication"">RFC3897</a>] specifies
generic tracing and bypass mechanisms for OPES.
o The OCP Core and Communications documents are independent from the
application protocol being adapted by OPES entities. Their
generic mechanisms have to be complemented by application-specific
profiles. This document, HTTP adaptation with OPES, is such an
application profile for HTTP. It specifies how application-
agnostic OPES mechanisms are to be used and augmented in order to
support adaptation of HTTP messages.
o Finally, "P: Message Processing Language" [<a href="#ref-rules-p" title=""P: Message Processing Language"">rules-p</a>] defines a
language for specifying what OPES adaptations (e.g., translation)
must be applied to what application messages (e.g., e-mail from
bob@example.com). P language is meant for configuring application
proxies (OPES processors).
<span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. Callout Protocol</span>
This section documents the HTTP profile for the OPES Callout Protocol
(OCP) Core [<a href="./rfc4037" title=""Open Pluggable Edge Services (OPES) Callout Protocol (OCP) Core"">RFC4037</a>]. Familiarity with OCP Core is required to
understand the HTTP profile. This section uses OCP Core conventions,
terminology, and mechanisms.
OPES processor communicates its desire to adapt HTTP messages via a
Negotiation Offer (NO) message with HTTP-specific feature identifiers
documented in <a href="#section-3.2">Section 3.2</a>. HTTP-specific OCP optimization mechanisms
can be negotiated at the same time. A callout server that supports
adaptation of HTTP messages has a chance to negotiate what HTTP
message parts will participate in adaptation, including negotiation
of HTTP request parts as metadata for HTTP response adaptation.
Negotiable HTTP message parts are documented in <a href="#section-3.1">Section 3.1</a>.
HTTP profile introduces a new parameter for the Application Message
Start (AMS) message to communicate known HTTP message length (HTTP
headers often do not convey length information reliably or at all).
This parameter is documented in <a href="#section-3.3">Section 3.3</a>. <a href="#section-3.4">Section 3.4</a> documents a
mechanism to report HTTP message parts with Data Use Mine (DUM)
messages.
The remaining OCP sections document various OCP marshaling corner
cases such as handling of HTTP transfer encodings and 100 Continue
responses.
<span class="grey">Rousskov & Stecher Standards Track [Page 4]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span>
<span class="grey"><a href="./rfc4236">RFC 4236</a> HTTP Adaptation with OPES November 2005</span>
<span class="h3"><a class="selflink" id="section-3.1" href="#section-3.1">3.1</a>. Application Message Parts</span>
An HTTP message may have several well-known parts: headers, body, and
trailers. HTTP OPES processors are likely to have information about
HTTP message parts because they have to isolate and interpret HTTP
headers and find HTTP message boundaries. Callout servers may either
not care about certain parts or may benefit from reusing HTTP OPES
processor work on isolating and categorizing interesting parts.
The following is the declaration of am-part (application message
part) type using OCP Core Protocol Element Type Declaration Mnemonic
(PETDM):
am-part: extends atom;
am-parts: extends list of am-part;
Figure 1
The following six "am-part" atoms are valid values:
request-header: The start-line of an HTTP request message, all
request message headers, and the CRLF separator at the end of HTTP
headers (compare with <a href="./rfc2616#section-4.1">section 4.1 of [RFC2616]</a>).
request-body: The message body of an HTTP request message as defined
in <a href="./rfc2616#section-4.3">section 4.3 of [RFC2616]</a> but not including the trailer.
request-trailer: The entity headers of the trailer of an HTTP request
message in chunked transfer encoding. This part follows the same
syntax as the trailer defined in <a href="./rfc2616#section-3.6.1">section 3.6.1 of [RFC2616]</a>.
response-header: The start-line of an HTTP response message, all
response message headers, and the CRLF separator at the end of
HTTP headers (compare with <a href="./rfc2616#section-4.1">section 4.1 of [RFC2616]</a>).
response-body: The message body of an HTTP response message as
defined in <a href="./rfc2616#section-4.3">section 4.3 of [RFC2616]</a> but not including the trailer.
response-trailer: The entity headers of the trailer of an HTTP
response message in chunked transfer encoding. This part follows
the same syntax as the trailer defined in <a href="./rfc2616#section-3.6.1">section 3.6.1 of
[RFC2616]</a>.
<span class="grey">Rousskov & Stecher Standards Track [Page 5]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span>
<span class="grey"><a href="./rfc4236">RFC 4236</a> HTTP Adaptation with OPES November 2005</span>
<span class="h3"><a class="selflink" id="section-3.2" href="#section-3.2">3.2</a>. Application Profile Features</span>
This document defines two HTTP profiles for OCP: request and response
profiles. These two profiles are described below. Each profile has
a unique feature identifier, a list of original application message
parts, and a list of adapted application message parts:
profile ID: <a href="http://www.iana.org/assignments/opes/ocp/http/request">http://www.iana.org/assignments/opes/ocp/http/request</a>
original request parts: request-header, request-body, request-
trailer
adapted request parts: request-header, request-body, request-
trailer
adapted response parts: response-header, response-body, response-
trailer
profile ID: <a href="http://www.iana.org/assignments/opes/ocp/http/response">http://www.iana.org/assignments/opes/ocp/http/response</a>
original transaction parts: request-header (aux), request-body
(aux), request-trailer (aux), response-header, response-body,
response-trailer
adapted response parts: response-header, response-body, response-
trailer
The request profile contains two variants of adapted part lists: HTTP
request parts and HTTP response parts. Parts marked with an "(aux)"
suffix are auxiliary parts that can only be used if explicitly
negotiated for a profile. See <a href="#section-3.2.1">Section 3.2.1</a> for specific rules
governing negotiation and use of am-parts.
The scope of a negotiated profile is the OCP connection (default) or
the service group specified via the SG parameter.
<span class="h4"><a class="selflink" id="section-3.2.1" href="#section-3.2.1">3.2.1</a>. Profile Parts</span>
An OCP agent MUST send application message parts in the order implied
by the profile parts lists above. An OCP agent receiving an out-of-
order part MAY terminate the transaction with an error.
An OPES processor MUST NOT send parts that are not listed as
"original" in the negotiated profile. A callout server MUST NOT send
parts that are not listed as "adapted" in the negotiated profile. An
OCP agent receiving an not-listed part MUST terminate the transaction
with an error. The informal rationale for the last requirement is to
reduce the number of subtle interoperability problems where an agent
<span class="grey">Rousskov & Stecher Standards Track [Page 6]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-7" ></span>
<span class="grey"><a href="./rfc4236">RFC 4236</a> HTTP Adaptation with OPES November 2005</span>
thinks that the parts it is sending are understood/used by the other
agent when, in fact, they are being ignored or skipped because they
are not expected.
Some HTTP messages lack certain parts. For example, many HTTP
requests do not have bodies, and most HTTP messages do not have
trailers. An OCP agent MUST NOT send (i.e., must skip) absent
application message parts.
An OCP agent MUST send present non-auxiliary parts and it MUST send
those present auxiliary parts that were negotiated via the Aux-Parts
(<a href="#section-3.2.3">Section 3.2.3</a>) parameter. OCP agents MUST NOT send auxiliary parts
that were not negotiated via the Aux-Parts (<a href="#section-3.2.3">Section 3.2.3</a>) parameter.
An OCP agent receiving a message part in violation of the above
requirements MAY terminate the corresponding transaction with an
error.
By design, original parts not included in the adapted parts list
cannot be adapted. In other words, a callout service can only adapt
parts in the adapted parts list even though it may have access to
other parts.
In the request profile, the callout server MUST send either adapted
request parts or adapted response parts. An OPES processor receiving
adapted flow with application message parts from both lists (in
violation of the previous rule) MUST terminate the OCP transaction
with an error. Informally, the callout server sends adapted response
parts to "short-circuit" the HTTP transaction, forcing the OPES
processor to return an HTTP response without forwarding an adapted
HTTP request. This short-circuiting is useful for responding, for
example, to an HTTP request that the callout service defines as
forbidden.
Unless explicitly configured to do otherwise, an OPES processor MUST
offer all non-auxiliary original parts in Negotiation Offer (NO)
messages. See <a href="#section-3.5">Section 3.5</a> for this rule rationale and examples of
harmful side-effects from selective adaptation.
<span class="grey">Rousskov & Stecher Standards Track [Page 7]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-8" ></span>
<span class="grey"><a href="./rfc4236">RFC 4236</a> HTTP Adaptation with OPES November 2005</span>
<span class="h4"><a class="selflink" id="section-3.2.2" href="#section-3.2.2">3.2.2</a>. Profile Structure</span>
An HTTP application profile feature extends semantics of the feature
type of OCP Core while adding the following named parameters to that
type:
o Aux-Parts (<a href="#section-3.2.3">Section 3.2.3</a>)
o Pause-At-Body (<a href="#section-3.2.4">Section 3.2.4</a>)
o Stop-Receiving-Body (<a href="#section-3.2.5">Section 3.2.5</a>)
o Preservation-Interest-Body (<a href="#section-3.2.6">Section 3.2.6</a>)
o Content-Encodings (<a href="#section-3.2.7">Section 3.2.7</a>)
The definition of the HTTP profile feature structure using PETDM
follows:
HTTP-Profile: extends Feature with {
[Aux-Parts: am-parts];
[Pause-At-Body: size];
[Stop-Receiving-Body: size];
[Preservation-Interest-Body: size];
[Content-Encodings: codings];
};
Figure 2
An HTTP profile structure can be used in feature lists of Negotiation
Offer (NO) messages and as an anonymous parameter of a Negotiation
Response (NR) message. All profile parameters apply to any OCP
transaction within profile scope.
<span class="h4"><a class="selflink" id="section-3.2.3" href="#section-3.2.3">3.2.3</a>. Aux-Parts</span>
The Aux-Parts parameter of an HTTP response profile can be used to
negotiate the inclusion of auxiliary application message parts into
the original data flow. The parameter is a possibly empty list of
am-part tokens. An OPES processor MAY send an Aux-Parts parameter to
advertise availability of auxiliary application message parts. A
callout server MAY respond with a possibly empty subset of the parts
it needs. The callout server response defines the subset of
successfully negotiated auxiliary message parts.
When receiving a Negotiation Offer (NO) message, the callout server
MUST ignore any non-auxiliary part listed in the Aux-Parts parameter.
When sending a Negotiation Response (NR) message, the callout server
<span class="grey">Rousskov & Stecher Standards Track [Page 8]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-9" ></span>
<span class="grey"><a href="./rfc4236">RFC 4236</a> HTTP Adaptation with OPES November 2005</span>
MUST NOT select any application message part that was not explicitly
listed in the negotiation offer. In case of a violation of the last
rule, the OPES processor MUST terminate the transaction.
An OPES processor MUST send each negotiated auxiliary part to the
callout server, unless the part is absent.
Example:
Aux-Parts: (request-header,request-body)
Figure 3
<span class="h4"><a class="selflink" id="section-3.2.4" href="#section-3.2.4">3.2.4</a>. Pause-At-Body</span>
A callout server MAY use the Pause-At-Body parameter to request a
pause in original application message body transmission before
original dataflow starts. The parameter's value is of type "offset".
The parameter specifies the start of the non-auxiliary application
message body suffix that the sender is temporarily not interested in
seeing.
[headers][ body prefix | body suffix ][trailer]
<-- ? --><-- offset --><-- ? ---------------->
<-- equiv. DWP offset ->
Figure 4
When an OPES processor receives a Pause-At-Body parameter, it MUST
behave as if it has received a Want Data Paused (DWP) message with
the corresponding org-offset. Note that the latter offset is
different from the Pause-At-Body offset and is unknown until the size
of the HTTP message headers is known.
For example, if the Pause-At-Body value is zero, the OPES processor
should send a Paused My Data (DPM) message just before it sends the
first Data Use Mine (DUM) message with the response-body part in the
HTTP response profile. If the Pause-At-Body value is 300, the OPES
processor should send a DPM message after transmitting 300 OCTETs for
that application message part.
Example:
Pause-At-Body: 0
Figure 5
<span class="grey">Rousskov & Stecher Standards Track [Page 9]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-10" ></span>
<span class="grey"><a href="./rfc4236">RFC 4236</a> HTTP Adaptation with OPES November 2005</span>
<span class="h4"><a class="selflink" id="section-3.2.5" href="#section-3.2.5">3.2.5</a>. Stop-Receiving-Body</span>
A callout server MAY use the Stop-Receiving-Body parameter to imply a
Want Stop Receiving Data (DWSR) message behavior before the original
dataflow starts. The parameter's value is of type "offset". The
parameter specifies an offset into the original, non-auxiliary
message body part (request-body in request profile and response-body
in response profile).
A callout service MAY send a Stop-Receiving-Body parameter with its
negotiation response if there is a fixed offset into the message body
for all transactions of a profile for which a Want Stop Receiving
Data (DWSR) message would be sent. An OPES processor MUST behave as
if it has received a DWSR message with the corresponding offset.
Note that the latter offset is different from the Stop-Receiving-Body
offset and is unknown until the size of the HTTP message headers is
known.
For example, if the Stop-Receiving-Body value is zero in an HTTP
response profile, the OPES processor should send an Application
Message End (AME) message with result code 206 immediately after
sending the response-header message part and before starting with the
response-body message part.
Example:
Stop-Receiving-Body: 0
Figure 6
<span class="h4"><a class="selflink" id="section-3.2.6" href="#section-3.2.6">3.2.6</a>. Preservation-Interest-Body</span>
The Preservation-Interest-Body parameter can be used to optimize data
preservation at the OPES processor. The parameter's value is of type
"size" and denominates a prefix size of the original, non-auxiliary
message body part (request-body in HTTP request profile and
response-body in response profile).
A callout service MAY send a Preservation-Interest-Body parameter
with its negotiation response if there is a fixed-size prefix of the
application message body for which a Data Preservation Interest (DPI)
message would be sent. An OPES processor MUST behave as if it
receives a DPI message with org-offset zero and org-size equal to the
value of the Preservation-Interest-Body parameter.
<span class="grey">Rousskov & Stecher Standards Track [Page 10]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-11" ></span>
<span class="grey"><a href="./rfc4236">RFC 4236</a> HTTP Adaptation with OPES November 2005</span>
For example, if the Preservation-Interest-Body value is zero in an
HTTP response profile, the callout server must not send any Data Use
Yours (DUY) message for the response-body part; the OPES processor
may use this information to optimize its data preservation behavior
even before it makes the decision to preserve data.
Example:
Preservation-Interest-Body: 0
Figure 7
<span class="h4"><a class="selflink" id="section-3.2.7" href="#section-3.2.7">3.2.7</a>. Content-Encodings</span>
A callout server MAY send a Content-Encodings list to indicate its
preferences in content encodings. Encodings listed first are
preferred to other encodings. An OPES processor MAY use any content
encoding when sending application messages to a callout server.
The list of preferred content encodings does not imply lack of
support for other encodings. The OPES processor MUST NOT bypass a
service just because the actual content encoding does not match the
service's preferences.
If an OCP agent receives an application message that it cannot handle
due to specific content encoding, the usual transaction termination
rules apply.
content-coding: extends atom;
content-codings: extends list of content-coding;
Example:
Content-Encodings: (gzip)
Figure 8
The semantics of content-coding is defined in <a href="./rfc2616#section-3.5">section 3.5 of
[RFC2616]</a>.
<span class="grey">Rousskov & Stecher Standards Track [Page 11]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-12" ></span>
<span class="grey"><a href="./rfc4236">RFC 4236</a> HTTP Adaptation with OPES November 2005</span>
<span class="h4"><a class="selflink" id="section-3.2.8" href="#section-3.2.8">3.2.8</a>. Profile Negotiation Example</span>
Example:
P: NO ({"54:http://www.iana.org/assignments/opes/ocp/http/response"
Aux-Parts: (request-header,request-body)
})
SG: 5
;
S: NR {"54:http://www.iana.org/assignments/opes/ocp/http/response"
Aux-Parts: (request-header)
Pause-At-Body: 30
Preservation-Interest-Body: 0
Content-Encodings: (gzip)
}
SG: 5
;
Figure 9
This example shows a negotiation offer made by an OPES processor for
a service group (id 5) that has already been created; the callout
server sends an adequate negotiation response.
The OPES processor offers one profile feature for HTTP response
messages. Besides the standard message parts, the OPES processor is
able to add the header and body of the original HTTP request as
auxiliary message parts.
The callout server requests the auxiliary request-header part, but is
not interested in receiving the request-body part.
The OPES processor sends at most the following message parts, in the
specified order, for all transactions in service group 5: request-
header, response-header, response-body, response-trailer. Note that
the request-body part is not included (because it is an auxiliary
part that was not explicitly requested). Some of the response parts
may not be sent if the original message lacks them.
The callout server indicates through the Preservation-Interest-Body
parameter with size zero that it will not send any DUY messages. The
OPES processor may therefore preserve no preservation for any
transaction of this profile.
By sending a Pause-At-Body value of 30, the callout server requests a
data pause. The OPES processor sends a Paused My Data (DPM) message
immediately after sending at least 30 OCTETs of the response-body
part. Thereafter, the OPES processor waits for a Want More Data
(DWM) message from the callout service.
<span class="grey">Rousskov & Stecher Standards Track [Page 12]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-13" ></span>
<span class="grey"><a href="./rfc4236">RFC 4236</a> HTTP Adaptation with OPES November 2005</span>
<span class="h3"><a class="selflink" id="section-3.3" href="#section-3.3">3.3</a>. Application Message Start Message</span>
A new named parameter for Application Message Start (AMS) messages is
introduced.
AM-EL: size
Figure 10
AM-EL value is the size of the request-body part in the HTTP request
profile, and is the size of the response-body part in the HTTP
response profile, before any transfer codings have been applied (or
after all transfer codings have been removed). This definition is
consistent with the HTTP entity length definition.
An OCP agent that knows the exact length of the HTTP message entity
(see <a href="#section-7.2.2">Section 7.2.2</a> "Entity Length" in [<a href="./rfc2616" title=""Hypertext Transfer Protocol -- HTTP/1.1"">RFC2616</a>]) at the time it sends
the AMS message, SHOULD announce this length using the AM-EL named
parameter of an AMS message. If the exact entity length is not
known, an OCP agent MUST NOT send an AM-EL parameter. Relaying
correct entity length can have significant performance advantages for
the recipient, and implementations are strongly encouraged to relay
known entity lengths. Similarly, relaying incorrect entity length
can have drastic correctness consequences for the recipient, and
implementations are urged to exercise great care when relaying entity
length.
An OPES processor receiving an AM-EL parameter SHOULD use the
parameter's value in a Content-Length HTTP entity header when
constructing an HTTP message, provided a Content-Length HTTP entity
header is allowed for the given application message by HTTP (see
<a href="#section-3.8.1">Section 3.8.1</a>).
<span class="h3"><a class="selflink" id="section-3.4" href="#section-3.4">3.4</a>. DUM Message</span>
A new named parameter for Data Use Mine (DUM) messages is introduced.
AM-Part: am-part
Figure 11
An OCP agent MUST send an AM-Part parameter with every DUM message
that is a part of an OCP transaction with an HTTP profile. The AM-
Part parameter value is a single am-part token. As implied by the
syntax, a DUM message can only contain data of a single application
message part. One message part can be fragmented into any number of
DUM messages with the same AM-Part parameter.
<span class="grey">Rousskov & Stecher Standards Track [Page 13]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-14" ></span>
<span class="grey"><a href="./rfc4236">RFC 4236</a> HTTP Adaptation with OPES November 2005</span>
The following example shows three DUM messages containing an abridged
HTTP response message. The response-body part is fragmented and sent
within two DUM messages.
Example:
P: DUM 88 1 0
Kept: 0
AM-Part: response-header
64:HTTP/1.1 200 OK
Content-Type: text/html
Content-Length: 51
;
P: DUM 88 1 64
Kept: 64
AM-Part: response-body
19:<html><body>This is
;
P: DUM 88 1 83
Kept: 83
AM-Part: response-body
32: a simple message.</body></html>
;
Figure 12
<span class="h3"><a class="selflink" id="section-3.5" href="#section-3.5">3.5</a>. Selective Adaptation</span>
The HTTP profile for OCP applies to all HTTP messages. That scope
includes HTTP messages such as 1xx (Informational) responses, POST,
CONNECT, and OPTIONS requests, as well as responses with extension
status codes and requests with extension methods. Unless
specifically configured to do otherwise, an OPES processor MUST
forward all HTTP messages for adaptation at callout servers. OPES
bypass instructions, configured HTTP message handling rules, and
OCP-negotiation with a callout server are all examples of an
acceptable "specific configuration" that provides an exception to
this rule.
While it may seem useless to attempt to adapt "control" messages such
as a 100 (Continue) response, skipping such messages by default may
lead to serious security flaws and interoperability problems. For
example, sensitive company information might be relayed via a
<span class="grey">Rousskov & Stecher Standards Track [Page 14]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-15" ></span>
<span class="grey"><a href="./rfc4236">RFC 4236</a> HTTP Adaptation with OPES November 2005</span>
carefully crafted 100 Continue response; or a malicious CONNECT
request may not get logged if OPES processor does not forward these
messages to a callout service that is supposed to handle them.
By design, OPES processor implementation cannot unilaterally decide
that an HTTP message is not worth adapting. It needs a callout
server opinion, a configuration setting, or another external
information to make the decision.
<span class="h3"><a class="selflink" id="section-3.6" href="#section-3.6">3.6</a>. Hop-by-hop Headers</span>
HTTP defines several hop-by-hop headers (e.g., Connection) and allows
for extension headers to be specified as hop-by-hop ones (via the
Connection header mechanism). Depending on the environment and
configuration, an OPES processor MAY forward hop-by-hop headers to
callout servers and MAY use hop-by-hop headers returned by callout
servers to build an HTTP message for the next application hop.
However, see <a href="#section-3.7">Section 3.7</a> for requirements specific to the Transfer-
Encoding header.
For example, a logging or statistics collection service may want to
see hop-by-hop headers sent by the previous application hop to the
OPES processor and/or hop-by-hop headers sent by the OPES processor
to the next application hop. Another service may actually handle
HTTP logic of removing and adding hop-by-hop headers. Many services
will ignore hop-by-hop headers. This specification does not define a
mechanism for distinguishing these use cases.
<span class="h3"><a class="selflink" id="section-3.7" href="#section-3.7">3.7</a>. Transfer Encodings</span>
HTTP messages may use transfer encodings, a hop-by-hop encoding
feature of HTTP. Adaptations that use HTTP transfer encodings have
to be explicitly negotiated. This specification does not document
such negotiations. In the absence of explicit transfer-encoding
negotiations, an OCP agent MUST NOT send transfer-encoded application
message bodies.
Informally, the above rule means that the agent or its environment
have to make sure that all transfer encodings are stripped from an
HTTP message body before it enters OCP scope. An agent MUST
terminate the OCP transaction if it has to send an application
message body but cannot remove all transfer encodings. Violations of
these rules lead to interoperability problems.
If an OCP agent receives transfer-encoded application data in
violation of the above requirement, the agent MAY terminate the
corresponding OCP transaction.
<span class="grey">Rousskov & Stecher Standards Track [Page 15]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-16" ></span>
<span class="grey"><a href="./rfc4236">RFC 4236</a> HTTP Adaptation with OPES November 2005</span>
An OPES processor removing transfer encodings MUST remove the
Transfer-Encoding header before sending the header part to the
callout service. A callout server receiving a Transfer-Encoding
header MAY assume that original application data is still transfer-
encoded (and terminate the transaction). The OPES processor MUST
send a correct Transfer-Encoding header to the next HTTP recipient,
independent of what header (if any) the callout server returned.
Logging and wiretapping are the examples where negotiating acceptable
transfer encodings may be worthwhile. While a callout server may not
be able to strip an encoding, it may still want to log the entire
message "as is". In most cases, however, the callout server would
not be able to meaningfully handle unknown transfer encodings.
<span class="h3"><a class="selflink" id="section-3.8" href="#section-3.8">3.8</a>. HTTP Header Correctness</span>
When communicating with HTTP applications, OPES processors MUST
ensure correctness of all computable HTTP headers documented in
specifications that the processors intend to be compliant with. A
computable header is defined as a header whose value can be computed
based on the message body alone. For example, the correctness of
Content-Length and Content-MD5 headers has to be ensured by
processors claiming compliance with HTTP/1.1 ([<a href="./rfc2616" title=""Hypertext Transfer Protocol -- HTTP/1.1"">RFC2616</a>]).
Informally and by default, the OPES processor has to validate and
eventually recalculate, add, or remove computable HTTP headers in
order to build a compliant HTTP message from an adapted application
message returned by the callout server. If a particular OPES
processor trusts certain HTTP headers that a callout service sends,
it can use those headers "as is".
An OPES processor MAY forward a partially adapted HTTP message from a
callout server to the next callout server, without verifying HTTP
header correctness. Consequently, a callout service cannot assume
that the HTTP headers it receives are correct or final from an HTTP
point of view.
The following subsections present guidelines for the recalculation of
some HTTP headers.
<span class="h4"><a class="selflink" id="section-3.8.1" href="#section-3.8.1">3.8.1</a>. Message Size Recalculation</span>
By default, an OCP agent MUST NOT trust the Content-Length header
that is sent within an HTTP header message part. The message length
could be modified by a callout service without adaptation of the HTTP
message headers.
<span class="grey">Rousskov & Stecher Standards Track [Page 16]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-17" ></span>
<span class="grey"><a href="./rfc4236">RFC 4236</a> HTTP Adaptation with OPES November 2005</span>
Before sending the HTTP message to the HTTP peer, the OPES processor
has to ensure correctness of the message length indication according
to <a href="./rfc2616#section-4.4">section 4.4 of [RFC2616]</a>.
Besides ensuring HTTP message correctness, good OPES processors set
up the message to optimize performance, including minimizing delivery
latency. Specifically, indicating the end of a message by closing
the HTTP connection ought to be the last resort:
o If the callout server sends an AM-EL parameter with its AMS
message, the OPES processor SHOULD use this value to create a
Content-Length header to be able to keep a persistent HTTP
connection. Note that HTTP rules prohibit a Content-Length header
to be used in transfer-encoded messages.
o If AM-EL parameter or equivalent entity length information is not
available, and HTTP rules allow for chunked transfer encoding, the
OPES processor SHOULD use chunked transfer encoding. Note that
any Content-Length header has to be removed in this case.
o If the message size is not known a priori and chunked transfer
coding cannot be used, but the OPES processor can wait for the OCP
transaction to finish before forwarding the adapted HTTP message
on a persistent HTTP connection, then the processor SHOULD compute
and add a Content-Length header.
o Finally, if all optimizations are not applicable, the OPES
processor SHOULD delete any Content-Length header and forward
adapted data immediately, while indicating the message end by
closing the HTTP connection.
<span class="h4"><a class="selflink" id="section-3.8.2" href="#section-3.8.2">3.8.2</a>. Content-MD5 Header</span>
By default, the OPES processor MUST assume that the callout service
modifies the content in a way that the MD5 checksum of the message
body becomes invalid.
According to <a href="./rfc2616#section-14.15">section 14.15 of [RFC2616]</a>, HTTP intermediaries must not
generate Content-MD5 headers. A recalculation is therefore possible
only if the OPES processor is considered authoritative for the entity
being adapted. An un-authoritative OPES processor MUST remove the
Content-MD5 header unless it detects that the HTTP message was not
modified; in this case, it MAY leave the Content-MD5 header in the
message. When such detection significantly increases message
latency, deleting the Content-MD5 header may be a better option.
<span class="grey">Rousskov & Stecher Standards Track [Page 17]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-18" ></span>
<span class="grey"><a href="./rfc4236">RFC 4236</a> HTTP Adaptation with OPES November 2005</span>
<span class="h3"><a class="selflink" id="section-3.9" href="#section-3.9">3.9</a>. Examples</span>
This is a possible OCP message flow using an HTTP request profile.
An end-user wants to access the home page of
www.restricted.example.com, through the proxy, but access is denied
by a URL blocking service running on the callout server used by the
proxy.
OCP messages from the OPES processor are marked with "P:" and OCP
messages from the callout server are marked with "S:". The OCP
connection is not closed at the end but kept open for the next OCP
transaction.
Example:
P: CS;
S: CS;
P: SGC 11 ({"31:ocp-test.example.com/url-filter"});
P: NO ({"53:http://www.iana.org/assignments/opes/ocp/http/request"})
SG: 11
;
S: NR {"53:http://www.iana.org/assignments/opes/ocp/http/request"}
SG: 11
;
P: TS 55 11;
P: AMS 55
AM-EL: 0
;
P: DUM 55 0
Kept: 0
AM-Part: request-header
235:GET <a href="http://www.restricted.example.com/">http://www.restricted.example.com/</a> HTTP/1.1
Accept: */*
Accept-Language: de
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; Windows NT 5.0)
Host: www.restricted.example.com
Proxy-Connection: Keep-Alive
;
P: AME 55;
S: AMS 55;
S: DUM 55 0
AM-Part: response-header
<span class="grey">Rousskov & Stecher Standards Track [Page 18]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-19" ></span>
<span class="grey"><a href="./rfc4236">RFC 4236</a> HTTP Adaptation with OPES November 2005</span>
76:HTTP/1.1 403 Forbidden
Content-Type: text/html
Proxy-Connection: close
;
S: DUM 55 0
AM-Part: response-body
67:<html><body>You are not allowed to
access this page.</body></html>
;
S: AME 55;
P: TE 55;
S: TE 55;
Figure 13
The next example is a language translation of a small plain text file
that gets transferred in an HTTP response. In this example, OCP
agents negotiate a profile for the whole OCP connection. The OCP
connection remains open in the end of the OCP transaction. (Note
that NO and NR messages were rendered with an extra new line to
satisfy RFC formatting requirements.)
Example:
P: CS;
S: CS;
P: NO
({"54:http://www.iana.org/assignments/opes/ocp/http/response"});
S: NR
{"54:http://www.iana.org/assignments/opes/ocp/http/response"};
P: SGC 12 ({"44:ocp-test.example.com/translate?from=EN&to=DE"});
P: TS 89 12;
P: AMS 89
AM-EL: 86
;
P: DUM 89 0
AM-Part: response-header
65:HTTP/1.1 200 OK
Content-Type: text/plain
Content-Length: 86
;
P: DUM 89 65
AM-Part: response-body
<span class="grey">Rousskov & Stecher Standards Track [Page 19]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-20" ></span>
<span class="grey"><a href="./rfc4236">RFC 4236</a> HTTP Adaptation with OPES November 2005</span>
86:Whether 'tis nobler in the mind to suffer
The slings and arrows of outrageous fortune
;
P: AME 89;
S: AMS 89
AM-EL: 78
;
P: TE 89;
S: DUM 89 0
AM-Part: response-header
65:HTTP/1.1 200 OK
Content-Type: text/plain
Content-Length: 78
;
S: DUM 89 63
AM-Part: response-body
80:Ob's edler im Gemuet, die Pfeil und Schleudern
des wuetenden Geschicks erdulden
;
S: AME 89;
S: TE 89;
Figure 14
The following example shows modification of an HTML resource and
demonstrates data preservation optimization. The callout server uses
a DUY message to send back an unchanged response header part, but
because it does not know the size of the altered HTML resource at the
time it sends the AMS message, the callout server omits the AM-EL
parameter; the OPES processor is responsible for adjusting the
Content-Length header.
Example:
P: CS;
S: CS;
P: SGC 10 ({"30:ocp-test.example.com/ad-filter"});
P: NO ({"54:http://www.iana.org/assignments/opes/ocp/http/response"
Aux-Parts: (request-header,request-body)
},{"45:http://www.iana.org/assignments/opes/ocp/MIME"})
SG: 10
;
S: NR {"54:http://www.iana.org/assignments/opes/ocp/http/response"
Aux-Parts: (request-header)
Content-Encodings: (gzip)
}
<span class="grey">Rousskov & Stecher Standards Track [Page 20]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-21" ></span>
<span class="grey"><a href="./rfc4236">RFC 4236</a> HTTP Adaptation with OPES November 2005</span>
SG: 10
;
P: TS 88 10;
P: AMS 88
AM-EL: 95
;
P: DUM 88 0
AM-Part: request-header
65:GET /opes/adsample.html HTTP/1.1
Host: www.martin-stecher.de
;
P: DUM 88 65
Kept: 65 64
AM-Part: response-header
64:HTTP/1.1 200 OK
Content-Type: text/html
Content-Length: 95
;
P: DUM 88 129
Kept: 65 90
AM-Part: response-body
26:<html>
<body>
This is my
;
S: AMS 88;
P: DUM 88 155
Kept: 65 158
AM-Part: response-body
68: new ad: <img src="my_ad.gif"
width=88 height=31>
</body>
</html>
;
S: DUY 88 65 64
S: DPI 88 129 2147483647;
P: AME 88;
S: DUM 88 0
AM-Part: response-body
<span class="grey">Rousskov & Stecher Standards Track [Page 21]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-22" ></span>
<span class="grey"><a href="./rfc4236">RFC 4236</a> HTTP Adaptation with OPES November 2005</span>
52:<html>
<body>
This is my new ad:
</body>
</html>
;
S: DPI 88 129 0;
P: TE 88;
S: AME 88;
S: TE 88;
Figure 15
<span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>. Tracing</span>
[<a id="ref-RFC3897">RFC3897</a>] defines application-agnostic tracing facilities in OPES.
Compliance with this specification requires compliance with
[<a href="./rfc3897" title=""Open Pluggable Edge Services (OPES) Entities and End Points Communication"">RFC3897</a>]. When adapting HTTP, trace entries are supplied using HTTP
message headers. The following HTTP extension headers are defined to
carry trace entries. Their definitions are given using BNF notation
and elements defined in [<a href="./rfc2616" title=""Hypertext Transfer Protocol -- HTTP/1.1"">RFC2616</a>].
OPES-System = "OPES-System" ":" #trace-entry
OPES-Via = "OPES-Via" ":" #trace-entry
trace-entry = opes-agent-id *( ";" parameter )
opes-agent-id = absoluteURI
Figure 16
An OPES System MUST add its trace entry to the OPES-System header.
Other OPES agents MUST use the OPES-Via header if they add their
tracing entries. All OPES agents MUST append their entries.
Informally, OPES-System is the only required OPES tracing header
while OPES-Via provides optional tracing details; both headers
reflect the order of trace entry additions.
If an OPES-Via header is used in the original application message, an
OPES System MUST append its entry to the OPES-Via header. Otherwise,
an OPES System MAY append its entry to the OPES-Via header. If an
OPES System is using both headers, it MUST add identical trace
entries except it MAY omit some or all trace-entry parameters from
the OPES-Via header. Informally, the OPES System entries in the
OPES-Via header are used to delimit and group OPES-Via entries from
different OPES Systems without having a priory knowledge about OPES
System identifiers.
<span class="grey">Rousskov & Stecher Standards Track [Page 22]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-23" ></span>
<span class="grey"><a href="./rfc4236">RFC 4236</a> HTTP Adaptation with OPES November 2005</span>
Note that all of these headers are defined using #list constructs
and, hence, a valid HTTP message may contain multiple trace entries
per header. OPES agents SHOULD use a single header-field rather than
using multiple equally-named fields to record a long trace. Using
multiple equally-named extension header-fields is illegal from HTTP's
point of view and may not work with some of the OPES-unaware HTTP
proxies.
For example, here is an HTTP response message header after OPES
adaptations have been applied by a single OPES processor executing 10
OPES services:
Example:
HTTP/1.1 200 OK
Date: Thu, 18 Sep 2003 06:25:24 GMT
Last-Modified: Wed, 17 Sep 2003 18:24:25 GMT
Content-type: application/octet-stream
OPES-System: <a href="http://www.cdn.example.com/opes?session=ac79a749f56">http://www.cdn.example.com/opes?session=ac79a749f56</a>
OPES-Via: <a href="http://www.cdn.example.com/opes?session=ac79a749f56">http://www.cdn.example.com/opes?session=ac79a749f56</a>,
<a href="http://www.srvcs-4u.example.com/cat/?sid=123">http://www.srvcs-4u.example.com/cat/?sid=123</a>,
<a href="http://www.srvcs-4u.example.com/cat/?sid=124">http://www.srvcs-4u.example.com/cat/?sid=124</a>,
<a href="http://www.srvcs-4u.example.com/cat/?sid=125">http://www.srvcs-4u.example.com/cat/?sid=125</a> ; mode=A
Figure 17
In the above example, the OPES processor has not included its trace
entry or its trace entry was replaced by an OPES system trace entry.
Only 3 out of 10 services are traced. The remaining services did not
include their entries or their entries were removed by OPES system or
processor. The last traced service included a "mode" parameter.
Various identifiers in trace entries will probably have no meaning to
the recipient of the message, but may be decoded by OPES System
software.
OPES entities MAY place optional tracing entries in a message trailer
(i.e., entity-headers at the end of a Chunked-Body of a chunked-
encoded message), provided trailer presence does not violate HTTP
protocol. See [<a href="./rfc3897" title=""Open Pluggable Edge Services (OPES) Entities and End Points Communication"">RFC3897</a>] for a definition of what tracing entries are
optional. OPES entities MUST NOT place required tracing entries in a
message trailer.
<span class="grey">Rousskov & Stecher Standards Track [Page 23]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-24" ></span>
<span class="grey"><a href="./rfc4236">RFC 4236</a> HTTP Adaptation with OPES November 2005</span>
<span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>. Bypass</span>
An HTTP extension header is introduced to allow for OPES system
bypass as defined in [<a href="./rfc3897" title=""Open Pluggable Edge Services (OPES) Entities and End Points Communication"">RFC3897</a>].
OPES-Bypass = "OPES-Bypass" ":" ( "*" | 1#bypass-entry )
bypass-entry = opes-agent-id
Figure 18
This header can be added to HTTP requests to request OPES system
bypass for the listed OPES agents. The asterisk "*" character is
used to represent all possible OPES agents.
See [<a href="./rfc3897" title=""Open Pluggable Edge Services (OPES) Entities and End Points Communication"">RFC3897</a>] for what can be bypassed and for bypass requirements.
<span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>. IAB Considerations</span>
OPES treatment of IETF Internet Architecture Board (IAB)
considerations [<a href="./rfc3238" title=""IAB Architectural and Policy Considerations for Open Pluggable Edge Services"">RFC3238</a>] are documented in "OPES Treatment of IAB
Considerations" [<a href="./rfc3914" title=""Open Pluggable Edge Services (OPES) Treatment of IAB Considerations"">RFC3914</a>].
<span class="h2"><a class="selflink" id="section-7" href="#section-7">7</a>. Security Considerations</span>
Application-independent security considerations are documented in
application-agnostic OPES specifications. HTTP profiles do not
introduce any HTTP-specific security considerations. However, that
does not imply that HTTP adaptations are immune from security
threats.
Specific threat examples include such adaptations as rewriting the
Request-URI of an HTTP CONNECT request or removing an HTTP hop-by-hop
Upgrade header before the HTTP proxy can act on it. As with any
adaptation, the OPES agents MUST NOT perform such actions without
HTTP client or server consent.
<span class="h2"><a class="selflink" id="section-8" href="#section-8">8</a>. IANA Considerations</span>
The IANA registers request and response profile features (<a href="#section-3.2">Section</a>
<a href="#section-3.2">3.2</a>) using the registration procedure outlined in the "IANA
Considerations" Section of OCP Core [<a href="./rfc4037" title=""Open Pluggable Edge Services (OPES) Callout Protocol (OCP) Core"">RFC4037</a>]. The corresponding
"uri" parameters for the two features are:
o <a href="http://www.iana.org/assignments/opes/ocp/http/request">http://www.iana.org/assignments/opes/ocp/http/request</a>
o <a href="http://www.iana.org/assignments/opes/ocp/http/response">http://www.iana.org/assignments/opes/ocp/http/response</a>
<span class="grey">Rousskov & Stecher Standards Track [Page 24]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-25" ></span>
<span class="grey"><a href="./rfc4236">RFC 4236</a> HTTP Adaptation with OPES November 2005</span>
<span class="h2"><a class="selflink" id="section-9" href="#section-9">9</a>. Compliance</span>
Compliance with OPES mechanisms is defined in corresponding
application-agnostic specifications. HTTP profiles for these
mechanisms use corresponding compliance definitions from these
specifications, as if each profile were incorporated into the
application-agnostic specification it profiles.
<span class="h2"><a class="selflink" id="section-10" href="#section-10">10</a>. References</span>
<span class="h3"><a class="selflink" id="section-10.1" href="#section-10.1">10.1</a>. Normative References</span>
[<a id="ref-RFC2616">RFC2616</a>] Fielding, R., Gettys, J., Mogul, J., Frystyk, H.,
Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext
Transfer Protocol -- HTTP/1.1", <a href="./rfc2616">RFC 2616</a>, June 1999.
[<a id="ref-RFC3897">RFC3897</a>] Barbir, A., "Open Pluggable Edge Services (OPES) Entities
and End Points Communication", <a href="./rfc3897">RFC 3897</a>, September 2004.
[<a id="ref-RFC4037">RFC4037</a>] Rousskov, A., "Open Pluggable Edge Services (OPES) Callout
Protocol (OCP) Core", <a href="./rfc4037">RFC 4037</a>, March 2005.
<span class="h3"><a class="selflink" id="section-10.2" href="#section-10.2">10.2</a>. Informative References</span>
[<a id="ref-RFC3835">RFC3835</a>] Barbir, A., Penno, R., Chen, R., Hofmann, M., and H.
Orman, "An Architecture for Open Pluggable Edge Services
(OPES)", <a href="./rfc3835">RFC 3835</a>, August 2004.
[<a id="ref-RFC3836">RFC3836</a>] Beck, A., Hofmann, M., Orman, H., Penno, R., and A.
Terzis, "Requirements for Open Pluggable Edge Services
(OPES) Callout Protocols", <a href="./rfc3836">RFC 3836</a>, August 2004.
[<a id="ref-RFC3837">RFC3837</a>] Barbir, A., Batuner, O., Srinivas, B., Hofmann, M., and H.
Orman, "Security Threats and Risks for Open Pluggable Edge
Services (OPES)", <a href="./rfc3837">RFC 3837</a>, August 2004.
[<a id="ref-RFC3752">RFC3752</a>] Barbir, A., Burger, E., Chen, R., McHenry, S., Orman, H.,
and R. Penno, "Open Pluggable Edge Services (OPES) Use
Cases and Deployment Scenarios", <a href="./rfc3752">RFC 3752</a>, April 2004.
[<a id="ref-RFC3838">RFC3838</a>] Barbir, A., Batuner, O., Beck, A., Chan, T., and H. Orman,
"Policy, Authorization, and Enforcement Requirements of
the Open Pluggable Edge Services (OPES)", <a href="./rfc3838">RFC 3838</a>, August
2004.
[<a id="ref-rules-p">rules-p</a>] Beck, A. and A. Rousskov, "P: Message Processing
Language", work in progress, October 2003.
<span class="grey">Rousskov & Stecher Standards Track [Page 25]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-26" ></span>
<span class="grey"><a href="./rfc4236">RFC 4236</a> HTTP Adaptation with OPES November 2005</span>
[<a id="ref-RFC3914">RFC3914</a>] Barbir, A. and A. Rousskov, "Open Pluggable Edge Services
(OPES) Treatment of IAB Considerations", <a href="./rfc3914">RFC 3914</a>, October
2004.
[<a id="ref-RFC3238">RFC3238</a>] Floyd, S. and L. Daigle, "IAB Architectural and Policy
Considerations for Open Pluggable Edge Services", <a href="./rfc3238">RFC</a>
<a href="./rfc3238">3238</a>, January 2002.
Acknowledgements
The authors gratefully acknowledge the contributions of Robert
Collins (Syncretize) and Larry Masinter (Adobe). Larry Masinter
provided an early review of this document.
Authors' Addresses
Alex Rousskov
The Measurement Factory
EMail: rousskov@measurement-factory.com
URI: <a href="http://www.measurement-factory.com/">http://www.measurement-factory.com/</a>
Martin Stecher
CyberGuard Corporation
Vattmannstr. 3
Paderborn 33100
DE
EMail: martin.stecher@webwasher.com
URI: <a href="http://www.webwasher.com/">http://www.webwasher.com/</a>
<span class="grey">Rousskov & Stecher Standards Track [Page 26]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-27" ></span>
<span class="grey"><a href="./rfc4236">RFC 4236</a> HTTP Adaptation with OPES November 2005</span>
Full Copyright Statement
Copyright (C) The Internet Society (2005).
This document is subject to the rights, licenses and restrictions
contained in <a href="https://www.rfc-editor.org/bcp/bcp78">BCP 78</a>, and except as set forth therein, the authors
retain all their rights.
This document and the information contained herein are provided on an
"AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET
ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Intellectual Property
The IETF takes no position regarding the validity or scope of any
Intellectual Property Rights or other rights that might be claimed to
pertain to the implementation or use of the technology described in
this document or the extent to which any license under such rights
might or might not be available; nor does it represent that it has
made any independent effort to identify any such rights. Information
on the procedures with respect to rights in RFC documents can be
found in <a href="https://www.rfc-editor.org/bcp/bcp78">BCP 78</a> and <a href="https://www.rfc-editor.org/bcp/bcp79">BCP 79</a>.
Copies of IPR disclosures made to the IETF Secretariat and any
assurances of licenses to be made available, or the result of an
attempt made to obtain a general license or permission for the use of
such proprietary rights by implementers or users of this
specification can be obtained from the IETF on-line IPR repository at
<a href="http://www.ietf.org/ipr">http://www.ietf.org/ipr</a>.
The IETF invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary
rights that may cover technology that may be required to implement
this standard. Please address the information to the IETF at ietf-
ipr@ietf.org.
Acknowledgement
Funding for the RFC Editor function is currently provided by the
Internet Society.
Rousskov & Stecher Standards Track [Page 27]
</pre>
|