Skip to content
This repository was archived by the owner on Dec 10, 2024. It is now read-only.

Commit 3f64fda

Browse files
cipi1965dduan
authored andcommitted
Updated Linux fixes for Swift 3.1
1 parent 16ca5f4 commit 3f64fda

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

Sources/Just/Just.swift

-9
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,8 @@ public enum HTTPMethod: String {
100100

101101
extension URLResponse {
102102
var HTTPHeaders: [String: String] {
103-
#if os(Linux)
104-
return (self as? HTTPURLResponse)?.allHeaderFields ?? [:]
105-
#else
106103
return (self as? HTTPURLResponse)?.allHeaderFields as? [String: String]
107104
?? [:]
108-
#endif
109105
}
110106
}
111107

@@ -202,13 +198,8 @@ public final class HTTPResult : NSObject {
202198
public lazy var cookies: [String: HTTPCookie] = {
203199
let foundCookies: [HTTPCookie]
204200
if let headers = self.response?.HTTPHeaders, let url = self.response?.url {
205-
#if os(Linux)
206-
foundCookies = HTTPCookie.cookies(withResponseHeaderFields: headers,
207-
forURL: url) as [HTTPCookie]
208-
#else
209201
foundCookies = HTTPCookie.cookies(withResponseHeaderFields: headers,
210202
for: url) as [HTTPCookie]
211-
#endif
212203
} else {
213204
foundCookies = []
214205
}

0 commit comments

Comments
 (0)