trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zw...@apache.org
Subject [trafficserver] 07/07: Add autest for cache_range_request, add xdebug x-parentselection-key
Date Tue, 10 Dec 2019 23:02:33 GMT
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit f8f3f208df2a96c78de09c8d1fa7b8d0f83dcc41
Author: Brian Olsen <brian_olsen2@comcast.com>
AuthorDate: Wed Nov 13 22:07:38 2019 +0000

    Add autest for cache_range_request, add xdebug x-parentselection-key
    
    (cherry picked from commit 83738c69b9df4b134f20da4abb656c78049318f3)
---
 doc/admin-guide/plugins/xdebug.en.rst              |   6 +
 plugins/xdebug/xdebug.cc                           |  55 ++++
 .../cache_range_requests.test.py                   | 340 +++++++++++++++++++++
 .../cache_range_requests/gold/404.stdout.gold      |   8 +
 .../cache_range_requests/gold/frange.stderr.gold   |   1 +
 .../cache_range_requests/gold/frange.stdout.gold   |  11 +
 .../cache_range_requests/gold/full.stderr.gold     |   1 +
 .../cache_range_requests/gold/full.stdout.gold     |   9 +
 .../cache_range_requests/gold/inner.stderr.gold    |   1 +
 .../cache_range_requests/gold/inner.stdout.gold    |  11 +
 .../cache_range_requests/gold/last.stderr.gold     |   1 +
 .../cache_range_requests/gold/last.stdout.gold     |  11 +
 .../cache_range_requests/gold/pselect.stdout.gold  |  11 +
 .../gold/pselect_none.stdout.gold                  |  10 +
 14 files changed, 476 insertions(+)

diff --git a/doc/admin-guide/plugins/xdebug.en.rst b/doc/admin-guide/plugins/xdebug.en.rst
index bb5f376..16e358d 100644
--- a/doc/admin-guide/plugins/xdebug.en.rst
+++ b/doc/admin-guide/plugins/xdebug.en.rst
@@ -109,3 +109,9 @@ X-Transaction-ID
 X-Remap
     If the URL was remapped for a request, this header gives the *to* and *from* field from
the line in remap.config that caused
     the URL to be remapped.
+
+X-ParentSelection-Key
+    The ``X-ParentSelection-Key`` header contains the URL that is used to
+    determine parent selection for an object in the Traffic Server. This
+    header is particularly useful if a custom parent selection key is
+    being used.
diff --git a/plugins/xdebug/xdebug.cc b/plugins/xdebug/xdebug.cc
index 1b6d877..a3a2443 100644
--- a/plugins/xdebug/xdebug.cc
+++ b/plugins/xdebug/xdebug.cc
@@ -50,6 +50,7 @@ enum {
   XHEADER_X_DUMP_HEADERS   = 1u << 7,
   XHEADER_X_REMAP          = 1u << 8,
   XHEADER_X_PROBE_HEADERS  = 1u << 9,
+  XHEADER_X_PSELECT_KEY    = 1u << 10,
 };
 
 static int XArgIndex              = 0;
@@ -325,6 +326,53 @@ InjectTxnUuidHeader(TSHttpTxn txn, TSMBuffer buffer, TSMLoc hdr)
   }
 }
 
