If that is the entire response from the server then you are getting the appropriate error message. The Content-Length header indicates there should be substantial content following the headers (620 bytes) but the server is terminating the connection before this has been received. That is, this is not a valid/complete HTTP response and Qt is not interpreting it as such.
By my reading, if you received the entire HTTP response then line 11 would show those 620 bytes from the body, line 13 would give QNetworkReply::AuthenticationRequiredError (or QNetworkReply::ContentAccessDenied), and line 15 the text "Unauthorised". Your QNetworkAccessManager would probably emit authenticationRequired() as well.
Bookmarks