Closed Bug 418269 Opened 18 years ago Closed 18 years ago

keyword (alias) search not working for search engines using post method

Categories

(Firefox :: Address Bar, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 3 beta4

People

(Reporter: moz-bugs, Assigned: moz-bugs)

References

Details

Attachments

(2 files)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b4pre) Gecko/2008021607 Minefield/3.0b4pre Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b4pre) Gecko/2008021607 Minefield/3.0b4pre Search engines using the post method don't work when used from the url bar with their keyword/alias. The post data is ignored and therefore you probably get to a error page. I have no example engines at hand, but I think it's pretty obvious from the source that there is no handling of post data whatsoever: http://lxr.mozilla.org/seamonkey/source/browser/base/content/browser.js#1690 Reproducible: Always
(In reply to comment #0) > I have no example engines at hand, but I think it's pretty obvious from the > source that there is no handling of post data whatsoever: > http://lxr.mozilla.org/seamonkey/source/browser/base/content/browser.js#1690 Indeed. Looks rather trivial to fix, could you attach a patch Malte? Should be able to just set aPostDataRef.value accordingly.
Status: UNCONFIRMED → NEW
Ever confirmed: true
WFM with latest trunk on Windows XP: http://www.howstuffworks.com/search.php POST /search.php HTTP/1.1 Host: www.howstuffworks.com User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b4pre) Gecko/2008021809 Minefield/3.0b4pre Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Cookie: RMID=3eea415747bb0ad0; s_vi=[CS]v1|47BB0AE40000562D-A170BA0000039F2[CE] Content-Type: application/x-www-form-urlencoded Content-Length: 17 terms=hard%20disk HTTP/1.x 200 OK Server: Apache X-Powered-By: PHP/5.2.4 Last-Modified: Tue, 19 Feb 2008 17:00:18 GMT Content-Encoding: gzip P3P: CP="ALL DSP COR CUR ADMo DEVo TAIo PSAo PSDo IVAo CONi OTPi OUR NOR UNI" Content-Type: text/html; charset=ISO-8859-1 Date: Tue, 19 Feb 2008 17:00:18 GMT Content-Length: 9845 Connection: keep-alive Vary: Accept-Encoding Cache-Control: no-cache, no-store, must-revalidate, max-age=0 Expires: Sat, 26 Jul 1997 05:00:00 GMT Pragma: no-cache
Ah well, I see now that the reporter is talking about the Keyword field in Search Engine Manager (wasn't aware of the feature). I tested this and indeed it doesn't work.
(In reply to comment #1) > Indeed. Looks rather trivial to fix, could you attach a patch Malte? Should be > able to just set aPostDataRef.value accordingly. I can attach a patch, but I don't really know what to type in there so it gets reviewed.
Set the "review" flag to "?" and enter my email address.
Attached patch patchSplinter Review
Attachment #304284 - Flags: review?(gavin.sharp)
Comment on attachment 304284 [details] [diff] [review] patch >Index: browser.js > if (!aPostDataRef) > aPostDataRef = {}; >+ var engine = searchService.getEngineByAlias(keyword); Nit: please add a newline before "var engine". Drivers: this is an extremely low-risk change to fix keywords for POST searchplugins.
Attachment #304284 - Flags: review?(gavin.sharp)
Attachment #304284 - Flags: review+
Attachment #304284 - Flags: approval1.9?
Assignee: nobody → moz-bugs
Version: unspecified → Trunk
Attachment #304284 - Flags: approval1.9? → approval1.9+
Keywords: checkin-needed
Checking in browser/base/content/browser.js; /cvsroot/mozilla/browser/base/content/browser.js,v <-- browser.js new revision: 1.968; previous revision: 1.967 done
Status: NEW → RESOLVED
Closed: 18 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 3 beta4
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: