Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Track sequence numbers of arbitrary length.

We track sequence numbers as Longs now, and the client side encodes the
sequence number as an arbitrarily-long base-36 number.
  • Loading branch information...
commit b86cb60d19628721f7358c59ebc97c8cb80f7fb6 1 parent 03dcfc7
@Shadowfiend Shadowfiend authored nafg committed
View
12 web/webkit/src/main/scala/net/liftweb/http/LiftServlet.scala
@@ -431,15 +431,15 @@ class LiftServlet extends Loggable {
* client. The latter is used to expire result data for sequence
* numbers that are no longer needed.
*/
- private case class AjaxVersionInfo(renderVersion:String, sequenceNumber:Int, pendingRequests:Int)
+ private case class AjaxVersionInfo(renderVersion:String, sequenceNumber:Long, pendingRequests:Int)
private object AjaxVersions {
def unapply(ajaxPathPart: String) : Option[AjaxVersionInfo] = {
- val dash = ajaxPathPart.indexOf("-")
- if (dash > -1 && ajaxPathPart.length > dash + 2)
+ val separator = ajaxPathPart.indexOf("-")
+ if (separator > -1 && ajaxPathPart.length > separator + 2)
Some(
- AjaxVersionInfo(ajaxPathPart.substring(0, dash),
- ajaxPathPart.charAt(dash + 1),
- Integer.parseInt(ajaxPathPart.substring(dash + 2, dash + 3), 36))
+ AjaxVersionInfo(ajaxPathPart.substring(0, separator),
+ java.lang.Long.parseLong(ajaxPathPart.substring(separator + 1, ajaxPathPart.length - 1), 36),
+ Integer.parseInt(ajaxPathPart.substring(ajaxPathPart.length - 1), 36))
)
else
None
View
2  web/webkit/src/main/scala/net/liftweb/http/js/ScriptRenderer.scala
@@ -192,7 +192,7 @@ object ScriptRenderer {
if (LiftRules.enableLiftGC) { """
var replacement = '""" + LiftRules.ajaxPath + """/'+lift_page;
if (version)
- replacement += ('-'+(version%36).toString(36)) + (liftAjax.lift_ajaxQueue.length > 35 ? 35 : liftAjax.lift_ajaxQueue.length).toString(36);
+ replacement += ('-'+version.toString(36)) + (liftAjax.lift_ajaxQueue.length > 35 ? 35 : liftAjax.lift_ajaxQueue.length).toString(36);
return url.replace('""" + LiftRules.ajaxPath + """', replacement);"""
} else {
"return url;"
Please sign in to comment.
Something went wrong with that request. Please try again.