summaryrefslogtreecommitdiffstats
path: root/toolkit/components/search
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-08-10 12:25:57 +0200
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-08-10 12:25:57 +0200
commitb5cbb4d2f8d43469d1eb80cfcff5eae4dee706e2 (patch)
tree5a2ddb9321d4915bc854c6efb58f2546eb98828c /toolkit/components/search
parent2c17aaec1f152a288a7003c0b5578dee1d6a89d8 (diff)
downloadUXP-b5cbb4d2f8d43469d1eb80cfcff5eae4dee706e2.tar
UXP-b5cbb4d2f8d43469d1eb80cfcff5eae4dee706e2.tar.gz
UXP-b5cbb4d2f8d43469d1eb80cfcff5eae4dee706e2.tar.lz
UXP-b5cbb4d2f8d43469d1eb80cfcff5eae4dee706e2.tar.xz
UXP-b5cbb4d2f8d43469d1eb80cfcff5eae4dee706e2.zip
Issue #1134: Reinstate postDataString for about:home searches.
Diffstat (limited to 'toolkit/components/search')
-rw-r--r--toolkit/components/search/nsSearchService.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/toolkit/components/search/nsSearchService.js b/toolkit/components/search/nsSearchService.js
index 19f4048b4..f6303bca1 100644
--- a/toolkit/components/search/nsSearchService.js
+++ b/toolkit/components/search/nsSearchService.js
@@ -780,6 +780,7 @@ EngineURL.prototype = {
}
var postData = null;
+ let postDataString = null;
if (this.method == "GET") {
// GET method requests have no post data, and append the encoded
// query string to the url...
@@ -787,6 +788,7 @@ EngineURL.prototype = {
url += "?";
url += dataString;
} else if (this.method == "POST") {
+ postDataString = dataString;
// POST method requests must wrap the encoded text in a MIME
// stream and supply that as POSTDATA.
var stringStream = Cc["@mozilla.org/io/string-input-stream;1"].
@@ -800,7 +802,7 @@ EngineURL.prototype = {
postData.setData(stringStream);
}
- return new Submission(makeURI(url), postData);
+ return new Submission(makeURI(url), postData, postDataString);
},
_getTermsParameterName: function SRCH_EURL__getTermsParameterName() {
@@ -2409,9 +2411,10 @@ Engine.prototype = {
};
// nsISearchSubmission
-function Submission(aURI, aPostData = null) {
+function Submission(aURI, aPostData = null, aPostDataString = null) {
this._uri = aURI;
this._postData = aPostData;
+ this._postDataString = aPostDataString;
}
Submission.prototype = {
get uri() {
@@ -2420,6 +2423,9 @@ Submission.prototype = {
get postData() {
return this._postData;
},
+ get postDataString() {
+ return this._postDataString;
+ },
QueryInterface: function SRCH_SUBM_QI(aIID) {
if (aIID.equals(Ci.nsISearchSubmission) ||
aIID.equals(Ci.nsISupports))