nestle1998 / in-spirit

Automatically exported from code.google.com/p/in-spirit
0 stars 0 forks source link

MultipartURLLoader: CRLN characters added to the end of uploaded file #6

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Upload a plain text file containing "Hello World" (11 bytes)
2. Once uploaded, check the file and you'll notice that it's 13 bytes.
3. Characters CRLN were added to the file.

What is the expected output? What do you see instead?
Uploaded file should not have the CRLN characters at the end.

What version of the product are you using? On what operating system?
r118, Windows Vista 32-bit

Solution?
Under MultipartURLLoader.constructFilesPart() do not add a line break after 
the last file since closeFilePartsData() adds one right after.

if (i != _fileNames.length - 1) {
  postData = LINEBREAK(postData);
}
i++;

Original issue reported on code.google.com by Andres...@gmail.com on 26 Apr 2010 at 9:53