foreseen

A text-based gemini browser with prefetching.
git clone git://git.laack.co/foreseen.git
Log | Files | Refs | README | LICENSE

commit 41c0c5af64a1411cc7d88cd47e8ea683fa3fafcf
parent 3e880dbd7111257a8695f735672ac3cbe078d10a
Author: Andrew Laack <andrew@laack.co>
Date:   Mon, 28 Sep 2026 10:47:59 -0500

Patch uri to fix issue in lib

Diffstat:
Mvendor/uri.hpp | 10+++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/vendor/uri.hpp b/vendor/uri.hpp @@ -437,7 +437,15 @@ private: { // In this case an authority component is present. std::string::const_iterator authority_cursor = (m_content.begin() + 2); - if (m_content.find_first_of('@') != std::string::npos) + + size_t authority_end = m_content.find('/', 2); + if (authority_end == std::string::npos) + { + authority_end = m_content.length(); + } + + size_t at_pos = m_content.find('@', 2); + if ((at_pos != std::string::npos) && (at_pos < authority_end)) { std::string::const_iterator userpass_divider = parse_username(uri_text, authority_cursor);