There's a discussion going on regarding how to get raw string content from HTTP requests; LzDataset is not really set up to do that. I just recently remodularized the LzHTTPLoader API to properly support raw dataresponses, as part of the XMLRPC updates (so we could get JSON responses), so it seems like it would be a good time to figure out how we let developers in LZX get raw string data responses for HTTP requests.
---------- Forwarded message ---------- From: André Bargull (JIRA) <[EMAIL PROTECTED]> Date: Tue, Aug 12, 2008 at 2:41 PM Subject: [JIRA] Commented: (LPP-5395) Dataset Fails to Keep XML Response when receiving HTML content To: [EMAIL PROTECTED] [ http://www.openlaszlo.org/jira/browse/LPP-5395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46294#action_46294] André Bargull commented on LPP-5395: ------------------------------------ I wonder how that should work, 'cause HTML is not XML. So, no XML-Parser will accept HTML-Code. Resolve as "Not Laszlo"?! > Dataset Fails to Keep XML Response when receiving HTML content > -------------------------------------------------------------- > > Key: LPP-5395 > URL: http://www.openlaszlo.org/jira/browse/LPP-5395 > Project: OpenLaszlo > Issue Type: Bug > Components: Components - base, Components - LZ > Affects Versions: RingDing (4.1) > Reporter: Dan Swaney > Assignee: Henry Minsky > Priority: P1 > Fix For: KrispyKreme (4.2 Beta) > > > Most web sites that require users to login will intercept the URL and return HTML for the Login Page. > After authenticating successfully, the web site will perform the query and return the results. > With OpenLaszlo, <dataset> elements are used to perform AJAX requests and parse the XML response. > For the XML response to be parsed, it must be 'well-formed XML'. > One basic requirement for 'well-formed XML' is that there can only be one top-level XML tag. > Unfortunately, most web pages today include a line at the top to tell the browser to use XML validation. > For example: > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" " http://www.w3.org/TR/html4/loose.dtd"> > <HTML> > ... > </HTML> > The DOCTYPE line causes OpenLaszlo to abort parsing and call the 'onerror' handler. > The <dataset> doesn't necessarily need to parse the XML of the HTTP Response. > At a minimum, the <dataset> should preserve the original XML content if a failure occurs > to better allow an application to decide what to do next > (like detect it's a login page and prompt the user for creds in a Laszlo Window). -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://www.openlaszlo.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira -- Henry Minsky Software Architect [EMAIL PROTECTED]
