Skip to content
This repository has been archived by the owner on Aug 12, 2022. It is now read-only.

Commit

Permalink
Fix compile error
Browse files Browse the repository at this point in the history
"Variable used within its own initial value"
  • Loading branch information
ettore committed May 26, 2021
1 parent 4d1735b commit e0ac927
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions r2-shared-swift/Toolkit/HTTP/DefaultHTTPClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -336,9 +336,9 @@ public final class DefaultHTTPClient: NSObject, HTTPClient, Loggable, URLSession
// It was a HEAD request? We need to query the resource again to get the error body. The body is needed
// for example when the response is an OPDS Authentication Document.
if request.method == .head {
var request = request
request.method = .get
session.dataTask(with: request.urlRequest) { data, _, error in
var modifiedRequest = request
modifiedRequest.method = .get
session.dataTask(with: modifiedRequest.urlRequest) { data, _, error in
response.body = data
self.state = .failure(kind: kind, cause: error, response: response)
completionHandler(.cancel)
Expand Down

0 comments on commit e0ac927

Please sign in to comment.