allHeaderFields invalid for NSURLResponse to file:/// url

A GET request for file:///path/to/file URLs has a self.response that does not respond to allHeaderFields because it is an NSURLResponse not an NSHTTPURLResponse