On Sun, 2008-04-06 at 19:41 +0200, Nicolas wrote:
> Hello everybody,
> 
> I noticed that when I used the PostMethod and a FilePart in order to 
> post a binary file to a server, the file was corrupt when it got to the 
> server. When I compared the file on the server with the original one, I 
> noticed that the file one the server had some bytes more at its 
> beginning than the original one. To resolve this problem, I commented 
> out line 269 in method sendEndOfHeader in Part.java:
> protected void sendEndOfHeader(OutputStream out) throws IOException {
>       LOG.trace("enter sendEndOfHeader(OutputStream out)");
>       out.write(CRLF_BYTES);
>       // 21.03.08 had to remove the second carriage return/line feed
>       // in order to work correctly with binary files and QNap...
>       //out.write(CRLF_BYTES);
> }
> 
> Because I don't know whether this is really a bug or a user error of 
> mine, I post it in the development mailing list...
> 
> Greetings,
> Nicolas
> 
> 

Hi Nicolas

I do not think it is a bug. The first CRLF pair terminates the header,
whereas the second one separates the part's head from part's content
body. This is likely to be a problem with the server side script 

Hope this helps

Oleg

> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to