PDA

View Full Version : QHttpResponseHeader is incomplete



arunredi
26th June 2008, 02:56
Hello!

I'm getting an incomplete response header when I'm using below code.



void snipit::somefunkyStuff()
{
http = new QHttp(this);
connect(http, SIGNAL(responseHeaderReceived(const QHttpResponseHeader &)),
this, SLOT(readResponseHeaderCita(const QHttpResponseHeader &)));
connect(http, SIGNAL(readyRead(const QHttpResponseHeader&)),
this, SLOT(readyReadCita(const QHttpResponseHeader&)));
-- some more code to do the http->request()
}

void snipit::readyReadCita( const QHttpResponseHeader &resp)
{ QByteArray ba;
ba=http->readAll();
QString temp1=ba;
QMessageBox::critical(this, "SNiPiTRON", temp1, QMessageBox::Ok,
QMessageBox::NoButton, QMessageBox::NoButton);
}

By using the above function I believe that I'm trying to read all the information before even the response is completely recieved hence I only see partial data. How can I over come this and read the whole response at once in complete?

Any directions would be very helpful.

Thanks in advance,

mcosta
26th June 2008, 11:31
Please!!!!!!!!
Don't cross post