Page MenuHomePhabricator

External links search only lists HTTP links if only domain is entered (but no other protocols like HTTPS)
Closed, DuplicatePublic

Description

On English Wikipedia, go to External links search.
Enter "nutritionfacts.org" (query link)

Expected result
Returns both HTTP and HTTPS links

Actual result
Returns only HTTP links

Event Timeline

That's documented and probably expected behavior (if it still makes sense is another question). The page says:

The “http://” protocol specification is optional; any other protocol (“https://”, etc.) must be given explicitly.

Aklapper renamed this task from External links search does not look for HTTPS links if only domain is entered to External links search only lists HTTP links if only domain is entered (but no other protocols like HTTPS).Apr 19 2019, 11:36 AM

That's documented and probably expected behavior (if it still makes sense is another question). The page says:

The “http://” protocol specification is optional; any other protocol (“https://”, etc.) must be given explicitly.

The documentation of this limitation seems to only exist on :en.
There is nothing on:

Thanks!
The fact that it's not documented on Mediawiki itself seems to mean that it's not the expected behavior, meaning that the documentation on :en was added to avoid unexpected results.

Here's where http:// is used as default instead of both http:// and https://
https://phabricator.wikimedia.org/source/mediawiki/browse/master/includes/specials/SpecialLinkSearch.php$73

// Get protocol, default is http://
$protocol = 'http://';

After the externallinks migration (T312666) this should be rather easy to implement. I can take a look at it in the hackathon.