Closed
Bug 865218
Opened 12 years ago
Closed 12 years ago
application/x-moz-keywordsearch should still be used in keyword search (nsDefaultURIFixup.cpp)
Categories
(Firefox :: Search, defect)
Firefox
Search
Tracking
()
RESOLVED
FIXED
Firefox 23
People
(Reporter: mkaply, Assigned: mkaply)
Details
Attachments
(3 files, 1 obsolete file)
1.67 KB,
patch
|
Gavin
:
review+
|
Details | Diff | Splinter Review |
3.09 KB,
application/xml
|
Details | |
1.69 KB,
patch
|
Details | Diff | Splinter Review |
I understand the concept behind the purpose flag, and it's a good idea, but by removing application/x-moz-keywordsearch it prevents really basic things like having keyword search map to google's "I'm feeling lucky". Not every server can just use a keyword to decide what to do (especially for existing services). It might be a different URL.
Looking at the keyword fixup code, there was no reason to remove application/x-moz-keywordsearch.
The code in search should have just been changed to not fail if the specific type wasn't found.
That way you could support the old code and still have the new code.
Assignee | ||
Comment 1•12 years ago
|
||
This is a simple patch that checks to see if the search engine supports the keyword and if it is there, use it.
This allows existing search engines to work.
This won't affect the builtin search engines because keyword has been removed.
Attachment #741334 -
Flags: review?(gavin.sharp)
Assignee | ||
Comment 2•12 years ago
|
||
Assignee | ||
Comment 3•12 years ago
|
||
Assignee: nobody → mozilla
Attachment #741343 -
Attachment is obsolete: true
Assignee | ||
Comment 4•12 years ago
|
||
To use this search engine, open scratchpad and type:
window.external.AddSearchProvider("https://bug865218.bugzilla.mozilla.org/attachment.cgi?id=741388");
Comment 5•12 years ago
|
||
This is a good change. I agreed with Mike's reasoning: I understand the recent change, but it no longer supports certain URL styles.
http://mycroftproject.com/ has over 23000 OSDs (!). Some of these are bound to be broken by this changes.
If we can support both old and new, that's certainly better.
Assignee | ||
Comment 6•12 years ago
|
||
Any thoughts on this gavin?
Comment 7•12 years ago
|
||
I'm kind of on the fence. I guess it's a valid use case, but I hate to have these kind of gross hacks that will likely benefit few people in practice.
Comment 8•12 years ago
|
||
Comment on attachment 741334 [details] [diff] [review]
Use keyword if available
I guess the net cost is relatively low. You can use NS_NAMED_LITERAL_STRING to avoid duplicating the "application/x-moz-keywordsearch" string.
Can you document this on https://developer.mozilla.org/en-US/docs/Creating_OpenSearch_plugins_for_Firefox ?
Attachment #741334 -
Flags: review?(gavin.sharp) → review+
Assignee | ||
Comment 9•12 years ago
|
||
This is the final patch for check with NS_NAMED_LITERAL_STRING
Am I free to check this in at this point?
Assignee | ||
Comment 10•12 years ago
|
||
Comment 11•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 23
You need to log in
before you can comment on or make changes to this bug.
Description
•