Skip to content

Commit

Permalink
upgrade to 1.2.1: fix fulldomain issue
Browse files Browse the repository at this point in the history
  • Loading branch information
MohammadRaziei committed Oct 10, 2023
1 parent ad049f6 commit a794080
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 2 additions & 0 deletions examples/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ int main() {
"home?o=10&k=helloworld#aboutus");

show(TLD::Host("www.ee.aut.ac.ir").suffix());
show(TLD::Host("aut.ac.ir").fulldomain());
show(TLD::Host("ee.aut.ac.ir").fulldomain());

show_attr(url, isPslLoaded);
show(url);
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ build-backend = "scikit_build_core.build"

[project]
name = "liburlparser"
version = "1.2.0"
version = "1.2.1"
description="Fastest Url parser in the world"
readme = "README.md"
authors = [
Expand Down
6 changes: 2 additions & 4 deletions src/urlparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,9 @@ const std::string& TLD::Url::domain() const noexcept {
}
/// fulldomain
std::string TLD::Host::Impl::fulldomain() const noexcept {
std::string result;
if (subdomain_.empty())
result = domainName();
result = subdomain_ + "." + domainName();
return result;
return domainName();
return subdomain_ + "." + domainName();
}
std::string TLD::Host::fulldomain() const noexcept {
return impl->fulldomain();
Expand Down

0 comments on commit a794080

Please sign in to comment.