I have a Webdrive (http://www.webdrive.com/products/webdrive/index.html)
client connected to a Subversion 1.5 repository on an Apache 2.0 server
using http to make the WEBDAV connection. Works fine: on what appears
to be a Windows drive users can edit files, which are then autoversioned.
Then I had a cunning plan: I wanted to implement "business rules"
on the webdrive using Subversion's pre-commit hook.
For instance, users would not be allowed to save files containing
certain known passwords.
Alas, while the pre-commit hook does indeed prevent such a file from
being saved, the Webdrive client tool doesn't notice that, and gives
the end-user no error wmessage hatsoever! Only if you re-open the
file then you see that your changes were not saved after all.
A Webdrive consultant investigated this, and claims that the WEBDAV
server isn't reporting any errors to the WEBDAV client (Webdrive),
and I tend to agree with him.
My Apache access log reports:
192.168.1.10 - srt [24/Nov/2008:23:55:27 +0100] "PUT
/svn_webdrive/test/file.txt HTTP/1.1" 204 - "-" "WebDrive 8.22.2090 DAV"
192.168.1.10 - srt [24/Nov/2008:23:55:27 +0100] "PROPFIND
/svn_webdrive/test/file.txt HTTP/1.1" 207 917 "-" "WebDrive 8.22.2090 DAV"
192.168.1.10 - srt [24/Nov/2008:23:55:27 +0100] "PROPPATCH
/svn_webdrive/test/file.txt HTTP/1.1" 207 372 "-" "WebDrive 8.22.2090 DAV"
My Apache error log reports:
[Tue Nov 25 00:50:00 2008] [warn] [client 192.168.1.10] The PUT was
successful, but there was a problem automatically checking in the resource
or its parent collection. [500, #0]
[Tue Nov 25 00:50:00 2008] [warn] [client 192.168.1.10] Unable to
auto-checkin resource
/svn_webdrive/test/!svn/wrk/d285970d-785c-0410-b6d0-e9400749ec0c/file.txt.
[500, #0]
[Tue Nov 25 00:50:00 2008] [warn] [client 192.168.1.10] Commit blocked by
pre-commit hook (exit code 156) with output:\nHTTP/1.1 412
Conflict\nContent-Type: text/html\nContent-Length: 2048\n\n<!DOCTYPE HTML
PUBLIC "-//IETF//DTD HTML 2.0//EN">\n<HTML>\n <HEAD><TITLE>401
Authorization Required</TITLE></HEAD>\n <BODY>\n <H1>Authorization
Required</H1>\n </BODY>\n</HTML>\n\n [409, #165001]
Webdrive (the WEBDAV client) sees the 204 and 207 status codes from server,
and so correctly doen't report any errors to the Windows user.
As you might see from the error log I have tried to generate my own http
response file (not because anything says that should work, but just to try
anything), but the WEBDAV server ignores this.
Observation: the error log says the exit code is 156, but it actually was
412.
So here is my question:
Am I doing something wrong, or is it indeed SVN's WEBDAV server which is
buggy in this respect? And in the latter case, is there something I can do
to make WEBDAV or Apache return a 412 instead of a 207 status code?
Thanks for any clues you might have,
Carlo
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-11-25 01:28:00 CET