You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by bu...@apache.org on 2003/09/26 10:13:56 UTC

DO NOT REPLY [Bug 23435] New: - Client sets illegal content length when MIME-attachement is bigger than 2GB

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23435>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23435

Client sets illegal content length when MIME-attachement is bigger than 2GB

           Summary: Client sets illegal content length when MIME-attachement
                    is bigger than 2GB
           Product: Axis
           Version: current (nightly)
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Basic Architecture
        AssignedTo: axis-dev@ws.apache.org
        ReportedBy: john.e.halse@start.no


If you try to send a MIME-attachement that is bigger than 2GB the Content Length
header field is set to a negative value.

I found that this is because the getContentLength() method in
org.apache.axis.attachments.AttachmentsImpl casts the long value returned from
org.apache.axis.attachments.MimeUtils.getContentLength() to an int before
returning it. I tried to remove this cast which seems to solve the problem.

Here is a patch for org.apache.axis.attachments.AttachmentsImpl.

Index: AttachmentsImpl.java
===================================================================
RCS file:
/home/cvspublic/ws-axis/java/src/org/apache/axis/attachments/AttachmentsImpl.java,v
retrieving revision 1.41
diff -u -r1.41 AttachmentsImpl.java
--- AttachmentsImpl.java        27 Jun 2003 18:19:44 -0000      1.41
+++ AttachmentsImpl.java        26 Sep 2003 07:59:26 -0000
@@ -456,7 +456,7 @@

         try {
               if(sendtype == SEND_TYPE_MIME)
-                 return
(int)org.apache.axis.attachments.MimeUtils.getContentLength(
+                 return org.apache.axis.attachments.MimeUtils.getContentLength(
                                 multipart != null ? multipart : (multipart =
org.apache.axis.attachments.MimeUtils.createMP(soapPart.getAsString(),
orderedAttachments)));
               else if (sendtype == SEND_TYPE_DIME)return
createDimeMessage().getTransmissionSize();
         } catch (Exception e) {

Re: MIME-attachements bigger than 2GB?

Posted by Steve Loughran <st...@iseran.com>.
Jens Schumann wrote:
>>If you try to send a MIME-attachement that is bigger than 2GB the Content
>>Length header field is set to a negative value.
> 
> 
> 2GB? Are we going to support DVD exchange over SOAP? ;)
> 

2GB isnt that big. How may bits go into a 1200dpi poster at 32 bpp? That 
is the kind of thing that gets printed over a LAN...


MIME-attachements bigger than 2GB?

Posted by Jens Schumann <je...@void.fm>.
> If you try to send a MIME-attachement that is bigger than 2GB the Content
> Length header field is set to a negative value.

2GB? Are we going to support DVD exchange over SOAP? ;)

Jens