Fix assertion when encountering invalid header line.
authorMilian Wolff <mail@milianw.de>
Thu, 6 Feb 2014 16:40:24 +0000 (17:40 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Thu, 6 Feb 2014 19:17:17 +0000 (20:17 +0100)
commit47cbfe2aca62fa524da171ef147d959afee993ec
tree649132a163bb7480eb3f1758a8d6c12f27aed41f
parent6e7f54a014c43dcd6e32e8288415808623e306f4
Fix assertion when encountering invalid header line.

The server test sets an empty identifier which results in a
headerLine containing "Server: ". The split then yields a list
with a single entry ("Server"). Calling [1] on it asserts then.

QFATAL : tst_QWebSocketServer::tst_connectivity()
 ASSERT failure in QList<T>::operator[]: "index out of range", file
/ssd/milian/projects/compiled/qt5/include/QtCore/qlist.h, line 476

Change-Id: I3e5c4750b304b2a4a5669a39e2d65a6b3e4e99cf
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
src/websockets/qwebsocket_p.cpp