Skip to content

Commit de159ef

Browse files
committed
Make cookies(withResponseHeaderFields:for:) signature match Darwin
1 parent 2c75086 commit de159ef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Foundation/NSHTTPCookie.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ open class HTTPCookie : NSObject {
380380
/// - Parameter headerFields: The response header fields to check for cookies.
381381
/// - Parameter URL: The URL that the cookies came from - relevant to how the cookies are interpeted.
382382
/// - Returns: An array of NSHTTPCookie objects
383-
open class func cookies(withResponseHeaderFields headerFields: [String : String], forURL url: URL) -> [HTTPCookie] {
383+
open class func cookies(withResponseHeaderFields headerFields: [String : String], for URL: URL) -> [HTTPCookie] {
384384

385385
//HTTP Cookie parsing based on RFC 6265: https://tools.ietf.org/html/rfc6265
386386
//Though RFC6265 suggests that multiple cookies cannot be folded into a single Set-Cookie field, this is
@@ -405,7 +405,7 @@ open class HTTPCookie : NSObject {
405405
//bake the cookies
406406
var httpCookies: [HTTPCookie] = []
407407
for i in 0..<cookieIndices.count-1 {
408-
if let aCookie = createHttpCookie(url: url, pairs: nameValuePairs[cookieIndices[i]..<cookieIndices[i+1]]) {
408+
if let aCookie = createHttpCookie(url: URL, pairs: nameValuePairs[cookieIndices[i]..<cookieIndices[i+1]]) {
409409
httpCookies.append(aCookie)
410410
}
411411
}

0 commit comments

Comments
 (0)