Skip to content

Conversation

@DeepDiver1975
Copy link
Member

@DeepDiver1975 DeepDiver1975 commented Nov 25, 2024

This is a workaround to get response bodies printed into the log file in case the http response keys are al lower case.

Background: comparing keys case sensitive is wrong as http header keys are case in-sensitive as per definition:

https://www.rfc-editor.org/rfc/rfc7230#section-3.2

   Each header field consists of a case-insensitive field name followed
   by a colon (":"), optional leading whitespace, the field value, and
   optional trailing whitespace.

A true fix requires to work on QNetworkReply::headers(), QHttpHeaders::value() and QHttpHeaders::WellKnownHeader::ContentType .... but this raises the Qt minimum version to 6.8 due to replay->headers()
https://doc.qt.io/qt-6/qnetworkreply.html#headers

@DeepDiver1975 DeepDiver1975 requested a review from erikjv November 25, 2024 15:07
@erikjv erikjv merged commit 83d7be7 into master Nov 25, 2024
6 checks passed
@erikjv erikjv deleted the fix/httplogger-content-type branch November 25, 2024 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants