Hello, dev! Here is my second attempt: [[[ Accept "kw" parameter in query string. Treat any value except "0" as a request to perform server-side keywords substitution in file contents.
* subversion/mod_dav_svn/dav_svn.h
(struct dav_resource_private): add keyword_subst flag.
* subversion/mod_dav_svn/repos.c
(svn_subst.h): Add #include.
(parse_querystring): Set keyword_subst flag if query string contains
"kw" parameter with any value except "0".
(set_headers):
If keyword_subst flag is set, don't send "Content-length". We
can't guess the size of expanded stream at the moment.
(deliver):
If keyword_subst flag is set, perform keywords substitution like
client-side utilities do.
]]]
The URL looks like this:
http://example.com/svn/project/file.txt?p=123&kw=1
VB> On Fri, Mar 8, 2013 at 2:24 PM, Ben Reser <[email protected]> wrote:
VB> On Fri, Mar 8, 2013 at 11:12 AM, Vladimir Berezniker <[email protected]>
wrote:
>> If someone does not mind explaining. ═What would be the benefit of having
>> this decision be made by the server vs the client having to request that via
>> a explicit parameter on the request?
VB> It's not so much of a benefit as it is a compatibility problem. ═We
VB> support WebDAV clients with auto-versioning. ═WebDAV+auto-versioning
VB> lets you mount a SVN repository as though it was a regular file system
VB> and just start making changes with each change automatically committed
VB> as a revision. ═These clients are at current indistinguishable from a
VB> web browser, they make similar requests that a web browser would and
VB> don't have some pattern we can key off in the GET request.
VB> When using these clients it's important that we don't present to them
VB> a different version of the file than what the repository actually
VB> stores. ═Otherwise we break this functionality.
VB> Using a query parameter means you can ask for the keyword expansion
VB> without breaking these clients.
VB> Query parameter makes perfect sense to me. ═Thank you.═
--
Best regards,
jinfroster mailto:[email protected]
mod_dav_svn_kw_subst.diff
Description: Binary data

