Skip to content

Commit b736260

Browse files
author
Sefi Krausz
committed
index.js changes
1 parent ac347d0 commit b736260

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

src/index.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,10 @@ var HTTPSnippet = function (data) {
3535
entry.request.headers = entry.request.headers || []
3636
entry.request.cookies = entry.request.cookies || []
3737
entry.request.postData = entry.request.postData || {}
38-
if (entry.request.postData.mimeType) {
39-
entry.request.postData.mimeType = entry.request.postData.mimeType
40-
}
38+
// if (entry.request.postData.mimeType) {
39+
// entry.request.postData.mimeType = entry.request.postData.mimeType
40+
// }
41+
entry.request.postData.mimeType = entry.request.postData.mimeType || 'application/octet-stream'
4142

4243
entry.request.bodySize = 0
4344
entry.request.headersSize = 0
@@ -139,7 +140,7 @@ HTTPSnippet.prototype.prepare = function (request) {
139140

140141
// request.postData.boundary = this.getBoundary()
141142
// request.headersObj['content-type'] = 'multipart/form-data; boundary=' + this.getBoundary()
142-
request.headersObj['content-type'] = request.postData.mimeType
143+
request.headersObj['content-type'] = request.postData.mimeType || 'multipart/form-data'
143144
}
144145
break
145146

0 commit comments

Comments
 (0)