diff --git a/src/libstore/filetransfer.cc b/src/libstore/filetransfer.cc index acbb042b7..4a0638dc6 100644 --- a/src/libstore/filetransfer.cc +++ b/src/libstore/filetransfer.cc @@ -97,8 +97,6 @@ struct curlFileTransfer : public FileTransfer requestHeaders = curl_slist_append(requestHeaders, "Accept-Encoding: zstd, br, gzip, deflate, bzip2, xz"); if (!request.expectedETag.empty()) requestHeaders = curl_slist_append(requestHeaders, ("If-None-Match: " + request.expectedETag).c_str()); - if (!request.mimeType.empty()) - requestHeaders = curl_slist_append(requestHeaders, ("Content-Type: " + request.mimeType).c_str()); for (auto it = request.headers.begin(); it != request.headers.end(); ++it){ requestHeaders = curl_slist_append(requestHeaders, fmt("%s: %s", it->first, it->second).c_str()); } diff --git a/src/libstore/filetransfer.hh b/src/libstore/filetransfer.hh index 4352cb81b..534b4b104 100644 --- a/src/libstore/filetransfer.hh +++ b/src/libstore/filetransfer.hh @@ -63,7 +63,6 @@ struct FileTransferRequest unsigned int baseRetryTimeMs = 250; ActivityId parentAct; std::optional data; - std::string mimeType; FileTransferRequest(std::string_view uri) : uri(uri), parentAct(getCurActivity()) { } diff --git a/src/libstore/http-binary-cache-store.cc b/src/libstore/http-binary-cache-store.cc index ab8ad1399..ea75768bd 100644 --- a/src/libstore/http-binary-cache-store.cc +++ b/src/libstore/http-binary-cache-store.cc @@ -134,7 +134,7 @@ protected: { FileTransferRequest req{makeURI(path)}; req.data = StreamToSourceAdapter(istream).drain(); - req.mimeType = mimeType; + req.headers = {{"Content-Type", mimeType}}; try { getFileTransfer()->transfer(req); } catch (FileTransferError & e) {