Improve the HTTP status line parsing and catch more errors.
commita18ebd2a70e83863bc9a8cc64a65791a6d879f02
authorThiago Macieira <thiago.macieira@nokia.com>
Wed, 13 May 2009 11:27:01 +0000 (13 13:27 +0200)
committerThiago Macieira <thiago.macieira@nokia.com>
Wed, 13 May 2009 11:55:58 +0000 (13 13:55 +0200)
treec7afcf827a8d297093eab50313124e3a0568c429
parent87022c9a4ab00a9faaf6bcdaa8d5884962ccf305
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
src/network/access/qhttpnetworkreply.cpp
src/network/access/qhttpnetworkreply_p.h
tests/auto/qnetworkreply/tst_qnetworkreply.cpp