Closed ataylorme closed 6 years ago
This doesn't solve the issue I had where the URL has a trailing slash and so does the referenceUrl, resulting in two slashes at the end of the domain. Right?
I think it was a mistake on my part to hack around this with a regex. I'd rather fix the url we're placing in the currentScenario
with normalize-url
. e.g.http://requirebin.com/?gist=b34c314281156c23c0e21dc2dd970c4b
@danreeves makes sense to me. I think we will have to be careful as removeTrailingSlash
says Note: Trailing slash is always removed if the URL doesn't have a pathname.
This means http://test.com///////
will turn into http://test.com
, so we will need to add a trailing slash back.
If we do at the point where we have the full url, before https://github.com/fffunction/backstop-crawl/blob/master/lib/crawl.js#L116 it should be fine.
@danreeves should be all set now. Thanks for talking through this with me!
Addresses #25 by replacing one or more trailing slashes in
referenceUrl
with a single trailing slash.