Summary: | GET request includes "Content-Length: 0" header | ||
---|---|---|---|
Product: | [Frameworks and Libraries] frameworks-kio | Reporter: | Robby Stephenson <robby> |
Component: | HTTP | Assignee: | KIO Bugs <kio-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | kdelibs-bugs-null |
Priority: | NOR | ||
Version First Reported In: | 6.16.0 | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/frameworks/kio/-/commit/b9fec2e687bb8f7b885cd010daceb78a13268b17 | Version Fixed In: | |
Sentry Crash Report: | |||
Bug Depends on: | |||
Bug Blocks: | 507265 |
Description
Robby Stephenson
2025-07-26 19:57:39 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/1958 Git commit b9fec2e687bb8f7b885cd010daceb78a13268b17 by Christoph Cullmann, on behalf of Robby Stephenson. Committed on 15/08/2025 at 15:00. Pushed by cullmann into branch 'master'. Avoid "Content-Length: 0" header for empty GET and HEAD requests The QBuffer pointer eventually gets sent as a QIODevice ptr to QNetworkAccessManager::sendCustomRequest(...) and Qt then sends a "Content-Length: 0" header for all requests even if the data itself is empty. Per RFC9110, "A user agent SHOULD NOT send a Content-Length header field when the request message does not contain content and the method semantics do not anticipate such data." Semantically, HTTP_GET and HTTP_HEAD shouldn't send the header when the data is empty. Account for the Qt behavior here until behavior is modified. M +6 -1 src/kioworkers/http/http.cpp https://invent.kde.org/frameworks/kio/-/commit/b9fec2e687bb8f7b885cd010daceb78a13268b17 |