• 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
Re: WOFileUpload exception....
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WOFileUpload exception....


  • Subject: Re: WOFileUpload exception....
  • From: email@hidden
  • Date: Thu, 22 May 2003 23:23:50 CDT
  • Priority: 3 (Normal)

[demime could not interpret encoding binary - treating as plain text]
On Thu, 22 May 2003 18:24:36 -0700 Hsu wrote:

> This is the exception thrown when a user cancels a file upload.
>

The thing is, I can't reproduce this on any browser I have. IE, Netscape,
Mozilla. If I cancel a
file upload----an exception like that may or may not be written to output
by WO, but I
definitely don't get an exception page.  My browser just shows me the
form that I was
submitting, when I cancelled. And I can then click on any other links on
the page, including
the submit button for the same form, and WO handles that request no problem.

But I have my own logging which ONLY logs exceptions that are caught by
Application.handleException().  Meaning, I think it's safe to assume,
that the user IS seeing
an exception page.  I can't figure out how they would ever seen an
exception page, or how
the exception would make it to Application.handleException, as the result
of a browser
cancel?

Nevertheless, it's useful to know that this is also what happens when the
user presses the
stop button. I guess the upload is getting corrupted somehow and not
making it intact,
whether because of a user cancel or not. Hmm. I suppose I'll just catch
the exception (which
can be done by putting super.takeValuesFromRequest in a try/catch), and
then return the
user a page saying 'sorry, upload didn't work' or something.  If the user
really did press the
browser stop button (AND this causes this exception to be thrown from
takeValuesFromRequest), I suppose the user will never see this page
anyway, since their
browser cancelled and isn't going to get it.

Thanks,
--Jonathan

> Note that safari seems to have some problem with this because of the
> 60second time limit, which doesn't care if data is still going.
>
> Karl
>
> On Wednesday, May 21, 2003, at 10:33  AM, Jonathan Rochkind wrote:
>
> > I log exceptions that are caught by Application handleException().  I
> > am logging exceptions with WOFileUpload in the stack trace. There are
> > two ways the exception exhibits, although both involve an IOException
> > with the message "Connection reset by peer: Amount read didn't match
> > content-length". The actual exception that makes it up to
> > handleException is sometimes a RuntimeException and sometimes an
> > NSForwardException, as detailed below.
> >
> > I haven't figured out how to intentionally produce this sort of
> > exception. I'm not sure what causes it. But it appears to cause some
> > sort of problem for users (unsurprisingly).  It appears in the logs
> > right around where users have reported strange and problematic
> > behavior (not sure exactly what, you know how it's dificult to get
> > specific information from users on this sort of thing).
> >
> > Does anyone have any idea what's going on here?   Or how I can deal
> > with it?
> >
> > The two types of exceptions:
> >
> > 1) a java.lang.RuntimeException with the message "Error writing to
> > output stream: java.io.FileOutputStream@15c5ec java.io.IOException:
> > Connection reset by peer: Amount read didn't match content-length".
> > (WOFileUpload line 253 takeValuesFromRequest method in stack trace)
> >
> > 2) An NSForwardException wrapping an IOException with the message
> > "Connection reset by peer: Amount read didn't match content-length"
> > (WOFileUpload line 138 takeValuesFromRequest method in stack trace).
> > _______________________________________________
> > webobjects-dev mailing list | email@hidden
> > Help/Unsubscribe/Archives:
> > http://www.lists.apple.com/mailman/listinfo/webobjects-dev
> > Do not post admin requests to the list. They will be ignored.
> >
> >
> --
>
> listen to them
> the children of the internet
> such whining they make
> (they never email, they never chat, what good are grandchildren if
> you've never even had kids?)
>
> Homepage:
>       http://homepage.mac.com/khsu/index.html
> _______________________________________________
> webobjects-dev mailing list | email@hidden
> Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/webobjects-dev
> Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: WOFileUpload exception....
  • Next by Date: Re: Classpath for MSSQLServer JDBC Driver
  • Previous by thread: Re: WOFileUpload exception....
  • Next by thread: Multiple Relationships and list boxes
  • Index(es):
    • Date
    • Thread