printing html content on the retreive

jesso1607 at rogers.com jesso1607 at rogers.com
Wed Jun 23 13:48:55 BST 2004


In readBody, before each "return true" I do this:

kdDebug(7113) << "(" << m_pid << ") JASON 1 HTTPProtocol::readBody: html body: " << m_bufReceive.data() << endl;

I also tried using "QCString(m_bufReceive)" instead of m_bufReceive.data().

I do see my print stuff but not the contents of m_bufReceive in ~/.xsession.log.  Almost like there is none.

I don't quite see where the problem could be.

Thanks for any help.




> 
> From: David Faure <faure at kde.org>
> Date: 2004/06/22 Tue PM 04:49:27 EDT
> To: kfm-devel at kde.org
> Subject: Re: printing html content on the retreive
> 
> On Tuesday 22 June 2004 22:26, jesso1607 at rogers.com wrote:
> > I would like to print the content body when getting the response from the server.
> > 
> > In kdelibs/kioslave/http/http.cc, method readBody I put some debug statements that print m_bufReceive. 
> > 
> > I don't get any data printed before returning from the method.
> 
> So you get debug but no body contents, or no debug at all?
> A common mistake is to miss the fact that debug output from kioslaves goes
> to ~/.xsession-errors or to the terminal where you restart kdeinit.
> 
> Now if you knew all that and the problem is where to put the debug:
> note that readBody has two main cases: reading from cache, and then
> reading from network (if the cache wasn't available or to be used).
> Printing m_bufReceive sounds correct, but note that it's a bytearray so
> it's not particularly easy to print out. You have to use e.g. QCString(data,len).
> It's certainly simpler to print this from the client side...
> Another good place is from the data() call (at line 4067 here). AFAICS this is
> the single place where kio_http emits the received data.
> 
> -- 
> David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
> Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
> 

     





More information about the kfm-devel mailing list