Tags:
create new tag
view all tags

Question

The WebDAV plugin seems to truncate imported files to 0 Bytes.

Details

I installed the WebDAV plugin exactly as described, but now, when I upload some files to a DAV resource, they are truncated to 0 Bytes.

This is the DAV log from Apache:

----------------------------------------------------------------------------------
Check access Sandbox/DavTest//home/twiki/pub/Sandbox/DavTest/pe1800.pdf:V for jhassler
Test access to / for user jhassler
Test access to P:/Sandbox/:V for user jhassler
Test access to P:/Sandbox/DavTest:V for user jhassler
P:/Sandbox/DavTest:V for jhassler is accessible
DAV: HEAD /twikidav/pub/Sandbox/DavTest/pe1800.pdf: regular versioned file, does not exist, base 0 work 1 (twiki Sandbox/DavTest)
Check access Sandbox/DavTest//home/twiki/pub/Sandbox/DavTest/pe1800.pdf:C for jhassler
Test access to / for user jhassler
Test access to P:/Sandbox/:C for user jhassler
Test access to P:/Sandbox/DavTest:C for user jhassler
P:/Sandbox/DavTest:C for jhassler is accessible
DAV: PUT /twikidav/pub/Sandbox/DavTest/pe1800.pdf: regular versioned file, does not exist, base 0 work 1 (twiki Sandbox/DavTest)
DAV_FS_VSN: CHECKIN  /twikidav/pub/Sandbox/DavTest/pe1800.pdf: regular versioned file, exists, base 0 work 1 (twiki Sandbox/DavTest)
----------------------------------------------------------------------------------

This is my Apache config:

----------------------------------------------------------------------------------
Alias /twikidav/pub/ /home/twiki/pub/

   DAV On
   TWikiDir pub /home/twiki/pub
   TWikiScript /home/twiki/tools/dav.pl
   Options FollowSymLinks Indexes
   Allow from all
   AuthType Basic
   AuthName "Bitte geben Sie Ihren WetzelWiki-Usernamen ein"
   AuthUserFile /home/twiki/data/.htpasswd
   Require valid-user

----------------------------------------------------------------------------------

And this is the directory listing of th DavTest topic:

----------------------------------------------------------------------------------
-rw-r--r--  1 www-data www-data      0 2006-05-08 10:46 gswin.zip
-r--r--r--  1 www-data www-data    177 2006-05-08 10:46 gswin.zip,v
-rw-r--r--  1 www-data www-data      0 2006-05-08 10:48 guestbook_data.txt
-r--r--r--  1 www-data www-data    177 2006-05-08 10:48 guestbook_data.txt,v
-rw-r--r--  1 www-data www-data      0 2006-05-08 10:49 holzdek_smart.jpg
-r--r--r--  1 www-data www-data    177 2006-05-08 10:49 holzdek_smart.jpg,v
-rw-r--r--  1 www-data www-data      0 2006-05-08 10:50 INHALTSVERZEICHNIS.doc
-r--r--r--  1 www-data www-data    177 2006-05-08 10:50 INHALTSVERZEICHNIS.doc,v
-rw-r--r--  1 www-data www-data  45568 2006-05-08 09:55 linux_kurzeinfuehrung.doc
-r--r--r--  1 www-data www-data  45820 2006-05-08 09:55 linux_kurzeinfuehrung.doc,v
-rw-r--r--  1 www-data www-data      0 2006-05-08 10:59 makro.doc
-r--r--r--  1 www-data www-data    177 2006-05-08 10:59 makro.doc,v
-rw-r--r--  1 www-data www-data      0 2006-05-08 11:00 mathias_flexolaser_firewall.txt
-r--r--r--  1 www-data www-data    177 2006-05-08 11:00 mathias_flexolaser_firewall.txt,v
-rw-r--r--  1 www-data www-data      0 2006-05-08 11:00 Organigramm_PE_2003_farbig_10.02.03.doc
-r--r--r--  1 www-data www-data    177 2006-05-08 11:00 Organigramm_PE_2003_farbig_10.02.03.doc,v
-rw-r--r--  1 www-data www-data      0 2006-05-08 11:03 pe1800.pdf
-r--r--r--  1 www-data www-data    177 2006-05-08 11:03 pe1800.pdf,v
----------------------------------------------------------------------------------

As you can see, the files are 0 Bytes in size, but a version is created. The file "linux_kurzeinfuehrung.doc" was uploaded the "regular" way inside TWiki.

This is the content of the ,v files:

----------------------------------------------------------------------------------
head    1.1;
access;
symbols;
locks; strict;
comment @# @;


1.1
date    2006.05.08.08.46.42;    author JensHassler;     state Exp;
branches;
next    ;


desc
@none
@


1.1
log
@none
@
text
@@
----------------------------------------------------------------------------------

There are no errors nor warnings in the TWiki warning log and the Apache error log.

What I did is:

1. Open my DAV resource in Internet Explorer: http://intranet/twikidav/pub/Sandbox/DavTest/

2. Paste a file into the folder.

When I use DAV without the dav.pl it works without truncating. So, something seems to happen inside the dav.pl or the TWiki::Func::saveAttachment function.

Thanks for looking into this!

Environment

TWiki version: TWikiRelease04x00x01
TWiki plugins: WebDAVPlugin
Server OS:  
Web server:  
Perl version:  
Client OS:  
Web Browser:  
Categories: Plugins

-- JensHassler - 10 May 2006

Answer

"Some files" is not really narrowing it down much. Can you isolate the circumstances in which you see this behaviour? I cannot reproduce it. Also, exactly what version of the plugin are you using, and exactly what apache version.

-- CrawfordCurrie - 15 May 2006

This is fixed with 4.0.3, see LatestBlackListPluginCausesFileAttachmentToErasePageContent for a patch.

-- SteffenPoulsen - 16 Jun 2006

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2006-06-16 - SteffenPoulsen
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.