Skip to content

Commit

Permalink
fix: http header keys are case in-sensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
DeepDiver1975 authored and erikjv committed Nov 25, 2024
1 parent d4e3682 commit 83d7be7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/libsync/httplogger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<QBuffer *>(device));
Expand Down

0 comments on commit 83d7be7

Please sign in to comment.