Hi Roland, Thanks for the excellent information. Your observation makes sense about auto downloads.
Thanks again, Steve Johnson, Software Engineer, [EMAIL PROTECTED] direct 720.564.6532 www.mercury.com www.mercury.com -----Original Message----- From: Roland Weber [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 09, 2005 1:29 AM To: HttpClient Project Subject: RE: JavaScript Use Case (was: HLCA: collect uses cases?) Hi Steve, Steve Johnson <[EMAIL PROTECTED]> wrote on 09.02.2005 00:24:13: > Is there a javascript library written in java that could > be linked in and used internally with auto-redirect, or > called externally for manual 302 and page link processing? There are JavaScript libraries written in Java. I've found FESI: http://www.lugrin.ch/fesi/index.html Rhino: http://www.mozilla.org/rhino/ We don't want to get into content handling with HttpClient, so it would have to be the external link processing for you. In most cases, the effort to set up a full JavaScript+DOM environment as it is expected by JavaScript in a browser is way overblown. You'd have to parse the HTML and generate the events that are processed by the JavaScript handlers. For most users targetting a specific site, it will be easier to text-search the document in order to extract redirect URLs. Your other mail about cookies generated on the client side with JavaScript leads me to believe you're not one of these "most users". I suppose the site does that intentionally to prevent downloads from automated scripts. > or something similar to what mozilla is doing for > multi link requests that generate from a single > request like allmusic.com? A browser is a way, WAY bigger component than an HTTP library. If you have to implement a browser, you can use HttpClient. But HttpClient itself will never evolve near anything as complex as a browser. Have you considered using a real browser with a scripting interface? I will include content-level redirect handling as a use case, though only to point out that it is not in the scope of the HttpClient. And to have a place where we can write down the suggestions for applications to handle the non-HTTP redirects themselves, in easy cases. Thanks a lot for your input, Roland
