summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/request/node_modules/form-data/lib/form_data.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/request/node_modules/form-data/lib/form_data.js')
-rw-r--r--deps/npm/node_modules/request/node_modules/form-data/lib/form_data.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/deps/npm/node_modules/request/node_modules/form-data/lib/form_data.js b/deps/npm/node_modules/request/node_modules/form-data/lib/form_data.js
index 5b33f554c..89505f6eb 100644
--- a/deps/npm/node_modules/request/node_modules/form-data/lib/form_data.js
+++ b/deps/npm/node_modules/request/node_modules/form-data/lib/form_data.js
@@ -67,7 +67,7 @@ FormData.prototype._trackLength = function(header, value, options) {
// @check why add CRLF? does this account for custom/multiple CRLFs?
this._overheadLength +=
Buffer.byteLength(header) +
- + FormData.LINE_BREAK.length;
+ FormData.LINE_BREAK.length;
// empty or either doesn't have path or not an http response
if (!value || ( !value.path && !(value.readable && value.hasOwnProperty('httpVersion')) )) {
@@ -180,7 +180,7 @@ FormData.prototype._multiPartFooter = function(field, value, options) {
};
FormData.prototype._lastBoundary = function() {
- return '--' + this.getBoundary() + '--';
+ return '--' + this.getBoundary() + '--' + FormData.LINE_BREAK;
};
FormData.prototype.getHeaders = function(userHeaders) {
@@ -306,7 +306,7 @@ FormData.prototype.submit = function(params, cb) {
options.headers = this.getHeaders(params.headers);
// https if specified, fallback to http in any other case
- if (params.protocol == 'https:') {
+ if (options.protocol == 'https:') {
request = https.request(options);
} else {
request = http.request(options);