This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new 552de490af Fixes some typos on Cripts docs (#12010)
552de490af is described below
commit 552de490af33da97486ab93b7eb3aed0b1f1062b
Author: Leif Hedstrom <[email protected]>
AuthorDate: Mon Feb 3 15:03:54 2025 -0700
Fixes some typos on Cripts docs (#12010)
---
doc/developer-guide/cripts/cripts-urls.en.rst | 9 +++++----
src/cripts/tests/query_test.cc | 8 ++++----
2 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/doc/developer-guide/cripts/cripts-urls.en.rst
b/doc/developer-guide/cripts/cripts-urls.en.rst
index 8fd9b623d7..2b0500ed07 100644
--- a/doc/developer-guide/cripts/cripts-urls.en.rst
+++ b/doc/developer-guide/cripts/cripts-urls.en.rst
@@ -111,6 +111,7 @@ Method / access Description
Index [] Access a specific part of the path or query.
``Size()`` Get the number of parts of the path or query.
``Erase()`` Clears the component. Also available as ``Clear()``.
+``Keep()`` Keeps only the specified parts of the path or query.
``Sort()`` Sorts the query parameters. **Note**: Only for query
parameters.
``Flush()`` Flushes any changes. This is rarely used, since Cripts
will manage flushing.
=================
===============================================================================
@@ -125,7 +126,7 @@ For example:
borrow url = cripts::Client::URL::get();
- url.query.erase("key"); // Removes the key from the query
- url.query.erase({"key1", "key2"}); // Removes both keys from the query
- url.query.erase({"key1", "key2"}, true); // Removes all keys except key1 and
key2
- url.query.keep({"key1", "key2"}); // Same as previous
+ url.query.Erase("key"); // Removes the key from the query
+ url.query.Erase({"key1", "key2"}); // Removes both keys from the query
+ url.query.Erase({"key1", "key2"}, true); // Removes all keys except key1 and
key2
+ url.query.Keep({"key1", "key2"}); // Same as previous, only keep these keys
diff --git a/src/cripts/tests/query_test.cc b/src/cripts/tests/query_test.cc
index 04bb6b1bea..8c29598201 100644
--- a/src/cripts/tests/query_test.cc
+++ b/src/cripts/tests/query_test.cc
@@ -33,19 +33,19 @@ do_remap()
switch (AsInteger(instance.data[0])) {
case 0:
- url.query.erase({"foo", "bar"}, true);
+ url.query.Erase({"foo", "bar"}, true);
break;
case 1:
- url.query.erase({"foo", "bar"});
+ url.query.Erase({"foo", "bar"});
break;
case 2:
- url.query.keep({"foo", "bar"});
+ url.query.Keep({"foo", "bar"});
break;
default:
break;
}
- url.query.flush();
+ url.query.Flush();
CDebug("Query: {}", url.query);
}