Closed Bug 517720 Opened 15 years ago Closed 9 years ago

Adding a search engine using relative URIs is not supported

Categories

(Firefox :: Search, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 38

People

(Reporter: realsby, Assigned: mossop)

References

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.0; tr; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.0; tr; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3

Hello... I'am a new firefox user... I noticed a difference between firefox3.5 & ie8 .

Firefox support OpenSearch. Thats good.
But the java code for adding a search engine to search bar, there is a problem I think.

Example: IE8 Support like this code.
window.external.AddSearchProvider('opensearch.xml');
But firefox says "Your search engine doesnt support for firefox" (something like that)

To can add a search engine, firefox want to source code link like that,
window.external.AddSearchProvider('http://www.firefox.com/opensearch.xml')

I think thats a problem and easy to fix that. 
Maybe you can support this in new version.

Have a nice day. Thanks.

Reproducible: Always

Steps to Reproduce:
1.Original window.external.AddSearchProvider('opensearch.xml')
2.To Fix Change like this : window.external.AddSearchProvider('http://www.firefox.com/opensearch.xml')

Actual Results:  
It fixed

Expected Results:  
Firefox must support first code like IE8

I dont understand what I must write here. Sorry for my english.
Severity: minor → enhancement
Component: Location Bar and Autocomplete → Search
OS: Windows Vista → All
QA Contact: location.bar → search
Hardware: x86 → All
Version: unspecified → Trunk
The problem is located here:
http://mxr.mozilla.org/mozilla1.9.1/source/browser/components/sidebar/src/nsSidebar.js#135

If a search engine has to be installed an absolute URL has to be given. Otherwise we fail. Shouldn't we use the current channel (HTTP, HTTPS, FTP) to determine the absolute path in-front of the check in validateSearchEngine?
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Adding a search engine to toolbar → Adding a search engine with relative path not supported
Summary: Adding a search engine with relative path not supported → Adding a search engine without protocol (http/https/ftp) specified is not supported
This code can't currently know what window it was triggered by, so it can't get a baseURI to use to resolve relative URIs. Bug 334875 is one way to solve that, but I think bug 518929 is a better option.
Summary: Adding a search engine without protocol (http/https/ftp) specified is not supported → Adding a search engine using relative URIs is not supported
Assignee: nobody → dtownsend
Fixed by bug 1068186
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 38
You need to log in before you can comment on or make changes to this bug.