Issue 17713 - webdav save xml invalid character at document end
Summary: webdav save xml invalid character at document end
Status: CLOSED FIXED
Alias: None
Product: ucb
Classification: Code
Component: code (show other issues)
Version: OOo 1.1 RC2
Hardware: All All
: P3 Trivial (vote)
Target Milestone: OOo 1.1.1
Assignee: thorsten.martens
QA Contact: issues@ucb
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-31 14:48 UTC by Unknown
Modified: 2004-09-27 11:19 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Unknown 2003-07-31 14:48:58 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
Comment 1 Unknown 2003-07-31 15:21:00 UTC
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
Comment 2 kai.sommerfeld 2003-07-31 16:05:22 UTC
I'm responsible for fixing this bug.
Comment 3 kai.sommerfeld 2003-07-31 16:07:41 UTC
Accepted.
Comment 4 kai.sommerfeld 2003-07-31 16:18:33 UTC
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().
Comment 5 kai.sommerfeld 2003-08-27 16:15:07 UTC
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.
Comment 6 kai.sommerfeld 2003-11-07 15:05:50 UTC
KSO->TM: Please verify the fix.
Comment 7 thorsten.martens 2003-11-10 10:06:36 UTC
Checked and verified in cws kso08 -> OK !
Comment 8 thorsten.martens 2003-11-10 10:06:54 UTC
.
Comment 9 Olaf Felka 2004-01-30 14:30:19 UTC
of: ok in srx645m27s1.
Comment 10 Olaf Felka 2004-01-30 15:31:30 UTC
Erroneously closed.
Comment 11 Olaf Felka 2004-01-30 15:34:56 UTC
Changing resolution
Comment 12 Olaf Felka 2004-01-30 15:35:52 UTC
Original resoltion has  been reached again. :-)
Comment 13 Martin Hollmichel 2004-09-27 11:19:59 UTC
close issue.