fix-traffic_via
authorAron Xu <aron@debian.org>
Mon, 5 Nov 2018 09:13:03 +0000 (09:13 +0000)
committerJean Baptiste Favre <debian@jbfavre.org>
Mon, 5 Nov 2018 09:13:03 +0000 (09:13 +0000)
Gbp-Pq: Name 0012-fix-traffic_via.patch

14 files changed:
src/traffic_via/tests/[u c s f p eS;tNc p s ] [deleted file]
src/traffic_via/tests/[u c s f p eS;tNc p s ] [new file with mode: 0644]
src/traffic_via/tests/[uIcRs f p eN;t cCH p s ] [deleted file]
src/traffic_via/tests/[uIcRs f p eN;t cCHp s ] [new file with mode: 0644]
src/traffic_via/tests/[uIcRs f p eN;t cCN p s ] [deleted file]
src/traffic_via/tests/[uIcRs f p eN;t cCNp s ] [new file with mode: 0644]
src/traffic_via/tests/[uScMsSf pSeN;t cCM p sS] [deleted file]
src/traffic_via/tests/[uScMsSf pSeN;t cCMp sS] [new file with mode: 0644]
src/traffic_via/tests/[uScRs f p eN;t cCH p s ] [deleted file]
src/traffic_via/tests/[uScRs f p eN;t cCHp s ] [new file with mode: 0644]
src/traffic_via/tests/long rubbish via code 2 [deleted file]
src/traffic_via/tests/long rubbish via code2 [new file with mode: 0644]
src/traffic_via/tests/rubbish
src/traffic_via/traffic_via.cc

