Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix: doesn't returns all links #50

Closed
wants to merge 1 commit into from
Closed

Bugfix: doesn't returns all links #50

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented May 22, 2021

When searchSubdomain option is set, the program compare the new to base
in order to determine if it is a sub domain.

In the case we anamlyase a web site https://www.ozon.io/, we activate
searchSubdomain and we encounter a relitive link /offers, we have this
case:

base = url.Parse("https://www.ozon.io/")
ref = url.Parse("/offers")

We compare the subdomains of base and ref, and they are always different
because "ref" is not a absolute links. So https://www.ozon.io/offers is
not returned as link, but it should be returned.

This path propose compare the result of base.ResolveReference(ref) in place
of ref. this solve the problem because base.ResolveReference set the right
hostname in the result.

When searchSubdomain option is set, the program compare the new to base
in order to determine if it is a sub domain.

In the case we anamlyase a web site https://www.ozon.io/, we activate
searchSubdomain and we encounter a relitive link /offers, we have this
case:

   base = url.Parse("https://www.ozon.io/")
	ref = url.Parse("/offers")

We compare the subdomains of base and ref, and they are always different
because "ref" is not a absolute links. So https://www.ozon.io/offers is
not returned as link, but it should be returned.

This path propose compare the result of base.ResolveReference(ref) in place
of ref. this solve the problem because base.ResolveReference set the right
hostname in the result.
@ghost ghost closed this by deleting the head repository May 18, 2023
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant