Repository navigation
Travis-CI testing problem if a test URL has a domain name with no trailing slash #5601
Description
From what it appears, Travis-CI testing may fail if a test URL does not have a trailing slash after the domain (i.e., <test url="http://example.com/" /> would work but <test url="http://example.com" /> would fail.) At the current time, the ruleset style guide shows test URLs with trailing slashes but does not mention any requirement as far as trailing slashes in test URLs.
When recently submitting changes to a ruleset, the testing output included the following:
Ruleset database has changed. Testing test URLs in all changed rulesets.
INFO Finished comparing http://www.spiderwebsoftware.com -> https://www.spiderwebsoftware.com. Rulefile: src/chrome/content/rules/Spiderweb-Software.xml.
INFO Finished comparing http://spidweb.com/ -> https://spiderwebsoftware.com/. Rulefile: src/chrome/content/rules/Spiderweb-Software.xml.
INFO Finished comparing http://www.spidweb.com -> https://www.spidweb.com. Rulefile: src/chrome/content/rules/Spiderweb-Software.xml.
INFO Finished comparing http://spiderwebsoftware.com/ -> https://spiderwebsoftware.com/. Rulefile: src/chrome/content/rules/Spiderweb-Software.xml.
INFO Finished comparing http://www.spiderwebsoftware.com/ -> https://spiderwebsoftware.com/. Rulefile: src/chrome/content/rules/Spiderweb-Software.xml.
INFO Finished comparing http://spidweb.com/ -> https://spiderwebsoftware.com/. Rulefile: src/chrome/content/rules/Spiderweb-Software.xml.
INFO Finished comparing http://www.spidweb.com/ -> https://spiderwebsoftware.com/. Rulefile: src/chrome/content/rules/Spiderweb-Software.xml.
ERROR src/chrome/content/rules/Spiderweb-Software.xml: Fetch error: http://www.spiderwebsoftware.com => https://www.spiderwebsoftware.com: (51, "SSL: certificate subject name (spiderwebsoftware.com) does not match target host name 'www.spiderwebsoftware.com'")
ERROR src/chrome/content/rules/Spiderweb-Software.xml: Fetch error: http://www.spidweb.com => https://www.spidweb.com: (51, "SSL: certificate subject name (spiderwebsoftware.com) does not match target host name 'www.spidweb.com'")
INFO Finished in 7.23 seconds. Loaded rulesets: 1, URL pairs: 7.
Test URL test failed.
The test URL http://spidweb.com/ was correctly mapped to https://spiderwebsoftware.com/, but the http://www.spiderwebsoftware.com and http://www.spidweb.com test URLs without trailing slashes were not mapped to the correct URL, https://spiderwebsoftware.com/.
When trailing slashes were added to all three test URLs, the testing passed.
Ruleset database has changed. Testing test URLs in all changed rulesets.
INFO Finished comparing http://www.spiderwebsoftware.com/ -> https://spiderwebsoftware.com/. Rulefile: src/chrome/content/rules/Spiderweb-Software.xml.
INFO Finished comparing http://spidweb.com/ -> https://spiderwebsoftware.com/. Rulefile: src/chrome/content/rules/Spiderweb-Software.xml.
INFO Finished comparing http://www.spidweb.com/ -> https://spiderwebsoftware.com/. Rulefile: src/chrome/content/rules/Spiderweb-Software.xml.
INFO Finished comparing http://spiderwebsoftware.com/ -> https://spiderwebsoftware.com/. Rulefile: src/chrome/content/rules/Spiderweb-Software.xml.
INFO Finished comparing http://www.spiderwebsoftware.com/ -> https://spiderwebsoftware.com/. Rulefile: src/chrome/content/rules/Spiderweb-Software.xml.
INFO Finished comparing http://spidweb.com/ -> https://spiderwebsoftware.com/. Rulefile: src/chrome/content/rules/Spiderweb-Software.xml.
INFO Finished comparing http://www.spidweb.com/ -> https://spiderwebsoftware.com/. Rulefile: src/chrome/content/rules/Spiderweb-Software.xml.
INFO Finished in 7.23 seconds. Loaded rulesets: 1, URL pairs: 7.
Test URL test succeeded.
Activity
J0WI commentedon Jul 13, 2016
I think this is expected to avoid a regex for
example.comdoesn't matchexample.com.example.net.Of course we should be clearer in our documentation.
jeremyn commentedon Aug 30, 2016
And so that
example.codoesn't matchexample.com.@galenide What is a good fix for this issue for you? Should someone add a clarification to the style guide that a trailing slash is required?
fuglede commentedon Sep 1, 2016
In our validation test, we warn about missing trailing slashes; seems like that would make sense here as well. I just wonder if there's ever a time where we would actually want to test the slashless case. Probably not.