Could you tell me what is the sense of this line?

Qt Code:
  1. QStringList request = QString(m_pSSLSocket->readLine()).split(QRegExp("[ \r\n][ \r\n]*"));
To copy to clipboard, switch view to plain text mode 

As in my language it says "read one line and split it on the 'new line' character". If you read one line how can it have any newline characters?

Analyze your code. Think whether it may happen that you receive the request in different chunks that you sent it, e.g.:

chunk 1:
GE

chunk 2:
T /index.html HTTP/1.

chunk 3:
1\r\nHost: mywonder

chunk 4:
fulhost.com\r\n

chunk 5:
\r\n


If you come to a conclusion that it might happen (I'll give you a hint: yes, it might) then look at your code again and see if it is able to handle that situation.

I can see this is some kind of school project so we're not allowed to give you complete solutions but such hint should be useful too.