HTTPClient: disable URLSession cache (#2668)

Turns out this was breaking an HTTP 304 integration test in #2659. I'm
very confused why we hadn't seen it before.

Possibly it didn't matter for normal requests, but it was breaking
signature verification because the `nonce` was different on the new
request, and therefore it wouldn't match the cached signature.
This commit is contained in:
NachoSoto authored and GitHub committed 2023-06-16 10:26:39 -07:00
1 parent 6d1cf97a41
commit ed35ab2da9
1 file changed
+1
@@ -42,6 +42,7 @@ class HTTPClient {
config.httpMaximumConnectionsPerHost = 1
config.timeoutIntervalForRequest = requestTimeout
config.timeoutIntervalForResource = requestTimeout
config.urlCache = nil // We implement our own caching with `ETagManager`.
self.session = URLSession(configuration: config,
delegate: RedirectLoggerSessionDelegate(),
delegateQueue: nil)