From 83d7be7274e61c8c65aad50585f7bf3cbce35c9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= <1005065+DeepDiver1975@users.noreply.github.com> Date: Mon, 25 Nov 2024 16:06:43 +0100 Subject: [PATCH] fix: http header keys are case in-sensitive --- src/libsync/httplogger.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/libsync/httplogger.cpp b/src/libsync/httplogger.cpp index d86fd83a76c..059dc90c5a8 100644 --- a/src/libsync/httplogger.cpp +++ b/src/libsync/httplogger.cpp @@ -105,7 +105,10 @@ void logHttp(const QByteArray &verb, HttpContext *ctx, QJsonObject &&header, QIO QJsonObject body = {{QStringLiteral("length"), contentLength}}; if (contentLength > 0) { - const QString contentType = header.value(QStringLiteral("Content-Type")).toString(); + QString contentType = header.value(QStringLiteral("Content-Type")).toString(); + if (contentType.isEmpty()) { + contentType = header.value(QStringLiteral("content-type")).toString(); + } if (isTextBody(contentType)) { if (!device->isOpen()) { Q_ASSERT(dynamic_cast(device));