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

Re: Problems with commit feature negotiation and write-through proxies

From: Evgeny Kotkov <evgeny.kotkov_at_visualsvn.com>
Date: Wed, 10 Jan 2018 19:10:04 +0300

Evgeny Kotkov <evgeny.kotkov_at_visualsvn.com> writes:

>> Index: subversion/mod_dav_svn/version.c
>> ===================================================================
>> --- subversion/mod_dav_svn/version.c (revision 1820704)
>> +++ subversion/mod_dav_svn/version.c (working copy)
>> @@ -152,9 +152,6 @@ get_vsn_options(apr_pool_t *p, apr_text_header *ph
>> apr_text_append(p, phdr, SVN_DAV_NS_DAV_SVN_INHERITED_PROPS);
>> apr_text_append(p, phdr, SVN_DAV_NS_DAV_SVN_INLINE_PROPS);
>> apr_text_append(p, phdr, SVN_DAV_NS_DAV_SVN_REVERSE_FILE_REVS);
>> - apr_text_append(p, phdr, SVN_DAV_NS_DAV_SVN_SVNDIFF1);
>> - apr_text_append(p, phdr, SVN_DAV_NS_DAV_SVN_SVNDIFF2);
>> - apr_text_append(p, phdr, SVN_DAV_NS_DAV_SVN_PUT_RESULT_CHECKSUM);
>> apr_text_append(p, phdr, SVN_DAV_NS_DAV_SVN_LIST);
>> /* Mergeinfo is a special case: here we merely say that the server
>> * knows how to handle mergeinfo -- whether the repository does too
>> @@ -297,6 +294,19 @@ get_option(const dav_resource *resource,
>> { "create-txn-with-props", { 1, 8, 0, "" } },
>> };
>>
>> + /* These capabilities are used during commit and when acting as
>> + a WebDAV slave (SVNMasterURI) their availablity depends on
>> + the master version (SVNMasterVersion) rather than our own
>> + (slave) version. */
>> + struct capability_versions_t {
>> + const char *capability_name;
>> + svn_version_t min_version;
>> + } capabilities[] = {
>> + { SVN_DAV_NS_DAV_SVN_SVNDIFF1, { 1, 7, 0, ""} },
>> + { SVN_DAV_NS_DAV_SVN_SVNDIFF2, { 1, 10, 0, ""} },
>> + { SVN_DAV_NS_DAV_SVN_PUT_RESULT_CHECKSUM, { 1, 10, 0, ""} },
>> + };
>
> I would be fine with this approach as well, but perhaps with a few tweaks:

I also notice that this patch only advertises the new capabilities if the
server is configured to enable HTTPv2. This is probably unintended, as
I think that there is no reason to disable these PUT-related capabilities
(such as being able to parse svndiff1/svndiff2) if the server is configured
to prefer HTTPv1 protocol with SVNAdvertiseV2Protocol off.

Thanks,
Evgeny Kotkov
Received on 2018-01-10 17:10:29 CET

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.