+static void
+InjectParentSelectionKeyHeader(TSHttpTxn txn, TSMBuffer buffer, TSMLoc hdr)
+{
+  TSMLoc url = TS_NULL_MLOC;
+  TSMLoc dst = TS_NULL_MLOC;
+
+  struct {
+    char *ptr;
+    int len;
+  } strval = {nullptr, 0};
+
+  TSDebug("xdebug", "attempting to inject X-ParentSelection-Key header");
+
+  if (TSUrlCreate(buffer, &url) != TS_SUCCESS) {
+    goto done;
+  }
+
+  if (TSHttpTxnParentSelectionUrlGet(txn, buffer, url) != TS_SUCCESS) {
+    goto done;
+  }
+
+  strval.ptr = TSUrlStringGet(buffer, url, &strval.len);
+  if (strval.ptr == nullptr || strval.len == 0) {
+    goto done;
+  }
+
+  // Create a new response header field.
+  dst = FindOrMakeHdrField(buffer, hdr, "X-ParentSelection-Key", lengthof("X-ParentSelection-Key"));
+  if (dst == TS_NULL_MLOC) {
+    goto done;
+  }
+
+  // Now copy the parent selection lookup URL into the response header.
+  TSReleaseAssert(TSMimeHdrFieldValueStringInsert(buffer, hdr, dst, 0 /* idx */, strval.ptr,
strval.len) == TS_SUCCESS);
+
+done:
+  if (dst != TS_NULL_MLOC) {
+    TSHandleMLocRelease(buffer, hdr, dst);
+  }
+
+  if (url != TS_NULL_MLOC) {
+    TSHandleMLocRelease(buffer, TS_NULL_MLOC, url);
+  }
+
+  TSfree(strval.ptr);
+}
+
 static int
 XInjectResponseHeaders(TSCont /* contp */, TSEvent event, void *edata)
 {
@@ -384,6 +432,10 @@ XInjectResponseHeaders(TSCont /* contp */, TSEvent event, void *edata)
     writePostBody(data);
   }
 
+  if (xheaders & XHEADER_X_PSELECT_KEY) {
+    InjectParentSelectionKeyHeader(txn, buffer, hdr);
+  }
+
 done:
   TSHttpTxnReenable(txn, TS_EVENT_HTTP_CONTINUE);
   return TS_EVENT_NONE;
@@ -525,6 +577,9 @@ XScanRequestHeaders(TSCont /* contp */, TSEvent event, void *edata)
         TSHttpTxnTransformedRespCache(txn, 0);
         TSHttpTxnUntransformedRespCache(txn, 0);
 
