We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7bf5fc7 + 820e3a8 commit 75703bcCopy full SHA for 75703bc
Foundation/URLSession/http/HTTPURLProtocol.swift
@@ -212,8 +212,7 @@ fileprivate extension _HTTPURLProtocol {
212
func curlHeaders(for httpHeaders: [AnyHashable : Any]?) -> [String] {
213
var result: [String] = []
214
var names = Set<String>()
215
- if httpHeaders != nil {
216
- let hh = httpHeaders as! [String:String]
+ if let hh = httpHeaders as? [String : String] {
217
hh.forEach {
218
let name = $0.0.lowercased()
219
guard !names.contains(name) else { return }
0 commit comments