[Laszlo-checkins] r13969 - in openlaszlo/trunk: WEB-INF/lps/lfc/data test/lfc/data

hqm@openlaszlo.org hqm at openlaszlo.org
Thu May 21 11:53:48 PDT 2009


Author: hqm
Date: 2009-05-21 11:53:45 -0700 (Thu, 21 May 2009)
New Revision: 13969

Modified:
   openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataset.lzs
   openlaszlo/trunk/test/lfc/data/httpsequence.jsp
Log:
Change 20090521-hqm-j by hqm at badtzmaru.home on 2009-05-21 09:53:11 EDT
    in /Users/hqm/openlaszlo/trunk6
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: make sure that SOLO data GET requests default to not get cached in the browser

New Features:

Bugs Fixed: LPP-8184

Technical Reviewer: ptw
QA Reviewer: promanik
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details:

+ change the default value of lz.dataset.clientcacheable to false, update doc description

+ I think that the httpsequence.jsp test file I was using for marking
the sequence order of requests was not really working, changed it to
use a tmp disk file to increment a counter, rather than the session
var I was using before.

+ fixes regression test in test/lfc/data/alldata.lzx


Tests:
test/lfc/data/alldata.lzx in swf8,swf9,dhtml
test/smoke/smokecheck.lzx swf8,swf9,dhtml



Modified: openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataset.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataset.lzs	2009-05-21 08:00:07 UTC (rev 13968)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataset.lzs	2009-05-21 18:53:45 UTC (rev 13969)
@@ -269,11 +269,13 @@
   */
 var cacheable :Boolean = false;
 
-/** When true, an argument will be added to the request string in the format 
-  * '__lzbc__=1204685840777'.  This is to prevent client caching.
+/** When true, data responses can be cached by the client (browser).
+  * When false, a unique valued argument will be added to the request string in the format 
+  * '__lzbc__=1204685840777' to defeat the browser's cache.
   * @type Boolean
+  * @lzxdefault false
   */
-var clientcacheable :Boolean = true;
+var clientcacheable :Boolean = false;
 
 /** A string to be appended to the request that
   * the dataset makes. 

Modified: openlaszlo/trunk/test/lfc/data/httpsequence.jsp
===================================================================
--- openlaszlo/trunk/test/lfc/data/httpsequence.jsp	2009-05-21 08:00:07 UTC (rev 13968)
+++ openlaszlo/trunk/test/lfc/data/httpsequence.jsp	2009-05-21 18:53:45 UTC (rev 13969)
@@ -1,12 +1,37 @@
 <%@ page import="java.util.*" %><%@ page import="java.io.*" %><%@ page contentType="text/xml; charset=UTF-8" %><?xml version='1.0' encoding='UTF-8' standalone='yes' ?><%@ page isThreadSafe="false" %>
 <response><%
-/* Copyright 2001-2006, 2008 Laszlo Systems, Inc.  All Rights Reserved.              */
-Integer seq = (Integer) session.getAttribute("seq");
-if (seq ==null) {
-    seq = new Integer(0);
+
+/* X_LZ_COPYRIGHT_BEGIN ***************************************************
+* Copyright 2001-2004, 2009 Laszlo Systems, Inc.  All Rights Reserved.              *
+* Use is subject to license terms.                                            *
+* X_LZ_COPYRIGHT_END ******************************************************   */
+
+
+    String fname = "/tmp/_httpsequence.log";
+    FileReader inf;
+    try {
+        inf = new FileReader(fname);
+    } catch (FileNotFoundException e) {
+        FileWriter fw = new FileWriter(fname);
+        fw.write("0\n");
+        fw.close();
+        inf = new FileReader(fname);
+    }
+    BufferedReader bin = new BufferedReader(inf);
+    String data = bin.readLine();
+    
+    long count  = -1;
+try {
+    count = Long.parseLong(data);
+} catch (NumberFormatException e) {
+    out.println("error parsing number "+data);
 }
+out.write(""+count);
+    PrintWriter outf = new PrintWriter(new FileWriter(fname));
+    outf.println(count+1);
+    outf.flush();
+    outf.close();    
 
-out.print(seq);
 
-session.setAttribute("seq", new Integer(seq.intValue() + 1));
+
 %></response>



More information about the Laszlo-checkins mailing list