Skip to content

Commit

Permalink
Disable HTTP/2 support, Qt 6 enables it by default
Browse files Browse the repository at this point in the history
Fixes #246
  • Loading branch information
dfaure-kdab committed Jul 7, 2021
1 parent 5329127 commit 9ea786a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/CHANGES_2_1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Client-side:

Server-side:
============
*
* Disable HTTP/2 support (which Qt 6 enables by default), it causes trouble with some SOAP servers (issue #246).

WSDL parser / code generator changes, applying to both client and server side:
================================================================
Expand Down
5 changes: 5 additions & 0 deletions src/KDSoapClient/KDSoapClientInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ QNetworkRequest KDSoapClientInterfacePrivate::prepareRequest(const QString &meth
{
QNetworkRequest request(QUrl(this->m_endPoint));

#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
// HTTP/2 (on by default since Qt 6) creates trouble, disable it for now (https://github.com/KDAB/KDSoap/issues/246)
request.setAttribute(QNetworkRequest::Http2AllowedAttribute, false);
#endif

QString soapAction = action;

if (soapAction.isNull()) {
Expand Down

0 comments on commit 9ea786a

Please sign in to comment.