diff --git a/src/traffic_via/tests/[u c s f p eS;tNc p s ] b/src/traffic_via/tests/[u c s f p eS;tNc p s ]
deleted file mode 100644 (file)
index f574eb2..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-Via header is [u c s f p eS;tNc   p s ], Length is 25
-Via Header Details:
-Request headers received from client                   :unknown
-Result of Traffic Server cache lookup for URL          :no cache lookup
-Response information received from origin server       :no server connection needed
-Result of document write-to-cache:                     :no cache write performed
-Proxy operation result                                 :unknown
-Error codes (if any)                                   :server related error
-Tunnel info                                            :tunneling due to no forward
-Cache Type                                             :unknown
-Cache Lookup Result                                    :cache miss or no cache lookup
-Parent proxy connection status                         :no parent proxy or unknown
-Origin server connection status                        :no server connection needed
diff --git a/src/traffic_via/tests/[u c s f p eS;tNc p s ] b/src/traffic_via/tests/[u c s f p eS;tNc p s ]
new file mode 100644 (file)
index 0000000..95cf7a7
--- /dev/null
@@ -0,0 +1,13 @@
+Via header is [u c s f p eS;tNc  p s ], Length is 24
+Via Header Details:
+Request headers received from client                   :unknown
+Result of Traffic Server cache lookup for URL          :no cache lookup
+Response information received from origin server       :no server connection needed
+Result of document write-to-cache:                     :no cache write performed
+Proxy operation result                                 :unknown
+Error codes (if any)                                   :server related error
+Tunnel info                                            :tunneling due to no forward
+Cache Type                                             :unknown
+Cache Lookup Result                                    :cache miss or no cache lookup
+Parent proxy connection status                         :no parent proxy or unknown
+Origin server connection status                        :no server connection needed
diff --git a/src/traffic_via/tests/[uIcRs f p eN;t cCH p s ] b/src/traffic_via/tests/[uIcRs f p eN;t cCH p s ]
deleted file mode 100644 (file)
index e7b4799..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-Via header is [uIcRs f p eN;t cCH p s ], Length is 25
-Via Header Details:
-Request headers received from client                   :IMS
-Result of Traffic Server cache lookup for URL          :in cache, fresh Ram hit (a cache "HIT")
-Response information received from origin server       :no server connection needed
-Result of document write-to-cache:                     :no cache write performed
-Proxy operation result                                 :unknown
-Error codes (if any)                                   :no error
-Tunnel info                                            :no tunneling
-Cache Type                                             :cache
-Cache Lookup Result                                    :cache hit
-Parent proxy connection status                         :no parent proxy or unknown
-Origin server connection status                        :no server connection needed
diff --git a/src/traffic_via/tests/[uIcRs f p eN;t cCHp s ] b/src/traffic_via/tests/[uIcRs f p eN;t cCHp s ]
new file mode 100644 (file)
index 0000000..a5f3238
--- /dev/null
@@ -0,0 +1,13 @@
+Via header is [uIcRs f p eN;t cCHp s ], Length is 24
+Via Header Details:
+Request headers received from client                   :IMS
+Result of Traffic Server cache lookup for URL          :in cache, fresh Ram hit (a cache "HIT")
+Response information received from origin server       :no server connection needed
+Result of document write-to-cache:                     :no cache write performed
+Proxy operation result                                 :unknown
+Error codes (if any)                                   :no error
+Tunnel info                                            :no tunneling
+Cache Type                                             :cache
+Cache Lookup Result                                    :cache hit
+Parent proxy connection status                         :no parent proxy or unknown
+Origin server connection status                        :no server connection needed
diff --git a/src/traffic_via/tests/[uIcRs f p eN;t cCN p s ] b/src/traffic_via/tests/[uIcRs f p eN;t cCN p s ]
deleted file mode 100644 (file)
index d3d3860..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-Via header is [uIcRs f p eN;t cCN p s ], Length is 25
-Via Header Details:
-Request headers received from client                   :IMS
-Result of Traffic Server cache lookup for URL          :in cache, fresh Ram hit (a cache "HIT")
-Response information received from origin server       :no server connection needed
-Result of document write-to-cache:                     :no cache write performed
-Proxy operation result                                 :unknown
-Error codes (if any)                                   :no error
-Tunnel info                                            :no tunneling
-Cache Type                                             :cache
-Cache Lookup Result                                    :conditional hit (client sent conditional, doc fresh in cache, returned 304)
-Parent proxy connection status                         :no parent proxy or unknown
-Origin server connection status                        :no server connection needed
diff --git a/src/traffic_via/tests/[uIcRs f p eN;t cCNp s ] b/src/traffic_via/tests/[uIcRs f p eN;t cCNp s ]
new file mode 100644 (file)
index 0000000..6af0055
--- /dev/null
@@ -0,0 +1,13 @@
+Via header is [uIcRs f p eN;t cCNp s ], Length is 24
+Via Header Details:
+Request headers received from client                   :IMS
+Result of Traffic Server cache lookup for URL          :in cache, fresh Ram hit (a cache "HIT")
+Response information received from origin server       :no server connection needed
+Result of document write-to-cache:                     :no cache write performed
+Proxy operation result                                 :unknown
+Error codes (if any)                                   :no error
+Tunnel info                                            :no tunneling
+Cache Type                                             :cache
+Cache Lookup Result                                    :conditional hit (client sent conditional, doc fresh in cache, returned 304)
+Parent proxy connection status                         :no parent proxy or unknown
+Origin server connection status                        :no server connection needed
diff --git a/src/traffic_via/tests/[uScMsSf pSeN;t cCM p sS] b/src/traffic_via/tests/[uScMsSf pSeN;t cCM p sS]
deleted file mode 100644 (file)
index e4bee74..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-Via header is [uScMsSf pSeN;t cCM p sS], Length is 25
-Via Header Details:
-Request headers received from client                   :simple request (not conditional)
-Result of Traffic Server cache lookup for URL          :miss (a cache "MISS")
-Response information received from origin server       :connection opened successfully
-Result of document write-to-cache:                     :no cache write performed
-Proxy operation result                                 :served or connection opened successfully
-Error codes (if any)                                   :no error
-Tunnel info                                            :no tunneling
-Cache Type                                             :cache
-Cache Lookup Result                                    :cache miss (url not in cache)
-Parent proxy connection status                         :no parent proxy or unknown
-Origin server connection status                        :connection opened successfully
diff --git a/src/traffic_via/tests/[uScMsSf pSeN;t cCMp sS] b/src/traffic_via/tests/[uScMsSf pSeN;t cCMp sS]
new file mode 100644 (file)
index 0000000..1e494c6
--- /dev/null
@@ -0,0 +1,13 @@
+Via header is [uScMsSf pSeN;t cCMp sS], Length is 24
+Via Header Details:
+Request headers received from client                   :simple request (not conditional)
+Result of Traffic Server cache lookup for URL          :miss (a cache "MISS")
+Response information received from origin server       :connection opened successfully
+Result of document write-to-cache:                     :no cache write performed
+Proxy operation result                                 :served or connection opened successfully
+Error codes (if any)                                   :no error
+Tunnel info                                            :no tunneling
+Cache Type                                             :cache
+Cache Lookup Result                                    :cache miss (url not in cache)
+Parent proxy connection status                         :no parent proxy or unknown
+Origin server connection status                        :connection opened successfully
diff --git a/src/traffic_via/tests/[uScRs f p eN;t cCH p s ] b/src/traffic_via/tests/[uScRs f p eN;t cCH p s ]
deleted file mode 100644 (file)
index e587c1a..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-Via header is [uScRs f p eN;t cCH p s ], Length is 25
-Via Header Details:
-Request headers received from client                   :simple request (not conditional)
-Result of Traffic Server cache lookup for URL          :in cache, fresh Ram hit (a cache "HIT")
-Response information received from origin server       :no server connection needed
-Result of document write-to-cache:                     :no cache write performed
-Proxy operation result                                 :unknown
-Error codes (if any)                                   :no error
-Tunnel info                                            :no tunneling
-Cache Type                                             :cache
-Cache Lookup Result                                    :cache hit
-Parent proxy connection status                         :no parent proxy or unknown
-Origin server connection status                        :no server connection needed
diff --git a/src/traffic_via/tests/[uScRs f p eN;t cCHp s ] b/src/traffic_via/tests/[uScRs f p eN;t cCHp s ]
new file mode 100644 (file)
index 0000000..d7d394c
--- /dev/null
@@ -0,0 +1,13 @@
+Via header is [uScRs f p eN;t cCHp s ], Length is 24
+Via Header Details:
+Request headers received from client                   :simple request (not conditional)
+Result of Traffic Server cache lookup for URL          :in cache, fresh Ram hit (a cache "HIT")
+Response information received from origin server       :no server connection needed
+Result of document write-to-cache:                     :no cache write performed
+Proxy operation result                                 :unknown
+Error codes (if any)                                   :no error
+Tunnel info                                            :no tunneling
+Cache Type                                             :cache
+Cache Lookup Result                                    :cache hit
+Parent proxy connection status                         :no parent proxy or unknown
+Origin server connection status                        :no server connection needed
diff --git a/src/traffic_via/tests/long rubbish via code 2 b/src/traffic_via/tests/long rubbish via code 2
deleted file mode 100644 (file)
index b8f47ef..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-traffic_via: Invalid VIA header character: l
-traffic_via: Invalid VIA header character: o
-traffic_via: Invalid VIA header character: n
-traffic_via: Invalid VIA header character: g
-traffic_via: Invalid VIA header character: r
-traffic_via: Invalid VIA header character: b
-traffic_via: Invalid VIA header character: b
-traffic_via: Invalid VIA header character: i
-traffic_via: Invalid VIA header character: h
-traffic_via: Invalid VIA header character: v
-traffic_via: Invalid VIA header character: i
-traffic_via: Invalid VIA header character: a
-traffic_via: Invalid VIA header character: o
-traffic_via: Invalid VIA header character: d
-Via header is long rubbish via code 2, Length is 23
-Via Header Details:
-Error codes (if any)                                   :unknown
diff --git a/src/traffic_via/tests/long rubbish via code2 b/src/traffic_via/tests/long rubbish via code2
new file mode 100644 (file)
index 0000000..d3abd3d
--- /dev/null
@@ -0,0 +1,17 @@
+traffic_via: Invalid VIA header character: l
+traffic_via: Invalid VIA header character: o
+traffic_via: Invalid VIA header character: n
+traffic_via: Invalid VIA header character: g
+traffic_via: Invalid VIA header character: r
+traffic_via: Invalid VIA header character: b
+traffic_via: Invalid VIA header character: b
+traffic_via: Invalid VIA header character: i
+traffic_via: Invalid VIA header character: h
+traffic_via: Invalid VIA header character: v
+traffic_via: Invalid VIA header character: i
+traffic_via: Invalid VIA header character: a
+traffic_via: Invalid VIA header character: o
+traffic_via: Invalid VIA header character: d
+Via header is long rubbish via code2, Length is 22
+Via Header Details:
+Error codes (if any)                                   :Invalid sequence
index 51066c11576dbea63a7280713bd41521f51556da..348f372e606d6c3210351e8011a3746eb50873a4 100644 (file)
@@ -1,4 +1,4 @@
 Via header is rubbish, Length is 7
 
