PATCH: kio_http

Dawit A. adawit at kde.org
Mon Nov 11 06:04:47 GMT 2002


On Monday 11 November 2002 00:06, George Staikos wrote:
> On Sunday November 10 2002 23:47, Dawit A. wrote:
> > Hi,
> >
> > Attached is a patch that fixes few things
> >
> > - kio_http crashes if one accidentally mistypes a URL, ex:
> > http:/www.kde.org (notice the missing /).  This happens because KURL
> > nterprets it as a URL without a hostname. kio_http correctly detects that
> > the hostname is missing and attempts to return an error message, but it
> > crashes because none of the variables in the structures we use have been
> > properly initialized :(
> >
> > - bug# 50549 whose severity level was changed by Dirk.  Note: I fixed
> > this in kio_http because it was easy enough to do it here thanks to
> > George's "ssl_was_in_use" meta-data.  Fixing it in khtml would require
> > much much more effort.
>
>    Great!  I had started working on this earlier tonight.  My first patch
> didn't do the whole job so I left it.  Anyhow, did you take care of all
> possible redirect cases too?  I'm not sure if your patch is sufficient for
> that.

That should be no problem since ::resetSessionSettings is always for every new 
request which means redirections as well.  The only thing I am uncertain of 
is whether or not the "ssl_was_in_use" flag gets set correctly all the time.  
I ask this because I saw the following while testing:

kio_http_debug: (24621) Hostname is now: www.osdn.com
kio_http_debug: (24621) HTTPProtocol::get http://www.osdn.com/newsletters/
kio_http_debug: (24621) HTTPProtocol::checkRequestURL: 
http://www.osdn.com/newsletters/
kio_http_debug: (24621) Using proxy: false URL:  Realm: 
kio_http_debug: (24621) Enable Persistent Proxy Connection: true
kio_http_debug: (24621) Window Id = 37748740
kio_http_debug: (24621) ssl_was_in_use = TRUE

kio_http_debug: (24625) Hostname is now: images.osdn.com
kio_http_debug: (24625) HTTPProtocol::get 
http://images.osdn.com/banner/hpsm5005en.gif?1036987987650
kio_http_debug: (24625) HTTPProtocol::checkRequestURL:  
http://images.osdn.com/banner/hpsm5005en.gif?1036987987650
kio_http_debug: (24625) Using proxy: false URL:  Realm: 
kio_http_debug: (24625) Enable Persistent Proxy Connection: true
kio_http_debug: (24625) Window Id = 37748740
kio_http_debug: (24625) ssl_was_in_use = 
							 ^^^^^^^^
Hmm... why is this blank.  I was expecting it to be FALSE.

kio_http_debug: (24624) Hostname is now: ad.doubleclick.net
kio_http_debug: (24624) HTTPProtocol::get 
http://ad.doubleclick.net/adi/N2537.osdn.com/B1074990.5;sz=468x60;ord=103698812103698812
kio_http_debug: (24624) HTTPProtocol::checkRequestURL:  
http://ad.doubleclick.net/adi/N2537.osdn.com/B1074990.5;sz=468x60;ord=103698812103698812
kio_http_debug: (24624) Using proxy: false URL:  Realm: 
kio_http_debug: (24624) Enable Persistent Proxy Connection: true
kio_http_debug: (24624) Window Id = 37748740
kio_http_debug: (24624) ssl_was_in_use = FALSE

Now that is correct.  The above debug snippet was from going to 
https://sourceforge.net and clicking on the "Newsletter" link which points to 
a non-ssl site.

Regards,
Dawit A.




More information about the kfm-devel mailing list