Streaming HTTP Connection?
Streaming HTTP Connection?
- Subject: Streaming HTTP Connection?
- From: Karl Moskowski <email@hidden>
- Date: Thu, 17 Feb 2005 12:13:16 -0500
We're in the midst of a project to create a WebObjects front-end to a
third-party digital asset management system. It serves its digital
assets via a suite of CGIs, and uses basic HTTP authentication.
To show thumbnails of assets, we tried to construct a URL bind that to
a WOImage, but the HTTP authentication panel kept popping up. Then we
tried to use URLs of the form <http://username:password@host/path>, but
that suffered from a couple of problems. First, it embedded the
username and password in the HTML, and that's kind of insecure. Second,
about a year ago, MS apparently patched Windows versions of IE to not
allow the "username:password@" construct in URLs to prevent spoofing.
So, we decided to create a kind of WO proxy to the DAM server. I wrote
a class that retrieves the image data using a WOHTTPConnection and
bound the result to the WOImage's data binding. It works fine for
reasonably sized files (e.g., JPG thumbnails).
However, we have to provide a way to download high-resolution originals
(e.g., EPS, Quark) that can be many hundreds of megabytes in size.
Obviously the method I used to serve the thumbnails won't work.
I've been trying to modify my code to be like the streaming file
download demo code (method DownloadFileAction() in
/Developer/Examples/JavaWebObjects/FileUpload/DirectAction.java), but
neither WOHTTPConnection nor the java.net.HttpURLConnection provide a
way to get streamed content. I've started to look at the Jakarta
Commons HTTP Client, but it's tough slogging.
Has anyone tackled anything like this? Any tips would be greatly
appreciated!
Thanks,
Karl Moskowski.
_______________________________________________
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