• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Fixed the WO 5.4.3 2GB file/form upload limitations
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fixed the WO 5.4.3 2GB file/form upload limitations


  • Subject: Fixed the WO 5.4.3 2GB file/form upload limitations
  • From: Helmut Tschemernjak <email@hidden>
  • Date: Sun, 29 Jul 2012 13:04:17 +0200
  • Organization: HELIOS Software GmbH

I enhanced JavaWebObjects to support uploads larger then 2GB via the existing upload form data streaming API. At present we don't use Wonder which means the changes apply to WO 5.4.3 deploying it standalone by including three updated classes in your app. We will investigate into Wonder but this is on a second page.

Here is the description of the changes:


WOMultipartIterator
===================
Changed calling WONoCopyPushbackInputStream to use long length based
on the x-content-length instead of the aRequest._contentLengthHeader()
Added public long contentLengthRemainingLong() to return the size as long.
Added public long _estimatedContentLengthLong(() to return the size as long.
Changed totalRemaining, delimiterLength, chaff from int to long


WONoCopyPushbackInputStream
===========================
WONoCopyPushbackInputStream constructor uses now long size
Changed readMax, originalReadMax from int to long
Changed several size calculations from int to long
As WONoCopyPushbackInputStream is only used by WOMultipartIterator and
WOHttpIO of the JavaWebObjects package others will not be affected.


WOHttpIO
========
As many apps and classes use the content-length header to define the request size I decided to add a new header called x-content-length containing the original content-length value, then I limit the content-length for compatibility reasons to Integer.MAX_VALUE which avoids changes in many WO classes (NSRange, NSData, etc.)
This way everybody adding 2GB request support in their apps should just call
request.headerForKey("x-content-length") to receive the 64 bit length. For everybody else it should stay compatible. Fixed code to compile again and reorder code to match the original intention.
Main header tuning changes are in: public InputStream _readHeaders()
Changed several parseInt to parseLong.
Changed several contentLengthInt to contentLengthLong
Changed use of ContentLengthKey in several instances to XContentLengthKey


If you are interested to receive the three 5.4.3 patches/files please contact me.

Regards

Helmut



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Fixed the WO 5.4.3 2GB file/form upload limitations
      • From: Jesse Tayler <email@hidden>
  • Prev by Date: Re: didUpdate?
  • Next by Date: Periodic Tasks in WO
  • Previous by thread: RE: didUpdate?
  • Next by thread: Re: Fixed the WO 5.4.3 2GB file/form upload limitations
  • Index(es):
    • Date
    • Thread