Restore original OpenSearch namespaces
authorLucas Werkmeister <lucas.werkmeister@wikimedia.de>
Thu, 7 Jun 2018 16:48:39 +0000 (18:48 +0200)
committerLucas Werkmeister <lucas.werkmeister@wikimedia.de>
Thu, 7 Jun 2018 16:54:20 +0000 (18:54 +0200)
Though that URL may no longer resolve, the correct XML namespace for
OpenSearch remains http://a9.com/-/spec/opensearch/1.1/ – see [1] and
[2] for some discussion clarifying this.

Similarly, the canonical namespace URL for MozSearch uses HTTP, not
HTTPS, as can be seen when visiting it (via either protocol) [3].

This reverts commit 3b86cf03c162298211da2f57333bcc645123a979.

[1]: https://github.com/dewitt/opensearch/issues/3
[2]: https://groups.google.com/d/msg/opensearch/8ecuX35-lEs/JR_cs0N6k68J
[3]: https://www.mozilla.org/2006/browser/search/

Bug: T196643
Change-Id: I8d14660550a5c67cefc421a334502963bfd6ed3c

opensearch_desc.php

index b92ff2e..b9b2161 100644 (file)
@@ -46,8 +46,8 @@ $response->header( 'Cache-control: max-age=600' );
 print '<?xml version="1.0"?>';
 print Xml::openElement( 'OpenSearchDescription',
        [
-               'xmlns' => 'http://www.opensearch.org/Specifications/OpenSearch/1.1',
-               'xmlns:moz' => 'https://www.mozilla.org/2006/browser/search/' ] );
+               'xmlns' => 'http://a9.com/-/spec/opensearch/1.1/',
+               'xmlns:moz' => 'http://www.mozilla.org/2006/browser/search/' ] );
 
 /* The spec says the ShortName must be no longer than 16 characters,
  * but 16 is *realllly* short. In practice, browsers don't appear to care