Skip to content
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
2 changes: 1 addition & 1 deletion Sources/LCP/License/License.swift
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ extension License: LCPLicense {
.flatMap {
// We fetch the Status Document again after the HTML interaction is done, in case it changed the
// License.
self.httpClient.fetch(statusURL)
self.httpClient.fetch(HTTPRequest(url: statusURL, headers: ["Accept": MediaType.lcpStatusDocument.string]))
.map { $0.body ?? Data() }
.eraseToAnyError()
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/LCP/License/LicenseValidation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ extension LicenseValidation {
private func fetchStatus(of license: LicenseDocument) throws {
let url = try license.url(for: .status, preferredType: .lcpStatusDocument)
// Short timeout to avoid blocking the License, since the LSD is optional.
httpClient.fetch(HTTPRequest(url: url, timeoutInterval: 5))
httpClient.fetch(HTTPRequest(url: url, headers: ["Accept": MediaType.lcpStatusDocument.string], timeoutInterval: 5))
.map { .retrievedStatusData($0.body ?? Data()) }
.eraseToAnyError()
.resolve(raise)
Expand Down