summaryrefslogtreecommitdiffstats
path: root/src/network/access/qhttpnetworkreply_p.h
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2009-05-13 11:27:01 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2009-05-13 11:55:58 (GMT)
commita18ebd2a70e83863bc9a8cc64a65791a6d879f02 (patch)
treec7afcf827a8d297093eab50313124e3a0568c429 /src/network/access/qhttpnetworkreply_p.h
parent87022c9a4ab00a9faaf6bcdaa8d5884962ccf305 (diff)
downloadQt-a18ebd2a70e83863bc9a8cc64a65791a6d879f02.zip
Qt-a18ebd2a70e83863bc9a8cc64a65791a6d879f02.tar.gz
Qt-a18ebd2a70e83863bc9a8cc64a65791a6d879f02.tar.bz2
Improve the HTTP status line parsing and catch more errors.
There's no need for using QByteArrayMatcher for one single character, so avoid the overhead. Also validate the message header a bit more: we require the status line to start with "HTTP/n.m " where n and m are positive integers less than 10. Task-number: 248838 Reviewed-by: Markus Goetz
Diffstat (limited to 'src/network/access/qhttpnetworkreply_p.h')
-rw-r--r--src/network/access/qhttpnetworkreply_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/access/qhttpnetworkreply_p.h b/src/network/access/qhttpnetworkreply_p.h
index c17c65c..cb4d34f 100644
--- a/src/network/access/qhttpnetworkreply_p.h
+++ b/src/network/access/qhttpnetworkreply_p.h
@@ -154,7 +154,7 @@ public:
QHttpNetworkReplyPrivate(const QUrl &newUrl = QUrl());
~QHttpNetworkReplyPrivate();
qint64 readStatus(QAbstractSocket *socket);
- void parseStatus(const QByteArray &status);
+ bool parseStatus(const QByteArray &status);
qint64 readHeader(QAbstractSocket *socket);
void parseHeader(const QByteArray &header);
qint64 readBody(QAbstractSocket *socket, QIODevice *out);