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 f22d35fba0 Removes the Matrix parameters from Cripts (#11569)
f22d35fba0 is described below
commit f22d35fba0686212705dfaf01899b0cbedda3cb8
Author: Leif Hedstrom <[email protected]>
AuthorDate: Thu Jul 18 21:40:18 2024 -0600
Removes the Matrix parameters from Cripts (#11569)
---
doc/developer-guide/cripts/cripts-urls.en.rst | 1 -
include/cripts/Urls.hpp | 31 +--------------------------
src/cripts/Urls.cc | 27 -----------------------
3 files changed, 1 insertion(+), 58 deletions(-)
diff --git a/doc/developer-guide/cripts/cripts-urls.en.rst
b/doc/developer-guide/cripts/cripts-urls.en.rst
index 5666e2c3db..07a0678290 100644
--- a/doc/developer-guide/cripts/cripts-urls.en.rst
+++ b/doc/developer-guide/cripts/cripts-urls.en.rst
@@ -75,7 +75,6 @@ Component Description
``port`` The port number, this is an integer value.
``path`` The path.
``query`` The query parameters.
-``matrix`` The matrix parameters: Note: This is currently treated as a
single string.
===============
=================================================================================
.. note::
diff --git a/include/cripts/Urls.hpp b/include/cripts/Urls.hpp
index cd034bb2e2..d4a41dad21 100644
--- a/include/cripts/Urls.hpp
+++ b/include/cripts/Urls.hpp
@@ -522,21 +522,8 @@ public:
}; // End class Url::Query
- class Matrix : public Component
- {
- using super_type = Component;
- using self_type = Matrix;
-
- public:
- using Component::Component;
-
- Cript::string_view GetSV() override;
- self_type operator=(Cript::string_view matrix);
-
- }; // End class Url::Matrix
-
public:
- Url() : scheme(this), host(this), port(this), path(this), query(this),
matrix(this) {}
+ Url() : scheme(this), host(this), port(this), path(this), query(this) {}
// Clear anything "cached" in the Url, this is rather draconian, but it's
safe...
virtual void
@@ -585,7 +572,6 @@ public:
Port port;
Path path;
Query query;
- Matrix matrix;
protected:
void
@@ -895,19 +881,4 @@ template <> struct formatter<Cript::Url::Query> {
}
};
-template <> struct formatter<Cript::Url::Matrix> {
- constexpr auto
- parse(format_parse_context &ctx) -> decltype(ctx.begin())
- {
- return ctx.begin();
- }
-
- template <typename FormatContext>
- auto
- format(Cript::Url::Matrix &matrix, FormatContext &ctx) -> decltype(ctx.out())
- {
- return fmt::format_to(ctx.out(), "{}", matrix.GetSV());
- }
-};
-
} // namespace fmt
diff --git a/src/cripts/Urls.cc b/src/cripts/Urls.cc
index 14d79e2d00..034376cea8 100644
--- a/src/cripts/Urls.cc
+++ b/src/cripts/Urls.cc
@@ -402,33 +402,6 @@ Cript::Url::Query::_parser()
}
}
-Cript::string_view
-Cript::Url::Matrix::GetSV()
-{
- if (_owner && _data.empty()) {
- const char *value = nullptr;
- int len = 0;
-
- value = TSUrlHttpParamsGet(_owner->_bufp, _owner->_urlp, &len);
- _data = Cript::string_view(value, len);
- _loaded = true;
- }
-
- return _data;
-}
-
-Cript::Url::Matrix
-Cript::Url::Matrix::operator=(Cript::string_view matrix)
-{
- CAssert(!_owner->ReadOnly()); // This can not be a read-only URL
- TSUrlHttpParamsSet(_owner->_bufp, _owner->_urlp, matrix.data(),
matrix.size());
- _owner->_modified = true;
- Reset();
- _loaded = false;
-
- return *this;
-}
-
Cript::string
Cript::Url::String() const
{