+      } else if (header_field_eq("x-parentselection-key", value, vsize)) {
+        xheaders |= XHEADER_X_PSELECT_KEY;
+
       } else if (isFwdFieldValue(std::string_view(value, vsize), fwdCnt)) {
         if (fwdCnt > 0) {
           // Decrement forward count in X-Debug header.
diff --git a/tests/gold_tests/pluginTest/cache_range_requests/cache_range_requests.test.py
b/tests/gold_tests/pluginTest/cache_range_requests/cache_range_requests.test.py
new file mode 100644
index 0000000..49aaf6e
--- /dev/null
+++ b/tests/gold_tests/pluginTest/cache_range_requests/cache_range_requests.test.py
@@ -0,0 +1,340 @@
+'''
+'''
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+
+import os
+
+Test.Summary = '''
+Basic cache_range_requests plugin test
+'''
+
+## Test description:
+# Preload the cache with the entire asset to be range requested.
+# Reload remap rule with cache_range_requests plugin
+# Request content through the cache_range_requests plugin
+
+Test.SkipUnless(
+    Condition.PluginExists('cache_range_requests.so'),
+    Condition.PluginExists('xdebug.so'),
+)
+Test.ContinueOnFail = False
+Test.testName = "cache_range_requests"
+
+# Define and configure ATS
+ts = Test.MakeATSProcess("ts", command="traffic_server")
+
+# Define and configure origin server
+server = Test.MakeOriginServer("server", lookup_key="{%uuid}")
+
+# default root
+req_chk = {"headers":
+  "GET / HTTP/1.1\r\n" +
+  "Host: www.example.com\r\n" +
+  "uuid: none\r\n" +
+  "\r\n",
+  "timestamp": "1469733493.993",
+  "body": ""
+}
+
+res_chk = {"headers":
+  "HTTP/1.1 200 OK\r\n" +
+  "Connection: close\r\n" +
+  "\r\n",
+  "timestamp": "1469733493.993",
+  "body": ""
+}
+
+server.addResponse("sessionlog.json", req_chk, res_chk)
+
+body = "lets go surfin now"
+
+req_full = {"headers":
+  "GET /path HTTP/1.1\r\n" +
+  "Host: www.example.com\r\n" +
+  "Accept: */*\r\n" +
+  "uuid: full\r\n" +
+  "\r\n",
+  "timestamp": "1469733493.993",
+  "body": ""
+}
+
+res_full = {"headers":
+  "HTTP/1.1 200 OK\r\n" +
+  "Cache-Control: max-age=500\r\n" +
+  "Connection: close\r\n" +
+  'Etag: "772102f4-56f4bc1e6d417"\r\n' +
+  "Last-Modified: Sat, 23 Jun 2018 09:27:29 GMT\r\n" +
+  "\r\n",
+  "timestamp": "1469733493.993",
+  "body": body
+}
+
+server.addResponse("sessionlog.json", req_full, res_full)
+
+block_bytes = 7
+bodylen = len(body)
+
+inner_str = "7-15"
+
+req_inner = {"headers":
+  "GET /path HTTP/1.1\r\n" +
+  "Host: www.example.com\r\n" +
+  "Accept: */*\r\n" +
+  "Range: bytes={}\r\n".format(inner_str) +
+  "uuid: inner\r\n" +
+  "\r\n",
+  "timestamp": "1469733493.993",
+  "body": ""
+}
+
+res_inner = {"headers":
+  "HTTP/1.1 206 Partial Content\r\n" +
+  "Accept-Ranges: bytes\r\n" +
+  "Cache-Control: max-age=500\r\n" +
+  "Content-Range: bytes {0}/{1}\r\n".format(inner_str, bodylen) +
+  "Connection: close\r\n" +
+  'Etag: "772102f4-56f4bc1e6d417"\r\n' +
+  "Last-Modified: Sat, 23 Jun 2018 09:27:29 GMT\r\n" +
+  "\r\n",
+  "timestamp": "1469733493.993",
+  "body": body[7:15]
+}
+
+server.addResponse("sessionlog.json", req_inner, res_inner)
+
+frange_str = "0-"
+
+req_frange = {"headers":
+  "GET /path HTTP/1.1\r\n" +
+  "Host: www.example.com\r\n" +
+  "Accept: */*\r\n" +
+  "Range: bytes={}\r\n".format(frange_str) +
+  "uuid: frange\r\n" +
+  "\r\n",
+  "timestamp": "1469733493.993",
+  "body": ""
+}
+
+res_frange = {"headers":
+  "HTTP/1.1 206 Partial Content\r\n" +
+  "Accept-Ranges: bytes\r\n" +
+  "Cache-Control: max-age=500\r\n" +
+  "Content-Range: bytes 0-{0}/{0}\r\n".format(bodylen) +
+  "Connection: close\r\n" +
+  'Etag: "772102f4-56f4bc1e6d417"\r\n' +
+  "Last-Modified: Sat, 23 Jun 2018 09:27:29 GMT\r\n" +
+  "\r\n",
+  "timestamp": "1469733493.993",
+  "body": body
+}
+
+server.addResponse("sessionlog.json", req_frange, res_frange)
+
+last_str = "-5"
+
+req_last = {"headers":
+  "GET /path HTTP/1.1\r\n" +
+  "Host: www.example.com\r\n" +
+  "Accept: */*\r\n" +
+  "Range: bytes={}\r\n".format(last_str) +
+  "uuid: last\r\n" +
+  "\r\n",
+  "timestamp": "1469733493.993",
+  "body": ""
+}
+
+res_last = {"headers":
+  "HTTP/1.1 206 Partial Content\r\n" +
+  "Accept-Ranges: bytes\r\n" +
+  "Cache-Control: max-age=200\r\n" +
+  "Content-Range: bytes {0}-{1}/{1}\r\n".format(bodylen - 5, bodylen) +
+  "Connection: close\r\n" +
+  'Etag: "772102f4-56f4bc1e6d417"\r\n' +
+  "Last-Modified: Sat, 23 Jun 2018 09:27:29 GMT\r\n" +
+  "\r\n",
+  "timestamp": "1469733493.993",
+  "body": body[-5:]
+}
+
+server.addResponse("sessionlog.json", req_last, res_last)
+
+pselect_str = "1-10"
+
+req_pselect = {"headers":
+  "GET /path HTTP/1.1\r\n" +
+  "Host: parentselect\r\n" +
+  "Accept: */*\r\n" +
+  "Range: bytes={}\r\n".format(pselect_str) +
+  "uuid: pselect\r\n" +
+  "\r\n",
+  "timestamp": "1469733493.993",
+  "body": ""
+}
+
+res_pselect = {"headers":
+  "HTTP/1.1 206 Partial Content\r\n" +
+  "Accept-Ranges: bytes\r\n" +
+  "Cache-Control: max-age=200\r\n" +
+  "Content-Range: bytes {}/19\r\n".format(pselect_str) +
+  "Connection: close\r\n" +
+  'Etag: "772102f4-56f4bc1e6d417"\r\n' +
+  "Last-Modified: Sat, 23 Jun 2018 09:27:29 GMT\r\n" +
+  "\r\n",
+  "timestamp": "1469733493.993",
+  "body": body[1:10]
+}
+
+server.addResponse("sessionlog.json", req_pselect, res_pselect)
+
+# cache range requests plugin remap
+ts.Disk.remap_config.AddLines([
+  'map http://www.example.com http://127.0.0.1:{}'.format(server.Variables.Port) +
+    ' @plugin=cache_range_requests.so',
+  'map http://parentselect http://127.0.0.1:{}'.format(server.Variables.Port) +
+    ' @plugin=cache_range_requests.so @pparam=ps_mode:cache_key_url',
+])
+
+# cache debug
+ts.Disk.plugin_config.AddLine('xdebug.so')
+
+# minimal configuration
+ts.Disk.records_config.update({
+  'proxy.config.diags.debug.enabled': 1,
+  'proxy.config.diags.debug.tags': 'cache_range_requests',
+  'proxy.config.http.cache.http': 1,
+  'proxy.config.http.wait_for_cache': 1,
+})
+
+curl_and_args = 'curl -s -D /dev/stdout -o /dev/stderr -x localhost:{} -H "x-debug: x-cache"'.format(ts.Variables.port)
+
+# 0 Test - Fetch whole asset into cache
+tr = Test.AddTestRun("full asset cache miss bypass")
+ps = tr.Processes.Default
+ps.StartBefore(server, ready=When.PortOpen(server.Variables.Port))
+ps.StartBefore(Test.Processes.ts, ready=When.PortOpen(ts.Variables.port))
+ps.Command = curl_and_args + ' http://www.example.com/path -H "uuid: full"'
+ps.ReturnCode = 0
+ps.Streams.stdout = "gold/full.stdout.gold"
+ps.Streams.stderr = "gold/full.stderr.gold"
+tr.StillRunningAfter = ts
+
+# test inner range
+# 1 Test - Fetch range into cache
+tr = Test.AddTestRun("inner range cache miss")
+ps = tr.Processes.Default
+ps.Command = curl_and_args + ' http://www.example.com/path -r {} -H "uuid: inner"'.format(inner_str)
+ps.ReturnCode = 0
+ps.Streams.stdout = "gold/inner.stdout.gold"
+ps.Streams.stderr = "gold/inner.stderr.gold"
+ps.Streams.stdout.Content = Testers.ContainsExpression("X-Cache: miss", "expected cache miss")
+tr.StillRunningAfter = ts
+
+# 2 Test - Fetch from cache
+tr = Test.AddTestRun("inner range cache hit")
+ps = tr.Processes.Default
+ps.Command = curl_and_args + ' http://www.example.com/path -r {}'.format(inner_str)
+ps.ReturnCode = 0
+ps.Streams.stdout = "gold/inner.stdout.gold"
+ps.Streams.stderr = "gold/inner.stderr.gold"
+ps.Streams.stdout.Content = Testers.ContainsExpression("X-Cache: hit", "expected cache hit")
+tr.StillRunningAfter = ts
+
+# full range
+
+# 3 Test - 0- request
+tr = Test.AddTestRun("0- request miss")
+ps = tr.Processes.Default
+ps.Command = curl_and_args + ' http://www.example.com/path -r {} -H "uuid: frange"'.format(frange_str)
+ps.ReturnCode = 0
+ps.Streams.stdout = "gold/frange.stdout.gold"
+ps.Streams.stderr = "gold/frange.stderr.gold"
+ps.Streams.stdout.Content = Testers.ContainsExpression("X-Cache: miss", "expected cache miss")
+tr.StillRunningAfter = ts
+
+# 4 Test - 0- request
+tr = Test.AddTestRun("0- request hit")
+ps = tr.Processes.Default
+ps.Command = curl_and_args + ' http://www.example.com/path -r {}'.format(frange_str)
+ps.ReturnCode = 0
+ps.Streams.stdout = "gold/frange.stdout.gold"
+ps.Streams.stderr = "gold/frange.stderr.gold"
+ps.Streams.stdout.Content = Testers.ContainsExpression("X-Cache: hit", "expected cache hit")
+tr.StillRunningAfter = ts
+
+# end range
+
+# 5 Test - -5 request miss
+tr = Test.AddTestRun("-5 request miss")
+ps = tr.Processes.Default
+ps.Command = curl_and_args + ' http://www.example.com/path -r {} -H "uuid: last"'.format(last_str)
+ps.ReturnCode = 0
+ps.Streams.stdout = "gold/last.stdout.gold"
+ps.Streams.stderr = "gold/last.stderr.gold"
+ps.Streams.stdout.Content = Testers.ContainsExpression("X-Cache: miss", "expected cache miss")
+tr.StillRunningAfter = ts
+
+# 6 Test - -5 request hit
+tr = Test.AddTestRun("-5 request hit")
+ps = tr.Processes.Default
+ps.Command = curl_and_args + ' http://www.example.com/path -r {}'.format(last_str)
+ps.ReturnCode = 0
+ps.Streams.stdout = "gold/last.stdout.gold"
+ps.Streams.stderr = "gold/last.stderr.gold"
+ps.Streams.stdout.Content = Testers.ContainsExpression("X-Cache: hit", "expected cache hit")
+tr.StillRunningAfter = ts
+
+# Ensure 404's aren't getting cached
+
+# 7 Test - 404
+tr = Test.AddTestRun("404 request 1st")
+ps = tr.Processes.Default
+ps.Command = curl_and_args + ' http://www.example.com/404 -r 0-'
+ps.Streams.stdout = "gold/404.stdout.gold"
+ps.Streams.stdout.Content = Testers.ContainsExpression("X-Cache: miss", "expected cache miss")
+tr.StillRunningAfter = ts
+
+# 8 Test - 404
+tr = Test.AddTestRun("404 request 2nd")
+ps = tr.Processes.Default
+ps.Command = curl_and_args + ' http://www.example.com/404 -r 0-'
+ps.Streams.stdout = "gold/404.stdout.gold"
+ps.Streams.stdout.Content = Testers.ContainsExpression("X-Cache: miss", "expected cache miss")
+tr.StillRunningAfter = ts
+
+curl_and_args = 'curl -s -D /dev/stdout -o /dev/stderr -x localhost:{} -H "x-debug: x-parentselection-key"'.format(ts.Variables.port)
+
+# 9 Test - cache_key_url request
+tr = Test.AddTestRun("cache_key_url request")
+ps = tr.Processes.Default
+ps.Command = curl_and_args + ' http://parentselect/path -r {} -H "uuid: pselect"'.format(pselect_str)
+ps.ReturnCode = 0
+ps.Streams.stdout = "gold/pselect.stdout.gold"
+ps.Streams.stdout.Content = Testers.ContainsExpression(
+  "X-ParentSelection-Key: .*-bytes=",
+  "expected bytes in parent selection key",
+)
+tr.StillRunningAfter = ts
+tr.StillRunningAfter = server
+
+# 10 Test - non cache_key_url request ... no X-ParentSelectionKey
+tr = Test.AddTestRun("non cache_key_url request")
+ps = tr.Processes.Default
+ps.Command = curl_and_args + ' http://www.example.com/path -r {} -H "uuid: inner"'.format(inner_str)
+ps.ReturnCode = 0
+ps.Streams.stdout = "gold/pselect_none.stdout.gold"
+tr.StillRunningAfter = ts
+tr.StillRunningAfter = server
diff --git a/tests/gold_tests/pluginTest/cache_range_requests/gold/404.stdout.gold b/tests/gold_tests/pluginTest/cache_range_requests/gold/404.stdout.gold
new file mode 100644
index 0000000..f188050
--- /dev/null
+++ b/tests/gold_tests/pluginTest/cache_range_requests/gold/404.stdout.gold
@@ -0,0 +1,8 @@
+HTTP/1.1 404 Not Found
+Server: ``
+Date: ``
+Age: 0
+Transfer-Encoding: chunked
+Proxy-Connection: ``
+X-Cache: miss
+``
diff --git a/tests/gold_tests/pluginTest/cache_range_requests/gold/frange.stderr.gold b/tests/gold_tests/pluginTest/cache_range_requests/gold/frange.stderr.gold
new file mode 100644
index 0000000..24ad29c
--- /dev/null
+++ b/tests/gold_tests/pluginTest/cache_range_requests/gold/frange.stderr.gold
@@ -0,0 +1 @@
+lets go surfin now``
diff --git a/tests/gold_tests/pluginTest/cache_range_requests/gold/frange.stdout.gold b/tests/gold_tests/pluginTest/cache_range_requests/gold/frange.stdout.gold
new file mode 100644
index 0000000..6dae639
--- /dev/null
+++ b/tests/gold_tests/pluginTest/cache_range_requests/gold/frange.stdout.gold
@@ -0,0 +1,11 @@
+HTTP/1.1 206 Partial Content
+Accept-Ranges: bytes
+Cache-Control: max-age=500
+Content-Range: bytes 0-18/18
+Etag: "772102f4-56f4bc1e6d417"
+Last-Modified: Sat, 23 Jun 2018 09:27:29 GMT
+Content-Length: 18
+Date: ``
+Server: ``
+X-Cache: ``
+``
diff --git a/tests/gold_tests/pluginTest/cache_range_requests/gold/full.stderr.gold b/tests/gold_tests/pluginTest/cache_range_requests/gold/full.stderr.gold
new file mode 100644
index 0000000..24ad29c
--- /dev/null
+++ b/tests/gold_tests/pluginTest/cache_range_requests/gold/full.stderr.gold
@@ -0,0 +1 @@
+lets go surfin now``
diff --git a/tests/gold_tests/pluginTest/cache_range_requests/gold/full.stdout.gold b/tests/gold_tests/pluginTest/cache_range_requests/gold/full.stdout.gold
new file mode 100644
index 0000000..a485d26
--- /dev/null
+++ b/tests/gold_tests/pluginTest/cache_range_requests/gold/full.stdout.gold
@@ -0,0 +1,9 @@
+HTTP/1.1 200 OK
+Cache-Control: max-age=500
+Etag: "772102f4-56f4bc1e6d417"
+Last-Modified: Sat, 23 Jun 2018 09:27:29 GMT
+Content-Length: 18
+Date: ``
+Server: ``
+X-Cache: miss
+``
diff --git a/tests/gold_tests/pluginTest/cache_range_requests/gold/inner.stderr.gold b/tests/gold_tests/pluginTest/cache_range_requests/gold/inner.stderr.gold
new file mode 100644
index 0000000..1b0ef57
--- /dev/null
+++ b/tests/gold_tests/pluginTest/cache_range_requests/gold/inner.stderr.gold
@@ -0,0 +1 @@
+ surfin``
diff --git a/tests/gold_tests/pluginTest/cache_range_requests/gold/inner.stdout.gold b/tests/gold_tests/pluginTest/cache_range_requests/gold/inner.stdout.gold
new file mode 100644
index 0000000..0628bfa
--- /dev/null
+++ b/tests/gold_tests/pluginTest/cache_range_requests/gold/inner.stdout.gold
@@ -0,0 +1,11 @@
+HTTP/1.1 206 Partial Content
+Accept-Ranges: bytes
+Cache-Control: max-age=500
+Content-Range: bytes 7-15/18
+Etag: "772102f4-56f4bc1e6d417"
+Last-Modified: Sat, 23 Jun 2018 09:27:29 GMT
+Content-Length: 7
+Date: ``
+Server: ``
+X-Cache: ``
+``
diff --git a/tests/gold_tests/pluginTest/cache_range_requests/gold/last.stderr.gold b/tests/gold_tests/pluginTest/cache_range_requests/gold/last.stderr.gold
new file mode 100644
index 0000000..9e4c8c4
--- /dev/null
+++ b/tests/gold_tests/pluginTest/cache_range_requests/gold/last.stderr.gold
@@ -0,0 +1 @@
+n now``
diff --git a/tests/gold_tests/pluginTest/cache_range_requests/gold/last.stdout.gold b/tests/gold_tests/pluginTest/cache_range_requests/gold/last.stdout.gold
new file mode 100644
index 0000000..5e2da00
--- /dev/null
+++ b/tests/gold_tests/pluginTest/cache_range_requests/gold/last.stdout.gold
@@ -0,0 +1,11 @@
+HTTP/1.1 206 Partial Content
+Accept-Ranges: bytes
+Cache-Control: max-age=500
+Content-Range: bytes 12-18/18
+Etag: "772102f4-56f4bc1e6d417"
+Last-Modified: Sat, 23 Jun 2018 09:27:29 GMT
+Content-Length: 5
+Date: ``
+Server: ``
+X-Cache: ``
+``
diff --git a/tests/gold_tests/pluginTest/cache_range_requests/gold/pselect.stdout.gold b/tests/gold_tests/pluginTest/cache_range_requests/gold/pselect.stdout.gold
new file mode 100644
index 0000000..11902d7
--- /dev/null
+++ b/tests/gold_tests/pluginTest/cache_range_requests/gold/pselect.stdout.gold
@@ -0,0 +1,11 @@
+HTTP/1.1 206 Partial Content
+Accept-Ranges: bytes
+Cache-Control: max-age=500
+Content-Range: bytes 1-10/18
+Etag: "772102f4-56f4bc1e6d417"
+Last-Modified: Sat, 23 Jun 2018 09:27:29 GMT
+Content-Length: 9
+Date: ``
+Server: ``
+X-ParentSelection: ``
+``
diff --git a/tests/gold_tests/pluginTest/cache_range_requests/gold/pselect_none.stdout.gold
b/tests/gold_tests/pluginTest/cache_range_requests/gold/pselect_none.stdout.gold
new file mode 100644
index 0000000..dc9b155
--- /dev/null
+++ b/tests/gold_tests/pluginTest/cache_range_requests/gold/pselect_none.stdout.gold
@@ -0,0 +1,10 @@
+HTTP/1.1 206 Partial Content
+Accept-Ranges: bytes
+Cache-Control: ``
+Content-Range: ``
+Etag: ``
+Last-Modified: ``
+Content-Length: ``
+Date: ``
+Server: ``
+``


Mime
View raw message