Skip to content

Commit 57bf7bf

Browse files
author
Pushkar Kulkarni
committed
Fix for SR-2913 - HTTP headers not picked up
1 parent 6c5b7db commit 57bf7bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Foundation/NSURLSession/NSURLSessionTask.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ fileprivate extension URLSessionTask {
594594
func curlHeaders(for request: URLRequest) -> [String] {
595595
var result: [String] = []
596596
var names = Set<String>()
597-
if let hh = currentRequest?.allHTTPHeaderFields {
597+
if let hh = request.allHTTPHeaderFields {
598598
hh.forEach {
599599
let name = $0.0.lowercased()
600600
guard !names.contains(name) else { return }

0 commit comments

Comments
 (0)