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

Re: [PATCH] Allow http auth protocols to be configurable

From: Garrett Rooney <rooneg_at_electricjellyfish.net>
Date: 2006-09-18 17:00:10 CEST

On 9/16/06, D.J. Heap <djheap@gmail.com> wrote:

> Allow http auth protocols to be configurable.
>
> Neon 0.26 added support for selecting the auth protocols to
> use. This change takes advantage of that support to
> allow the user to specify the auth protocols they want to use
> if they have a new enough neon.
>
> The default protocols if no config is specified are basic and
> digest for http, or basic, digest and negotiate for https.

What should this do with versions of Neon other than 0.26? Should we
just silently ignore the configuration options?

Also, your indenting is off in this section:

+#ifdef SVN_NEON_0_26
+ if (http_auth_str)
+ {
+ char *token, *last;
+
+ apr_collapse_spaces(http_auth_str, http_auth_str);
+ while ((token = apr_strtok(http_auth_str, ";", &last)) != NULL)
+ {
+ http_auth_str = NULL;
+ if (strcasecmp("basic", token) == 0)
+ *neon_auth_protocols |= NE_AUTH_BASIC;
+ else if (strcasecmp("digest", token) == 0)
+ *neon_auth_protocols |= NE_AUTH_DIGEST;
+ else if (strcasecmp("negotiate", token) == 0)
+ *neon_auth_protocols |= NE_AUTH_NEGOTIATE;
+ else
+ return svn_error_create(SVN_ERR_RA_DAV_INVALID_CONFIG_VALUE, NULL,
+ _("Invalid config: unknown http auth"
+ "protocol"));
+ }
+ }
+#endif

Should be

if (http_auth_str)
  {

  }

And likewise for the while loop.

-garrett

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Sep 18 17:00:56 2006

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.