You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by bu...@apache.org on 2012/10/13 23:44:07 UTC

svn commit: r835014 - in /websites/staging/trafficserver/trunk: cgi-bin/ content/ content/tools/ content/tools/via.html

Author: buildbot
Date: Sat Oct 13 21:44:06 2012
New Revision: 835014

Log:
Staging update by buildbot for tserver

Added:
    websites/staging/trafficserver/trunk/content/tools/
    websites/staging/trafficserver/trunk/content/tools/via.html
Modified:
    websites/staging/trafficserver/trunk/cgi-bin/   (props changed)
    websites/staging/trafficserver/trunk/content/   (props changed)

Propchange: websites/staging/trafficserver/trunk/cgi-bin/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Sat Oct 13 21:44:06 2012
@@ -1 +1 @@
-1396445
+1397954

Propchange: websites/staging/trafficserver/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Sat Oct 13 21:44:06 2012
@@ -1 +1 @@
-1396445
+1397954

Added: websites/staging/trafficserver/trunk/content/tools/via.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/tools/via.html (added)
+++ websites/staging/trafficserver/trunk/content/tools/via.html Sat Oct 13 21:44:06 2012
@@ -0,0 +1,148 @@
+<html>
+<title>VIA decoder</title>
+<body>
+<script type="text/javascript">
+var codes = {}
+codes[1] = {}
+codes[1]['title'] = "client-info Request headers received from client. Value is one of:"
+codes[1]['I'] = "If Modified Since (IMS)"
+codes[1]['C'] = "cookie"
+codes[1]['E'] = "error in request"
+codes[1]['S'] = "simple request (not conditional)"
+codes[1]['N'] = "no-cache"
+codes[2] = {}
+codes[2]['title'] = "cache-lookup Result of Traffic Server cache lookup for URL. Value is one of:"
+codes[2]['A'] = "in cache, not acceptable (a cache \"MISS\")"
+codes[2]['H'] = "in cache, fresh (a cache \"HIT\")"
+codes[2]['S'] = "in cache, stale (a cache \"MISS\")"
+codes[2]['R'] = "in cache, fresh Ram hit (a cache \"HIT\")"
+codes[2]['M'] = "miss (a cache \"MISS\")"
+codes[2][' '] = "no cache lookup performed"
+codes[3] = {}
+codes[3]['title'] = "server-info Response information received from origin server. Value is one of:"
+codes[3]['E'] = "error in response"
+codes[3][' '] = "no server connection needed"
+codes[3]['S'] = "served"
+codes[3]['N'] = "not-modified"
+codes[4] = {}
+codes[4]['title'] = "cache-fill Result of document write to cache. Value is one of:"
+codes[4]['U'] = "updated old cache copy"
+codes[4]['D'] = "cached copy deleted"
+codes[4]['W'] = "written into cache (new copy)"
+codes[4][' '] = "no cache write performed"
+codes[5] = {}
+codes[5]['title'] = "proxy-info Proxy operation result. Value is one of:"
+codes[5]['R'] = "origin server revalidated"
+codes[5][' '] = "unknown?"
+codes[5]['S'] = "served"
+codes[5]['N'] = "not-modified"
+codes[6] = {}
+codes[6]['title'] = "error-codes Value is one of:"
+codes[6]['A'] = "authorization failure"
+codes[6]['H'] = "header syntax unacceptable"
+codes[6]['C'] = "connection to server failed"
+codes[6]['T'] = "connection timed out"
+codes[6]['S'] = "server related error"
+codes[6]['D'] = "dns failure"
+codes[6]['N'] = "no error"
+codes[6]['F'] = "request forbidden"
+codes[7] = {}
+codes[7]['title'] = "tunnel-info Proxy-only service operation. Value is one of:"
+codes[7][' '] = "no tunneling"
+codes[7]['U'] = "tunneling because of url (url suggests dynamic content)"
+codes[7]['M'] = "tunneling due to a method (e.g. CONNECT)"
+codes[7]['O'] = "tunneling because cache is turned off"
+codes[7]['F'] = "tunneling due to a header field (such as presence of If-Range header)"
+codes[8] = {}
+codes[8]['title'] = "cache-type and cache-lookup cache result values (2 characters)"
+codes[8]['I'] = "icp"
+codes[8][' '] = "cache miss or no cache lookup"
+codes[8]['C'] = "cache"
+codes[9] = {}
+codes[9]['title'] = "cache-lookup-result character value is one of:"
+codes[9][' '] = "no cache lookup"
+codes[9]['S'] = "cache hit, but expired"
+codes[9]['U'] = "cache hit, but client forces revalidate (e.g. Pragma: no-cache)"
+codes[9]['D'] = "cache hit, but method forces revalidated (e.g. ftp, not anonymous)"
+codes[9]['I'] = "conditional miss (client sent conditional, fresh in cache, returned 412)"
+codes[9]['H'] = "cache hit"
+codes[9]['M'] = "cache miss (url not in cache)"
+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]['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]['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"
+
+/*
+ pieces[1].values[pre:sub(2,2)],
+        pieces[2].values[pre:sub(4,4)],
+        pieces[3].values[pre:sub(6,6)],
+        pieces[4].values[pre:sub(8,8)],
+        pieces[5].values[pre:sub(10,10)],
+        pieces[6].values[pre:sub(12,12)],
+
+        pieces[7].values[post:sub(2,2)],
+        pieces[8].values[post:sub(4,4)],
+        pieces[9].values[post:sub(5,5)],
+        pieces[10].values[post:sub(7,7)],
+        pieces[11].values[post:sub(9,9)],
+        pieces[11].values[post:sub(11,11)]
+*/
+function showVia(form) {
+    var text = form.via.value;
+    var via = document.getElementById("via")
+    var output = "";
+    if (text.length == 24) {
+        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/>';
+        output = output + '<div style="width: 450px; font-weight: bold; float: left;">Result of Traffic Server cache lookup for URL:</div> <font color="#003399">' + codes[2][arr[1][3]] + '</font><br/>';
+        output = output + '<div style="width: 450px; font-weight: bold; float: left;">Response information received from origin server:</div> <font color="#003399">' + codes[3][arr[1][5]] + '</font><br/>';
+        output = output + '<div style="width: 450px; font-weight: bold; float: left;">Result of document write-to-cache:</div> <font color="#003399">' + codes[4][arr[1][7]] + '</font><br/>';
+        output = output + '<div style="width: 450px; font-weight: bold; float: left;">Proxy operation result:</div> <font color="#003399">' + codes[5][arr[1][9]] + '</font><br/>';
+        output = output + '<div style="width: 450px; font-weight: bold; float: left;">Error codes (if any):</div> <font color="#003399">' + codes[6][arr[1][11]] + '</font><br/>';
+
+        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/>';
+
+    } else if (text.length == 6) {
+        output = output + "<h3>Proxy request results:</h3>";
+        output = output + '<div style="width: 450px; font-weight: bold; float: left;">Result of Traffic Server cache lookup for URL:</div> <font color="#003399">' + codes[2][text[1]] + '</font><br/>';
+        output = output + '<div style="width: 450px; font-weight: bold; float: left;">Response information received from origin server:</div> <font color="#003399">' + codes[3][text[3]] + '</font><br/>';
+        output = output + '<div style="width: 450px; font-weight: bold; float: left;">Result of document write-to-cache:</div> <font color="#003399">' + codes[4][text[5]] + '</font><br/>';
+
+
+    } else {
+        output = "Invalid VIA data";
+    }
+    via.innerHTML = output
+}
+</script>
+
+<form>
+<h2>Via header parser</h2>
+Enter your Via header into the box below to parse it:<br/>
+<input type="text" name="via" size="20"/><input type="button" onclick="showVia(this.form)" value="Parse"/>
+</form>
+
+<div id="via">
+</div>
+</body>
+
+</html>