http status code

Miroslav Suchý miroslav at suchy.cz
Wed Sep 6 10:04:36 BST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


David Faure napsal(a):
> > On Friday 27 January 2006 16:04, Miroslav Suchý wrote:
>> >> David Faure wrote:
>>> >>> On Tuesday 24 January 2006 19:40, Miroslav Suchý wrote:
>>>> >>>> So I change and specify my question:
>>>> >>>> I have class derived from KHTMLPart and I need access to HTTP
headers of
>>>> >>>> opened page. Can somebody point me where I can find it?
>>>> >>>>
>> >>  > job->addMetaData("PropagateHttpHeader","true") should give you the
>> >> HTTP headers
>>> >>> at the end of the job. When using KHTMLPart, you can connect to
started(KIO::Job*) in order
>>> >>> to get the job instance being used to download the stuff.
>> >> Why I do not get job instance?
> >
> > Because my advice was crap, actually. Look at khtml_part.cpp, it
says emit started(0).
> > This is because we don't want the progress info to depend on this
job only, so it passes 0.
> >
> > I think you need to modify KHTMLPart to add a job() method,
implemented as:
> > KIO::Job* KHTMLPart::job() {
> >     return d->m_job;
> > }
> >
> > Right now the job is completely internal to KHTMLPart, I see no way
of accessing it
> > from the outside.
> >
> > Or (binary incompatible, so for kde4), we could add a virtual void
startingJob( KIO::Job * ) { }
> > so that derived classes can do something with that job before it
gets started.
> > Connecting signals to it would have the undefined-order-of-slots
problem though,
> > so we should probably also make slotFinished() virtual in kde4.
> >

Hi,
I was just checking developer release of KDE 4.0 and I hoped I'll find
these methods we spoke about in January. But I cannot find them nor
anything similar.
Summary:
I need to get http status code of page in KHTML. This is now not
possible. And David suggested to add in KDE 4.0 these method to:
in KHTMLPart:
KIO::Job* KHTMLPart::job() {
     return d->m_job;
}
and
virtual void startingJob( KIO::Job * ) { }
which will be called before job is started.

Can these method be implemented in current KDE 4, before will be finall
release?

Regards
	Miroslav Suchy
- --
                                        ,,,
                                       (o o)
  =================================oOO==(_)==OOo===========
 )               mailto:miroslav at suchy.cz
(   ICQ: #70802630 tel:+420-603-775737 skype:MiroslavSuchy
 )
( "Programming today is a race between software engineers
 ) striving to build bigger and better idiot-proof programs,
(  and the Universe trying to produce bigger and better idiots.
 )  So far, the Universe is winning."  -- Rich Cook
(________________________________________Oooo._____________
                                 .oooO   (   )
                                 (   )    ) /
                                  \ (    (_/
                                   \_)

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFE/o8kZmvK+vtVT0wRAsHEAJ9ER1K+iKl+0I+DEQ3HDt9hC3RVXACfQo93
ZVCpEEMh70WSqK0Ki63gcWw=
=4vhY
-----END PGP SIGNATURE-----




More information about the kfm-devel mailing list