PATCH: kio_http

Dawit A. adawit at kde.org
Tue Apr 9 06:42:03 BST 2002


On Tuesday 09 April 2002 01:07, Waldo Bastian wrote:
> On Monday 08 April 2002 09:41 pm, Dawit A. wrote:
> > Hi,
> >
> > Here is a patch for kio_http that fixes and/or modifies the following
> > things, please review since it needs to be backported into 3_0_BRANCH as
> > well
> >
> > - Make HTTP authentication over a proxied SSL connection work.  Problem
> > reported on kfm-devel by David Bishop.  This was broken when we were
> > attempting to fix persistent connections.  It also showed me another bug
> > where we were prematurely storing the authentication data which
> > incorrectly resulted in the "Authentication Failed" dialog.
> >
> > - Remove two function: unused httpIsConnected which I added at one time
> > and subsequently forgot to remove.  And httpCloseConnection which is
> > simply redundant to closeConnection.  closeConnection simply called
> > httpCloseConnection.
>
> The difference is that httpCloseConnection is an internal function while
> closeConnection gets called from the application as part of the slave API.

Right.  But we do not do anything special in httpCloseConnection at all and it 
can be added at anytime if such need arises.  Right now, it is simply an 
unnecessary overhead of a extra function call.

> I rather keep the two seperate.

Well, I do not see why but I guess I can do that...

> > - Re-do the persistent connection fix and handle it in one function
> > httpClose instead of all the places we call httpCloseConnection now.  I
> > only consider POST to be an idempotent method as per 2616. Still if we
> > want we can change the check to only allow persistence for GET.
>
> Yes, please, I did add it for those other methods for a reason.

which is (not being sarcastic) ? But just the same I changed that from != 
HTTP_POST to == HTTP_GET.

BTW, we still do not have proper persistent connection support for 1.1 
complaint proxy servers because of the following code you added to fix 
problems in junk-busters:

// Connections with proxies are closed by default because
// some proxies like junkbuster can't handle persistent
// connections but don't tell us.
// We will still use persistent connections if the proxy
 // sends us a "Connection: Keep-Alive" header.
if (m_state.doProxy)
  m_bKeepAlive = false;
else
  m_bKeepAlive = true; // HTTP 1.1 has persistant connections.

Basically no HTTP/1.1 complaint server will send you Connection: Keep-Alive 
since that is th default.  And it does not work with HTTP/1.0 proxies like 
Squid because we no longer send "Connection: Keep-Alive header".  This issue 
can really get ugly :)

> Please note that mkdir still calls closeConnection itself, I guess it
> should be removed there.

Ooops, removed.

Regards,
Dawit A.





More information about the kde-core-devel mailing list