Skip to content

Commit

Permalink
HTTPClient: disable URLSession cache (#2668)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
NachoSoto authored Jun 16, 2023
1 parent 6d1cf97 commit ed35ab2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Sources/Networking/HTTPClient/HTTPClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ed35ab2

Please sign in to comment.