tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brett Delle Grazie <brett.dellegra...@gmail.com>
Subject Re: Can ClientAbortException be circumvented?
Date Mon, 25 Mar 2013 14:02:42 GMT
On 25 March 2013 13:00, Thad Humphries <thad.humphries@gmail.com> wrote:

> On Sun, Mar 24, 2013 at 4:46 PM, Konstantin Kolinko
> <knst.kolinko@gmail.com>wrote:
>
> > 2013/3/25 Thad Humphries <thad.humphries@gmail.com>:
> > > I have a web-app that uses a servlet for downloading files from a
> > > repository--PDF, Office, images, zip, etc. It works with desktop
> > > browsers--IE, Firefox, Chrome, and Safari--on their various platforms.
> It
> > > also works fine with Firefox from Android (2.3 and 4.x tested). However
> > > when I try with Android's default WebKit browser, the servlet fails
> > > immediately with org.apache.catalina.connector.ClientAbortException (so
> > > says the stderr log).
> >
> > 1. Is this issue specific to some kind of files, or it occurs with all of
> > them?
> >
>
> All of them--PDF, XLS, DOC, DOCX, TIFF, ZIP, etc. Every file type I've
> tried.
>
>
> > 2. If client aborts a connection, there is nothing much a server can
> > do. It is issue in your web browser.
> >
>
> Yeah, I suspected that.
>
>
> > > The servlet is sending proper headers, including the correct MIME type,
> > > Content-Disposition attachment, file size, etc. I even took to adding
> the
> > > file's name as the last GET parameter. No dice.
> >
> > 3. Maybe the browser does not like "Content-Disposition attachment"?
> > Maybe it cannot save the file?
> >
>
> These same file types can be downloaded if the servlet is called by
> Firefox, or if the file is requested from a directory listing or in an
> email attachment. In these cases, with Android they go to the Downloads
> directory on the memory card; on iPad, DOCs open in Pages, PDFs in a
> viewer, etc.
>
>
> > 4. Does it depend on file size? How the file is served? (What
> > connector implementation are you using? Do you use compression, do you
> > use sendfile?)
> >
>
> Size does not matter, a few K or a several hundred K.
>
> > Safari on iPad, iPhone, and iPod Touch also fail. Although I don't have
> > one
> > > with me at this moment to test, I suspect their failure is also caused
> > by a
> > > ClientAbortException: Safari is also WebKit and *I've Google'd numerous
> > > complaints about this exception when using mobile WebKit browsers*.
> > While I
> > > can tell Android users to try Firefox, there is no Firefox for iPhone.
> > >
> > > I'm expecting a file to open in a local viewer app, like Acrobat
> Reader,
> > > QuickOffice, Pages, etc. I can open files in these apps via Firefox, an
> > > email client, or via the WebKit browser when viewing a directory
> listing
> > in
> > > my public_html directories and similar locations.
> > >
> > > I suspect this is a problem with mobile WebKit, and that circumventing
> > the
> > > abort might be a "bad thing" even if it's possible. However I thought
> I'd
> > > inquire here if there is a Tomcat way around it. If not, it seems my
> > > alternatives are (1) use Java Mail to mail the user the file, since
> mail
> > > apps open their attachments; and (2) write iOS and Android apps file
> > query
> > > and downloading. Neither prospect thrills me.
>

Is this over HTTPS or standard HTTP?



> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
> >
>
>
> --
> "Hell hath no limits, nor is circumscrib'd In one self-place; but where we
> are is hell, And where hell is, there must we ever be" --Christopher
> Marlowe, *Doctor Faustus* (v, 121-24)
>



-- 
Best Regards,

Brett Delle Grazie

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message