Skip to content

Commit 046e400

Browse files
Merge pull request #1914 from lift/3.0.2-comet-reload-context-path
[3.0.2] Comet reload context path
2 parents 3a5c3e6 + ea9e33f commit 046e400

3 files changed

Lines changed: 11 additions & 5 deletions

File tree

contributors.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,3 +233,9 @@ Seth Tisue
233233

234234
### Email: ###
235235
seth at tisue dot net
236+
237+
### Name: ###
238+
Josef Vlach
239+
240+
### Email: ###
241+
vlach.josef at gmail dot com

web/webkit/src/main/resources/toserve/lift.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@
7676
},
7777
cometGetTimeout: 140000,
7878
cometFailureRetryTimeout: 10000,
79-
cometOnSessionLost: function() {
80-
window.location.href = "/";
79+
cometOnSessionLost: function(contextPath) {
80+
window.location.href = contextPath || "/";
8181
},
8282
cometServer: null,
8383
cometOnError: function(e) {
@@ -600,8 +600,8 @@
600600
},
601601
calcAjaxUrl: calcAjaxUrl,
602602
registerComets: registerComets,
603-
cometOnSessionLost: function() {
604-
settings.cometOnSessionLost();
603+
cometOnSessionLost: function(contextPath) {
604+
settings.cometOnSessionLost(contextPath);
605605
},
606606
cometOnError: function(e) {
607607
settings.cometOnError(e);

web/webkit/src/main/scala/net/liftweb/http/LiftRules.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -766,7 +766,7 @@ class LiftRules() extends Factory with FormVendor with LazyLoggable {
766766
* lift.cometOnSessionLost reloads the current page by default.
767767
*/
768768
val noCometSessionCmd = new FactoryMaker[JsCmd](
769-
() => JsCmds.Run("lift.cometOnSessionLost()")
769+
() => JsCmds.Run(s"lift.cometOnSessionLost('${S.contextPath.replace("'", "\\'")}')")
770770
) {}
771771

772772
/**

0 commit comments

Comments
 (0)