Apache OpenOffice (AOO) Bugzilla – Issue 17713
webdav save xml invalid character at document end
Last modified: 2004-09-27 11:19:59 UTC
Saving a text document as DocBook or FlatXML using OpenOffice1.1RC2 in Windows2000 (using OpenOffice's dialogs) to a webDAV server location results in an XML file that has an invalid character in the final position. Documents saved in DocBook or FlatXML formats to a local hard drive are unaffected (the resulting files are valid XML).Documents saved in native OpenOffice .sxw compressed XML format directly to a webDAV location are also unaffected. Two examples of documents saved directly to a webDAV server should be available at: http://test.webdav.org/dav/openOfficeTest/flatXMLRemoteTest.xml and http://test.webdav.org/dav/openOfficeTest/docbookRemoteTest.xml A hex dump of the flatXMLRemoteTest.xml file above shows that the file ends thus: 00003650: 3e 3c 2f 6f 66 66 69 63 65 3a 64 6f 63 75 6d 65 ;></office:docume 00003660: 6e 74 3e 00 ;nt>. - the final character should be a 3e (greater-than sign). This problem has been reproduced when saving in DocBook and FlatXML formats to the following webDAV servers: * Apache Tomcat/4.1.24 (Win32) * Apache/2.0.46 + with mod_dav (Win32) * the http://test.webdav.org/dav/ server
update: the type of file seems to be irrelevant. All files saved by OO 1.1rc2 to any WebDAV server seem to have one extra zero byte appended
I'm responsible for fixing this bug.
Accepted.
NeonSession::getDataFromInputStream() must not append an additional zero byte. This is okay when this function is called from NeonSession::POST(), but it is also used from NeonSession::PUT() where appending the byte leads to the bug. Attention: When changing NeonSession::getDataFromInputStream not to append the additional byte, both NeonSession::POST overloads must be changed to append a trailing zero byte to the data returned by getDataFromInputStream().
NeonSession::getDataFromInputStream() now has an additionally parameter that allows to control whether a trailing zero byte is to be appended. Adapted NeonSession::PUT() and NeonSession::GET() accordingly.
KSO->TM: Please verify the fix.
Checked and verified in cws kso08 -> OK !
.
of: ok in srx645m27s1.
Erroneously closed.
Changing resolution
Original resoltion has been reached again. :-)
close issue.