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

Re: svn commit: r34322 - in branches/http-protocol-v2/subversion: include mod_dav_svn

From: Greg Stein <gstein_at_gmail.com>
Date: Sat, 22 Nov 2008 08:03:07 -0800

On Fri, Nov 21, 2008 at 21:21, Ben Collins-Sussman <sussman_at_red-bean.com> wrote:
> On Fri, Nov 21, 2008 at 10:15 PM, Greg Stein <gstein_at_gmail.com> wrote:
>...
>> Further, the "=" is not a valid separator. That is a perfectly normal
>> character in a URI, so you can't just arbitrarily separate the URI
>> from the relative-path using that.
>>
>> Suggestion: since the DAV: header is mostly about advertising
>> features, and since these new bits are key/value pairs, then they
>> should be advertised as response headers.
>>
>> SVN-Root-Stub: !svn/me
>
> I wanted to do this as my first instinct, but the get_vsn_options()
> function doesn't have the ability to create arbitrary response
> headers. It returns header *values* to mod_dav, and mod_dav then
> slaps a DAV: in front. Any solution here?

A bit of a hack here. The request_rec is in the private data of the
resource. You can use that to access r->headers_out and set arbitrary
headers. Do that in the get_option() callback. We happen to know that
a body will always be sent in the OPTIONS request, so that function
will always be called. (and if an arbitrary client sends OPTIONS
without a body, then they won't get the extra headers)

Sucky, but mod_dav isn't giving enough/proper hooks for us. (and I
don't think we want to set a minimum Apache httpd version).

>...
> Well, we can say that they represent revision resources all we want,
> but we have *no* other use cases at the moment other than accessing
> revprops. So the comment is simply stating how the stub is
> immediately useful. Do you really expect that revision resources will
> have other uses someday?

No idea. How about:

/* revision resources (for revprops) */

>...
>> I think this should be returned in the headers of the response to the
>> OPTIONS request (e.g. SVN-Youngest-Revision: 123). No conditionals.
>> Just return the value.
>
> Sounds good, but I'm not seeing the mechanics here either.
> get_option() is called by mod_dav on a specific resource, and only
> gives us a chance to append text to the OPTIONS body response.
> There's no way to tweak the response headers from that routine, is
> there?

See above.

Cheers,
-g

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-11-22 17:03:23 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.