summaryrefslogtreecommitdiffstats
path: root/src/network/access
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2017-05-05 10:20:47 -0700
committerTimur Pocheptsov <timur.pocheptsov@qt.io>2017-05-08 09:39:16 +0000
commit225a35a2ab3eeecab693ee83a2b856f2dabe9092 (patch)
treed045d9b5c8a061fe2243c3f0cd54051131874053 /src/network/access
parentb92267cd4c4a7c88aab950ad519943d85add1da2 (diff)
Use QNetworkReply::ProtocolFailure in HTTP/2 failures
ProtocolInvalidOperationError are meant for actual replies from the server indicating that the operation is not valid (HTTP 400 Bad Request). Change-Id: I9ad33fff8b634979bdbafffd14bbc57e4b21d6bf Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'src/network/access')
-rw-r--r--src/network/access/qhttp2protocolhandler.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/network/access/qhttp2protocolhandler.cpp b/src/network/access/qhttp2protocolhandler.cpp
index 555f1ba0ef..44ab637da8 100644
--- a/src/network/access/qhttp2protocolhandler.cpp
+++ b/src/network/access/qhttp2protocolhandler.cpp
@@ -528,7 +528,7 @@ void QHttp2ProtocolHandler::handleDATA()
auto &stream = activeStreams[streamID];
if (qint32(inboundFrame.payloadSize()) > stream.recvWindow) {
- finishStreamWithError(stream, QNetworkReply::ProtocolInvalidOperationError,
+ finishStreamWithError(stream, QNetworkReply::ProtocolFailure,
QLatin1String("flow control error"));
sendRST_STREAM(streamID, FLOW_CONTROL_ERROR);
markAsReset(streamID);
@@ -834,7 +834,7 @@ void QHttp2ProtocolHandler::handleWINDOW_UPDATE()
}
auto &stream = activeStreams[streamID];
if (!valid || sum_will_overflow(stream.sendWindow, delta)) {
- finishStreamWithError(stream, QNetworkReply::ProtocolInvalidOperationError,
+ finishStreamWithError(stream, QNetworkReply::ProtocolFailure,
QLatin1String("invalid WINDOW_UPDATE delta"));
sendRST_STREAM(streamID, PROTOCOL_ERROR);
markAsReset(streamID);
@@ -888,7 +888,7 @@ void QHttp2ProtocolHandler::handleContinuedHEADERS()
// We can receive HEADERS on streams initiated by our requests
// (these streams are in halfClosedLocal state) or remote-reserved
// streams from a server's PUSH_PROMISE.
- finishStreamWithError(stream, QNetworkReply::ProtocolInvalidOperationError,
+ finishStreamWithError(stream, QNetworkReply::ProtocolFailure,
QLatin1String("HEADERS on invalid stream"));
sendRST_STREAM(streamID, CANCEL);
markAsReset(streamID);
@@ -977,7 +977,7 @@ bool QHttp2ProtocolHandler::acceptSetting(Http2::Settings identifier, quint32 ne
for (auto id : brokenStreams) {
auto &stream = activeStreams[id];
- finishStreamWithError(stream, QNetworkReply::ProtocolInvalidOperationError,
+ finishStreamWithError(stream, QNetworkReply::ProtocolFailure,
QLatin1String("SETTINGS window overflow"));
sendRST_STREAM(id, PROTOCOL_ERROR);
markAsReset(id);