Add support for POST in WebExtensions search

VERIFIED FIXED in Firefox 64

Status

enhancement
P1
normal
VERIFIED FIXED
Last year
11 months ago

People

(Reporter: mkaply, Assigned: mkaply)

Tracking

Trunk
mozilla64
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox63 wontfix, firefox64 verified)

Details

Attachments

(3 attachments)

See also bug 336208

We need to expand the capabilities of addEngineWithDetails to allow for POST engines so we can add that to the WebExtensions API.

We need to add POST support in particular.
Status: NEW → ASSIGNED
It's in search, I just didn't add it to WebExtensions for some reason.
Component: Search → General
Product: Firefox → WebExtensions
Summary: Add support for POST engines in addEngineWithDetails → Add support for POST in WebExtensions search
Looks like chrome doesn't support it properly either :)

https://bugs.chromium.org/p/chromium/issues/detail?id=268698
Florian:

So while addEngineWithDetails supported changing the method to POST, it had no way to pass the post params as a separate thing.

Do you think the intention was that you would include the postParams as part of the URL:

http://foo.com?bar={searchTerms}

And the parameters would get turned into postData?

I don't see any code where that would happen.
Attachment #8991750 - Flags: feedback?(florian)
Depends on: 1477076
Comment on attachment 8991750 [details] [diff] [review]
Preliminary patch

Since bug 1477076 is fixed, I think the questions from comment 3 are all answered already.
Attachment #8991750 - Flags: feedback?(florian)
Comment on attachment 9003240 [details]
Bug 1474934 - Add support for POST search to WebExtensions

Shane Caraveo (:mixedpuppy) has approved the revision.
Attachment #9003240 - Flags: review+
Pushed by mozilla@kaply.com:
https://hg.mozilla.org/integration/autoland/rev/f70b8597ad1d
Add support for POST search to WebExtensions r=mixedpuppy
https://hg.mozilla.org/mozilla-central/rev/f70b8597ad1d
Status: ASSIGNED → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
Will manual testing be required on this bug? If yes, please provide some info onto how to correctly validate the changes, otherwise set the 'qe-verify-' flag. Thanks!
Flags: needinfo?(mozilla)
Posted file manifest.json
Attached is a manifest.json that uses POST for DuckDuckGo.

This should be enough to verify. You can test on old Firefox to see it doesn't work and on current Firefox.

What's interesting about POST engines is that you don't see the search term in the URL bar.
Flags: needinfo?(mozilla)
Thank you for the manifest and info, I've verified using Firefox versions 62.0.2, 63.0b9 that the extension containing the above manifest does not work and while using the latest Nightly 64.0a1 it did work. Tests were performed on Windows 10 x64.
Status: RESOLVED → VERIFIED
QA Contact: ddurst
QA Contact: ddurst
You need to log in before you can comment on or make changes to this bug.