Hi Oleg,
Sorry for my rude answer. I didn't mean to offend anyone. Probably my
low english skills led to some understanding.
I just wanted to tell you about the problem I had because I thought it
could have been a bug; if you think its correct like it is now, this is
fine for me.
It's just strange that it is actually working when using plain html
forms to post the files...
Greetings,
Nicolas
Oleg Kalnichevski wrote:
On Wed, 2008-04-09 at 21:33 +0200, Nicolas wrote:
Hi Oleg,
I don't think that it is a problem with the server side script as it
actually works when uploading binary files by using a web browser
interface...
Hi Nicolas
You are very welcome to disagree.
so it's strange that it works when using a browser. The html
code for the file input is the following:
<form action="/cgi-bin/download/option.cgi?name=add_submit"
method="post" enctype="multipart/form-data" name="upload_file">
<input type="file" name="F_NAME" style="width:250">
<input type="hidden" id="hname" value="">
<button type="submit" value="upload">
Somehow the server-side script seems the interpret the second CRLF as
being part of the file...
Feel free to check the relevant RFCs
Oleg
Greetings,
Nicolas
Oleg Kalnichevski wrote:
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]