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

Fix compile error #139

Merged
merged 1 commit into from
May 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ All notable changes to this project will be documented in this file.

**Warning:** Features marked as *experimental* may change or be removed in a future release without notice. Use with caution.

<!--## [Unreleased]-->
## [Unreleased]

### Fixed

* [#139](https://github.com/readium/r2-shared-swift/pull/139) Compile error with Xcode 12.4


## [2.0.0]

Expand Down
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