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

Re: [PATCH] perform keywords substitution in mod_dav_svn

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: Tue, 9 Apr 2013 11:07:46 -0400

On 04/09/2013 09:46 AM, C. Michael Pilato wrote:
> On 04/07/2013 01:38 PM, jinfroster wrote:
>> + keyword_subst = apr_table_get(pairs, "kw");
>> + if (keyword_subst && *keyword_subst != '0')
>> + comb->priv.keyword_subst = TRUE;
>> +
>> return NULL;
>> }
>
> I'm with Daniel -- this should check for "1" explicitly.

In this function, I also caused mod_dav_svn to preserve the "kw=1" flag when
redirecting. Without this change, a request like:

   .../path/to/file?r=100&kw=1

would get redirected to:

   .../path/to/file?p=100

(Note the missing "kw" flag.) That's fixed in the version I committed.

>> + str_uri = apr_psprintf(resource->pool,
>> + "%s%s", resource->info->repos->base_url,
>> + resource->info->r->uri);
>
> This URL construction doesn't feel quite right. I *think* you want:

Turns out you were mostly correct after all. Just needed to ap_escape_uri()
the r->uri bit.

> All that said, I think you've given us enough to work with here, so I'll try
> to patch up your patch, test, and commit.

Finished.

   Sending subversion/mod_dav_svn/dav_svn.h
   Sending subversion/mod_dav_svn/repos.c
   Transmitting file data ..
   Committed revision 1466055.

Thanks for the patch and for patiently working through our patch submission
process.

-- 
C. Michael Pilato <cmpilato_at_collab.net>
CollabNet   <>   www.collab.net   <>   Enterprise Cloud Development

Received on 2013-04-09 17:08:19 CEST

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