--- Part.java.orig 2005-11-21 11:08:38.000000000 +0100 +++ Part.java 2005-11-21 11:11:36.000000000 +0100 @@ -229,7 +229,6 @@ LOG.trace("enter sendContentTypeHeader(OutputStream out)"); String contentType = getContentType(); if (contentType != null) { - out.write(CRLF_BYTES); out.write(CONTENT_TYPE_BYTES); out.write(EncodingUtil.getAsciiBytes(contentType)); String charSet = getCharSet(); @@ -237,10 +236,11 @@ out.write(CHARSET_BYTES); out.write(EncodingUtil.getAsciiBytes(charSet)); } + out.write(CRLF_BYTES); } } - - /** + + /** * Write the content transfer encoding header to the specified * output stream * @@ -251,9 +251,9 @@ LOG.trace("enter sendTransferEncodingHeader(OutputStream out)"); String transferEncoding = getTransferEncoding(); if (transferEncoding != null) { - out.write(CRLF_BYTES); out.write(CONTENT_TRANSFER_ENCODING_BYTES); out.write(EncodingUtil.getAsciiBytes(transferEncoding)); + out.write(CRLF_BYTES); } } @@ -304,9 +304,10 @@ public void send(OutputStream out) throws IOException { LOG.trace("enter send(OutputStream out)"); sendStart(out); - sendDispositionHeader(out); sendTransferEncodingHeader(out); sendContentTypeHeader(out); + //sendContentLengthHeader(out); + sendDispositionHeader(out); sendEndOfHeader(out); sendData(out); sendEnd(out);