trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bc...@apache.org
Subject svn commit: r1859338 - /trafficserver/site/trunk/content/tools/via.html
Date Wed, 15 May 2019 22:09:10 GMT
Author: bcall
Date: Wed May 15 22:09:10 2019
New Revision: 1859338

URL: http://svn.apache.org/viewvc?rev=1859338&view=rev
Log:
Updated the Via decoder on the website to support 8.0.0 and above for the
extended via headers

Modified:
    trafficserver/site/trunk/content/tools/via.html

Modified: trafficserver/site/trunk/content/tools/via.html
URL: http://svn.apache.org/viewvc/trafficserver/site/trunk/content/tools/via.html?rev=1859338&r1=1859337&r2=1859338&view=diff
==============================================================================
--- trafficserver/site/trunk/content/tools/via.html (original)
+++ trafficserver/site/trunk/content/tools/via.html Wed May 15 22:09:10 2019
@@ -81,20 +81,15 @@ codes[9]['M'] = "cache miss (url not in
 codes[9]['C'] = "cache hit, but config forces revalidate"
 codes[9]['N'] = "conditional hit (client sent conditional, doc fresh in cache, returned 304)"
 codes[10] = {}
-codes[10]['title'] = "icp-conn-info ICP status"
-codes[10][' '] = "no icp"
+codes[10]['title'] = "parent-proxy parent proxy connection status"
+codes[10][' '] = "no parent proxy"
 codes[10]['S'] = "connection opened successfully"
 codes[10]['F'] = "connection open failed"
 codes[11] = {}
-codes[11]['title'] = "parent-proxy parent proxy connection status"
-codes[11][' '] = "no parent proxy"
+codes[11]['title'] = "server-conn-info origin server connection status"
+codes[11][' '] = "no server connection"
 codes[11]['S'] = "connection opened successfully"
 codes[11]['F'] = "connection open failed"
-codes[12] = {}
-codes[12]['title'] = "server-conn-info origin server connection status"
-codes[12][' '] = "no server connection"
-codes[12]['S'] = "connection opened successfully"
-codes[12]['F'] = "connection open failed"
 
 function showVia(form, value) {
     var text = value? value : form.via.value;
@@ -108,7 +103,7 @@ function showVia(form, value) {
     if (text.length == 5) {
         text = text + " "
     }
-    if (text.length == 24) {
+    if (text.length == 22) {
         var arr = text.match(/([a-zA-Z ]+):([a-zA-Z ]+)/);
         output = output + "<h3>Proxy request results:</h3>";
         output = output + '<div style="width: 450px; font-weight: bold; float: left;">Request
headers received from client:</div> <font color="#003399">' + codes[1][arr[1][1]]
+ '</font><br/>';
@@ -121,9 +116,8 @@ function showVia(form, value) {
         output = output + "<h3>Operational results:</h3>";
         output = output + '<div style="width: 450px; font-weight: bold; float: left;">Tunnel
info:</div> <font color="#003399">' + codes[7][arr[2][1]] + '</font><br/>';
         output = output + '<div style="width: 450px; font-weight: bold; float: left;">Cache-type
and cache-lookup cache result values:</div> <font color="#003399">' + codes[8][arr[2][3]]
+ " / " + codes[9][arr[2][4]] + '</font><br/>';
-        output = output + '<div style="width: 450px; font-weight: bold; float: left;">ICP
status:</div> <font color="#003399">' + codes[10][arr[2][6]] + '</font><br/>';
-        output = output + '<div style="width: 450px; font-weight: bold; float: left;">Parent
proxy connection status:</div> <font color="#003399">' + codes[11][arr[2][8]]
+ '</font><br/>';
-        output = output + '<div style="width: 450px; font-weight: bold; float: left;">Origin
server connection status:</div> <font color="#003399">' + codes[12][arr[2][10]]
+ '</font><br/>';
+        output = output + '<div style="width: 450px; font-weight: bold; float: left;">Parent
proxy connection status:</div> <font color="#003399">' + codes[10][arr[2][6]]
+ '</font><br/>';
+        output = output + '<div style="width: 450px; font-weight: bold; float: left;">Origin
server connection status:</div> <font color="#003399">' + codes[11][arr[2][8]]
+ '</font><br/>';
 
     } else if (text.length == 6) {
         output = output + "<h3>Proxy request results:</h3>";
@@ -133,7 +127,7 @@ function showVia(form, value) {
 
 
     } else {
-        output = "Invalid VIA data, must be 24 or 6 characters long.";
+        output = "Invalid VIA data, must be 22 or 6 characters long.";
     }
     via.innerHTML = output;
     if (form) {
@@ -195,6 +189,7 @@ function checkQuery() {
     <div class="twelvecol" style="padding: 10px;">      
         <form onsubmit="return showVia(this);">
         <h2>Via header parser</h2>
+        <b>NOTE: This tool works with ATS 8.0.0 and above for extended via headers.
</b> For earlier versions use the command line tool traffic_via.<br>
         Enter your Via header into the box below to parse it:<br/>
         <input type="text" name="via" id="via" size="20"/><input type="button" onclick="showVia(this.form)"
value="Parse header"/>
         </form>



Mime
View raw message