Again, thanks a lot for your help! My problem is, that I use the WebDAV
server to sync with zotero (http://www.zotero.org). Zotero uses WebDAV
to store attachments for library items. This is why I have to use WebDAV
and unfortunately not SSH or FTP... :-(

Since the sync did not work properly I asked for help on Zotero support
forum. Dan Stillman (one of the "brains" and programmers behind Zotero)
figured out, that I probably have a problem with my WebDAV server and
not with a bug of Zotero itself ("It's your WebDAV server, not Zotero.
The server is returning a 204, and the timestamp isn't changing."). I
assume that Zotero uses libcurl to update the file "lastsync" since he
suggested to use curl to test the issue ("You should be able to test
this with your server with curl, at any rate."). This is why I (1) use
curl to test and (2) use WebDAV at all...

curl with --verbose:

apfel:~ ts$ curl -T empty -u zotero:secret --verbose
http://abc.d/zotero/empty
* About to connect() to abc.de port 80 (#0)
*   Trying 12.34.56.78... connected
* Connected to abc.de (12.34.56.78) port 80 (#0)
* Server auth using Basic with user 'zotero'
> PUT /zotero/empty HTTP/1.1
> Authorization: Basic xyz==
> User-Agent: curl/7.19.7 (universal-apple-darwin10.0) libcurl/7.19.7
OpenSSL/0.9.8l zlib/1.2.3
> Host: abc.de
> Accept: */*
> Content-Length: 0
> Expect: 100-continue
>
< HTTP/1.1 204 No Content
< Date: Fri, 23 Jul 2010 17:14:29 GMT
< Server: Apache/2.2.8 (Ubuntu) DAV/2 mod_python/3.3.1 Python/2.5.2
PHP/5.2.4-2ubuntu5.10 with Suhosin-Patch mod_ssl/2.2.8 OpenSSL/0.9.8g
< Content-Length: 0
< Content-Type: text/plain
<
* Connection #0 to host billroth.de left intact
* Closing connection #0

Do you think it is a curl issue? Then I would probably go ahead and ask
for help on the curl mailing list....

Regards,

Thorsten


Am 23.07.10 18:16, schrieb Doug McNutt:

> At 16:18 +0200 7/23/10, Thorsten Steinbrenner wrote, and I snipped:
>> I played around a bit and figured out,
>> that the timestamp is updated if the file is not empty. If the file is
>> empty the timestamp is NOT updated:
>>
>> Client:
>>
>> apfel:~ ts$ echo "abc" > test
>> apfel:~ ts$ touch test
>> apfel:~ ts$ ls -l test
>> -rw-r--r--  1 ts  staff  4 23 Jul 15:54 test
>> apfel:~ ts$ curl -T test -u zotero:secret http://abc.de/zotero/test
>> (...waiting for 2 minutes...)
>> apfel:~ ts$ touch test
>> apfel:~ ts$ ls -l test
>> -rw-r--r--  1 ts  staff  4 23 Jul 15:56 test
>> apfel:~ ts$ curl -T test -u zotero:secret http://abc.de/zotero/test
>>
>> Server:
>>
>> r...@abc:/etc/apache2# ls -l /var/zotero/test
>> -rw-r--r-- 1 www-data www-data 4 2010-07-23 15:54 test
>> r...@abc:/etc/apache2# ls -l /var/zotero/test
>> -rw-r--r-- 1 www-data www-data 4 2010-07-23 15:56 test
>>
>> However, it does _not_ work if the file is empty:
>>
>> Client:
>>
>> apfel:~ ts$ touch empty
>> apfel:~ ts$ ls -l empty
>> -rw-r--r--  1 ts  staff  0 23 Jul 16:03 empty
>> apfel:~ ts$ curl -T empty -u zotero:secret http://abc.de/zotero/empty
>> (...waiting for 2 minutes...)
>> apfel:~ ts$ touch empty
>> apfel:~ ts$ ls -l empty
>> -rw-r--r--  1 ts  staff  0 23 Jul 16:05 empty
>> apfel:~ ts$ curl -T empty -u zotero:secret http://abc.de/zotero/empty
>>
>> Server:
>>
>> r...@abc:/etc/apache2# ls -l /var/zotero/empty
>> -rw-r--r-- 1 www-data www-data 0 2010-07-23 16:01 /var/zotero/empty
>> r...@abc:/etc/apache2# ls -l /var/zotero/empty
>> -rw-r--r-- 1 www-data www-data 0 2010-07-23 16:01 /var/zotero/empty
> 
> It's possible that curl is at least part of the problem.
> A couple of suggestions:
> 
> What if the server file is not empty when the empty file is uploaded? Or was 
> it that way?
> 
> Try curl with the --verbose option set.
> 
> Try curl using ftp:   curl --verbose  -T empty -u zotero:secret 
> ftp://abc.de/var/zotero/empty
> 
> Try using scp if it's supported and you want to spend time setting up 
> required $HOME/.ssh files. With ssh you could actually "touch" the empty file.
> 
> It's just possible that some software is being more helpful than you like. 
> The curl mailing list is quite active and helpful. I don't know if curl uses 
> your Apache server to accomplish an HTTP upload.
> 
> List-Archive: <http://cool.haxx.se/pipermail/curl-users>
> List-Post: <mailto:curl-us...@cool.haxx.se>
> List-Help: <mailto:curl-users-requ...@cool.haxx.se?subject=help>
> List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users>, 
> <mailto:curl-users-requ...@cool.haxx.se?subject=subscribe>
> 



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to