-Invalid VIA header. VIA header length should be 6 or 23 characters
+Invalid VIA header. VIA header length should be 6 or 22 characters
 Valid via header format is [u<client-stuff>c<cache-lookup-stuff>s<server-stuff>f<cache-fill-stuff>p<proxy-stuff>e<error-codes>:t<tunneling-info>c<cache type><cache-lookup-result>p<parent-proxy-conn-info>s<server-conn-info>]
index db55da36284750fe4f6ce8a94706406a79f42e89..b755f2c6916fb729e613ee7d1ed82ee9833b668c 100644 (file)
@@ -238,13 +238,13 @@ decodeViaHeader(const char *str)
     ++viaHdrLength;
   }
 
-  if (viaHdrLength == 23 || viaHdrLength == 6) {
+  if (viaHdrLength == 22 || viaHdrLength == 6) {
     // Decode via header
     printViaHeader(Via);
     return TS_ERR_OKAY;
   }
   // Invalid header size, come out.
-  printf("\nInvalid VIA header. VIA header length should be 6 or 23 characters\n");
+  printf("\nInvalid VIA header. VIA header length should be 6 or 22 characters\n");
   printf("Valid via header format is "
          "[u<client-stuff>c<cache-lookup-stuff>s<server-stuff>f<cache-fill-stuff>p<proxy-stuff>e<error-codes>:t<tunneling-info>c<"
          "cache type><cache-lookup-result>p<parent-proxy-conn-info>s<server-conn-info>]\n");