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

infinite loop in findURI with tld and no trailing / #161

Open
macgyver opened this issue Aug 29, 2019 · 0 comments
Open

infinite loop in findURI with tld and no trailing / #161

macgyver opened this issue Aug 29, 2019 · 0 comments

Comments

@macgyver
Copy link
Contributor

macgyver commented Aug 29, 2019

Description

if you do not include a trailing slash after the tld in your domain, claycli enters an infinite loop.
https://nymag.com is a valid url (new URL('https://nymag.com') returns a valid URL object) but using it as input for findURI enters an infinite loop.

Steps to Reproduce

clayrest = require('claycli/lib/rest')
clayrest.findURI('http://nymag.com').pluck('uri').pipe(process.stdout)
// client hangs

Expected Behavior

The same result as if I had included the trailing slash in the URL

clayrest = require('claycli/lib/rest')
clayrest.findURI('http://nymag.com/').pluck('uri').pipe(process.stdout)
// returns the page uri of the current homepage `nymag.com/_pages/homepage`

Screenshots

If applicable, add screenshots to help explain your problem.

Specs

Desktop

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional Context

Add any other context about the problem here.

@macgyver macgyver changed the title infinite loop in findURI with sld and no trailing / infinite loop in findURI with tld and no trailing / Aug 29, 2019
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

No branches or pull requests

1 participant