You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Ben Collins-Sussman <su...@red-bean.com> on 2008/12/22 17:36:07 UTC

confused about serf OPTIONS request

When I look at serf's options.c file, it appears that it *always*
sends an OPTIONS request which includes "D:activity-collections-set"
in the body.

And yet when I set 'http-library = serf" in my ~/.subversion/servers
file, and then run "svn ls http://localhost/repos/test2", my wire
capture shows *no* body in the OPTIONS request.

Am I misunderstanding something fundamental about serf?

Here's the excerpt from my capture:

---------

OPTIONS http://localhost/repos/test2 HTTP/1.1
DAV: http://subversion.tigris.org/xmlns/dav/svn/depth,http://subversion.tigris.org/xmlns/dav/svn/mergeinfo,http://subversion.tigris.org/xmlns/dav/svn/log-revprops
User-Agent: SVN/1.6.0 (dev build) serf/0.3.0
Host: localhost


Date: Mon, 22 Dec 2008 17:30:21 GMT
Server: Apache/2.2.10 (Unix) SVN/1.6.0-dev DAV/2
DAV: 1,2
DAV: version-control,checkout,working-resource
DAV: merge,baseline,activity,version-controlled-collection
DAV: http://subversion.tigris.org/xmlns/dav/svn/depth
DAV: http://subversion.tigris.org/xmlns/dav/svn/log-revprops
DAV: http://subversion.tigris.org/xmlns/dav/svn/partial-replay
DAV: http://subversion.tigris.org/xmlns/dav/svn/mergeinfo
DAV: <http://apache.org/dav/propset/fs/1>
MS-Author-Via: DAV
Allow: OPTIONS,GET,HEAD,POST,DELETE,TRACE,PROPFIND,PROPPATCH,COPY,MOVE,LOCK,UNLOCK,CHECKOUT
Content-Length: 0
Content-Type: text/plain

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=989942

Re: confused about serf OPTIONS request

Posted by Greg Stein <gs...@gmail.com>.
Can you also take a look at correcting the property asked for, per
Julian's note? It may be that we'll have to ask for both properties,
and old servers provide the old property, and new servers provide old
and new.

Oh. Or wait. v2 does't even *want* that property. For all intents and
purposes, it is now deprecated entirely.

Nevermind :-P
-g

On Tue, Dec 23, 2008 at 14:07, Ben Collins-Sussman <su...@red-bean.com> wrote:
> OK, so I'm now modifying the more general
> svn_ra_serf__create_options_req() not only request an
> activity-collection, but *also* always parse the server's capabilities
> headers directly into the serf-session's capability hash.  Then I can
> make the whole exchange_capabilities() utility call the generic
> OPTIONS request generator.
>
> Once that's done, I can *also* make the general function notice the
> new v2 protocol "stubs" and stash them in the serf session.
>
> The end result is that serf's OPTIONS code will be unified, and all
> OPTIONS requests always get the maximum amount of server information
> into the session.
>
> On Mon, Dec 22, 2008 at 12:27 PM, Lieven Govaerts <sv...@mobsol.be> wrote:
>> Ben,
>>
>> Ben Collins-Sussman wrote:
>>> When I look at serf's options.c file, it appears that it *always*
>>> sends an OPTIONS request which includes "D:activity-collections-set"
>>> in the body.
>>>
>>> And yet when I set 'http-library = serf" in my ~/.subversion/servers
>>> file, and then run "svn ls http://localhost/repos/test2", my wire
>>> capture shows *no* body in the OPTIONS request.
>>>
>>
>> The only OPTIONS request sent with 'svn ls' is used for the capabilities
>> check. This doesn't use the code in options.c, but the
>> exchange_capabilities code in serf.c. The same method, but no body.
>>
>> hth,
>>
>> Lieven
>>
>>
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=990999
>

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=991292

Re: confused about serf OPTIONS request

