Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion doc/developer-guide/cripts/cripts-urls.en.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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::
Expand Down
31 changes: 1 addition & 30 deletions include/cripts/Urls.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -522,21 +522,8 @@ class Url

}; // 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
Expand Down Expand Up @@ -585,7 +572,6 @@ class Url
Port port;
Path path;
Query query;
Matrix matrix;

protected:
void
Expand Down Expand Up @@ -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
27 changes: 0 additions & 27 deletions src/cripts/Urls.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down