[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] serf/ra_serf: add cansend callback to stop writing requests untill authn handshake is finished

From: Ivan Zhakov <chemodax_at_gmail.com>
Date: 2007-08-28 12:27:53 CEST

On 7/25/07, Lieven Govaerts <lgo@mobsol.be> wrote:
> Attached two patches implement a new callback 'cansend' in serf which is
> used in ra_serf to hold sending a bunch of requests before the NTLM
> authentication handshake is finished.
>
> We need this callback in this scenario: consider an apache setup with
> NTLM authentication MaxRequestsPerChild set to 100. Now use svn to
> checkout a directory with more than 50 files. Serf will make 100
> requests (PROPFIND+GET) for all those files and sends them on one of the
> connections. What happens is that the before the NTLM handshake is
> finished, the connection will already max out on the number of requests.
>
> The patch for serf adds the callback and uses it in
> context.c/write_connection. The callback can be used for all connection
> based authentication protocols, the NTLM part is the first
> implementation using it.
>
> The serf patch changes the serf_connection_create function declaration,
> I suppose there's no API compatibility guarantee before serf 1.0?
>
> Note that the ra_serf patch applies to current HEAD of the ra_serf-auth
> branch of Subversion, While after this patch the code will be complete,
> it's still not stable enough to integrate back to trunk.
>
I spend some time reviewing your patches and trying to understand how to
fix this problem. I didn't come to final decision, but I've some thoughts.

Sending first request, complete authentication and then send other
request isn't bullet proof solution. Just imagine if first request
isn't require authentication at all, but following ones want it?

Also sending 100 pipelined requests isn't good idea for me. I think we have to
implement limit for maximum number of concurrent pipelined requests as other
clients do. Mozilla Firefox has limit to 4 pipelined requests for example.

Actually MaxRequestsPerChild limits number of connections per child
[1]. Number of requests per connection controlled by
MaxKeepAliveRequests [2].

[1] http://httpd.apache.org/docs/2.0/mod/mpm_common.html#maxrequestsperchild
[2] http://httpd.apache.org/docs/2.0/mod/core.html#maxkeepaliverequests

> Note2: I propose you add 'svn:eol-style' 'native' to the serf source
> files, makes it a bit easier to patch them on Windows.
>
PS: I've changed svn:eol-style to native in all serf sources files.

-- 
Ivan Zhakov
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Aug 28 12:31:47 2007

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.