@capacitor/ios 7.6.2 → 7.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -66,7 +66,7 @@ open class CapacitorUrlRequest: NSObject, URLSessionTaskDelegate {
|
|
|
66
66
|
|
|
67
67
|
var data = Data()
|
|
68
68
|
var boundary = UUID().uuidString
|
|
69
|
-
if contentType.contains("boundary="), let contentBoundary = extractBoundary(from: contentType)
|
|
69
|
+
if contentType.contains("boundary="), let contentBoundary = extractBoundary(from: contentType) {
|
|
70
70
|
boundary = contentBoundary
|
|
71
71
|
} else {
|
|
72
72
|
overrideContentType(boundary)
|
|
@@ -86,7 +86,7 @@ open class CapacitorUrlRequest: NSObject, URLSessionTaskDelegate {
|
|
|
86
86
|
request.setValue(contentType, forHTTPHeaderField: "Content-Type")
|
|
87
87
|
headers["Content-Type"] = contentType
|
|
88
88
|
}
|
|
89
|
-
|
|
89
|
+
|
|
90
90
|
/**
|
|
91
91
|
Extracts the boundary value of the `content-type` header for multiplart/form-data requests, if provided
|
|
92
92
|
The boundary value might be surrounded by double quotes (") which will be stripped away.
|
|
@@ -97,14 +97,14 @@ open class CapacitorUrlRequest: NSObject, URLSessionTaskDelegate {
|
|
|
97
97
|
if let endRange = boundary.range(of: ";") {
|
|
98
98
|
boundary = boundary[..<endRange.lowerBound]
|
|
99
99
|
}
|
|
100
|
-
|
|
100
|
+
|
|
101
101
|
if boundary.hasPrefix("\"") && boundary.hasSuffix("\"") {
|
|
102
102
|
return String(boundary.dropFirst().dropLast())
|
|
103
103
|
} else {
|
|
104
104
|
return String(boundary)
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
|
-
|
|
107
|
+
|
|
108
108
|
return nil
|
|
109
109
|
}
|
|
110
110
|
|
|
@@ -131,7 +131,7 @@ open class CapacitorUrlRequest: NSObject, URLSessionTaskDelegate {
|
|
|
131
131
|
}
|
|
132
132
|
var data = Data()
|
|
133
133
|
var boundary = UUID().uuidString
|
|
134
|
-
if contentType.contains("boundary="), let contentBoundary = extractBoundary(from: contentType) {
|
|
134
|
+
if contentType.contains("boundary="), let contentBoundary = extractBoundary(from: contentType) {
|
|
135
135
|
boundary = contentBoundary
|
|
136
136
|
} else {
|
|
137
137
|
overrideContentType(boundary)
|
package/package.json
CHANGED