Index: openacs-4/packages/acs-content-repository/tcl/revision-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/revision-procs.tcl,v diff -u -r1.12.2.2 -r1.12.2.3 --- openacs-4/packages/acs-content-repository/tcl/revision-procs.tcl 1 Apr 2004 01:20:56 -0000 1.12.2.2 +++ openacs-4/packages/acs-content-repository/tcl/revision-procs.tcl 1 Apr 2004 01:50:14 -0000 1.12.2.3 @@ -65,14 +65,20 @@ file { set path [cr_fs_path $storage_area_key] set filename [db_string write_file_content ""] + # JCD: for webdavfs there needs to be a content-length 0 header + # but ns_returnfile does not send one. + set size [file size $filename] + if {!$size} { + ns_set put [ns_conn outputheaders] "Content-Length" 0 + } ns_returnfile 200 $mime_type $filename } lob { if { $string_p } { return [db_blob_get write_lob_content ""] } # need to set content_length header here - ns_set put [ns_conn outputheaders] Content-Length $content_length + ns_set put [ns_conn outputheaders] "Content-Length" $content_length ReturnHeaders $mime_type # also need to check for HEAD method and skip sending # actual content