Project

General

Profile

Actions

Bug #2079

closed
BT KD

In progressive mode, an initial setInternalPath adds a wtd which causes side-effects

Bug #2079: In progressive mode, an initial setInternalPath adds a wtd which causes side-effects

Added by Bruce Toll about 13 years ago. Updated about 13 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
07/31/2013
Due date:
% Done:

0%

Estimated time:

Description

As a follow-up to #2078, when an application calls setInternalPath() in progressive mode before enableAjax() has occurred, Wt will have the browser update the URL with a redirect to the requested URL --- adding a wtd so that it will get handled by the same session. Once added, this wtd remains for the life of the session. If the application has "reload-is-new-session" set to false, this is unexpected (from a user standpoint). Moreover, and I'm not sure if this should be considered a bug, a browser refresh in this state does not work correctly --- it appears unstyled.

In any case, removing the wtd from the URL after a redirect (when reload-is-new-session is set true) avoids the refresh problem, and seems to better mirror the bootstrap mode of operation.

I've attached a patch that removes a wtd parameter from the URL after a redirect. It seems to work in my limited testing, but would certainly benefit from additional review.

The patch is actually supplied in two parts. The first contains a patch to remove the wtd. The second addresses an edge case in createUrl where the params are initially empty (and it outputs an "&"). I'm not sure if this edge case occurs in normal operation, but it occurs with the wtd-removal patch, so I've added a second patch to address it. Without this second patch, a URL without parameters will incorrectly end-up with a suffix of "?&".


Files

BT Updated by Bruce Toll about 13 years ago Actions #1

I should have noted that the above report (and patches) are for git version 3.3.0-32-ga20ef3f.

KD Updated by Koen Deforche about 13 years ago Actions #2

  • Status changed from New to InProgress
  • Assignee set to Koen Deforche
  • Target version set to 3.3.1

KD Updated by Koen Deforche about 13 years ago Actions #3

  • Status changed from InProgress to Resolved

Hey Bruce,

I fixed this as follows: when a progressive bootstrap session experiences a setInternalPath() in its first response, it will redirect to the bookmark URL rather than redirecting to the url with sessionID. This fixes the user experience, IMO. I would appreciate if you could confirm that this does indeed do what you would expect when this makes its way to git.

Regards,
koen

BT Updated by Bruce Toll about 13 years ago Actions #4

Hi Koen,

Thanks for following-up on this. I look forward to trying out the update/fix when it is available in git.

Regards,

Bruce

KD Updated by Koen Deforche about 13 years ago Actions #5

  • Status changed from Resolved to Closed
Actions

Also available in: PDF Atom