Posted by Ben Collins-Sussman <su...@red-bean.com>.
OK, so I'm now modifying the more general
svn_ra_serf__create_options_req() not only request an
activity-collection, but *also* always parse the server's capabilities
headers directly into the serf-session's capability hash.  Then I can
make the whole exchange_capabilities() utility call the generic
OPTIONS request generator.

Once that's done, I can *also* make the general function notice the
new v2 protocol "stubs" and stash them in the serf session.

The end result is that serf's OPTIONS code will be unified, and all
OPTIONS requests always get the maximum amount of server information
into the session.

On Mon, Dec 22, 2008 at 12:27 PM, Lieven Govaerts <sv...@mobsol.be> wrote:
> Ben,
>
> Ben Collins-Sussman wrote:
>> When I look at serf's options.c file, it appears that it *always*
>> sends an OPTIONS request which includes "D:activity-collections-set"
>> in the body.
>>
>> And yet when I set 'http-library = serf" in my ~/.subversion/servers
>> file, and then run "svn ls http://localhost/repos/test2", my wire
>> capture shows *no* body in the OPTIONS request.
>>
>
> The only OPTIONS request sent with 'svn ls' is used for the capabilities
> check. This doesn't use the code in options.c, but the
> exchange_capabilities code in serf.c. The same method, but no body.
>
> hth,
>
> Lieven
>
>

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=990999

Re: confused about serf OPTIONS request

Posted by Lieven Govaerts <sv...@mobsol.be>.
Ben,

Ben Collins-Sussman wrote:
> When I look at serf's options.c file, it appears that it *always*
> sends an OPTIONS request which includes "D:activity-collections-set"
> in the body.
> 
> And yet when I set 'http-library = serf" in my ~/.subversion/servers
> file, and then run "svn ls http://localhost/repos/test2", my wire
> capture shows *no* body in the OPTIONS request.
> 

The only OPTIONS request sent with 'svn ls' is used for the capabilities
check. This doesn't use the code in options.c, but the
exchange_capabilities code in serf.c. The same method, but no body.

hth,

Lieven

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=989983

Re: confused about serf OPTIONS request

Posted by Julian Reschke <ju...@gmx.de>.
Greg Stein wrote:
> 
> On Dec 22, 2008, at 9:56, Julian Reschke <ju...@gmx.de> wrote:
> 
>> Ben Collins-Sussman wrote:
>>> When I look at serf's options.c file, it appears that it *always*
>>> sends an OPTIONS request which includes "D:activity-collections-set"
>>> in the body.
>>> ...
>>
>> ...that doesn't seem to come from RFC 3253... Why does it use the DAV:
>> namespace?
> 
> How does 3253 tell you where to create an activity with MKACTIVITY? (on 
> iPhone, can't research it now)
> 
> If it isn't there somewhere, then I must have made it up.
> ...

Oops, it's DAV:activity-collection-set (note the missing "s"). Missed 
that when I looked for it.

BR, Julian

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=991000

Re: confused about serf OPTIONS request

Posted by Greg Stein <gs...@gmail.com>.
On Dec 22, 2008, at 9:56, Julian Reschke <ju...@gmx.de> wrote:

> Ben Collins-Sussman wrote:
>> When I look at serf's options.c file, it appears that it *always*
>> sends an OPTIONS request which includes "D:activity-collections-set"
>> in the body.
>> ...
>
> ...that doesn't seem to come from RFC 3253... Why does it use the DAV:
> namespace?

How does 3253 tell you where to create an activity with MKACTIVITY?  
(on iPhone, can't research it now)

If it isn't there somewhere, then I must have made it up.

Cheers,
-g

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=990992

Re: confused about serf OPTIONS request

Posted by Julian Reschke <ju...@gmx.de>.
Ben Collins-Sussman wrote:
> When I look at serf's options.c file, it appears that it *always*
> sends an OPTIONS request which includes "D:activity-collections-set"
> in the body.
> ...

...that doesn't seem to come from RFC 3253... Why does it use the DAV: 
namespace?

BR, Julian

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=989955