input/InputStream: add method GetUriView()

This commit is contained in:
Max Kellermann 2023-01-23 14:07:33 +01:00
parent 5ca74acd8d
commit 7e7cdf73b9
3 changed files with 6 additions and 2 deletions

View File

@ -22,7 +22,7 @@
#include <string.h>
BufferedInputStream::BufferedInputStream(InputStreamPtr _input)
:InputStream(_input->GetURI(), _input->mutex),
:InputStream(_input->GetUriView(), _input->mutex),
BufferingInputStream(std::move(_input))
{
assert(IsEligible(GetInput()));

View File

@ -159,6 +159,10 @@ public:
return uri.c_str();
}
std::string_view GetUriView() const noexcept {
return uri;
}
/**
* Check for errors that may have occurred in the I/O thread.
* Throws std::runtime_error on error.

View File

@ -23,7 +23,7 @@
#include <utility>
ProxyInputStream::ProxyInputStream(InputStreamPtr _input) noexcept
:InputStream(_input->GetURI(), _input->mutex),
:InputStream(_input->GetUriView(), _input->mutex),
input(std::move(_input))
{
assert(input);