Project

General

Profile

Actions

Bug #2078

closed

In progressive mode, an initial setInternalPath can damage the URL

Added by Bruce Toll over 11 years ago. Updated over 11 years ago.

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

0%

Estimated time:

Description

If 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). This seems to work fine. However, after the redirect, the deployPath gets updated to reflect the redirected path. This causes some problems, including an inaccurate URL in the address bar.

I've attached a trivial test program that demonstrates the problem, although the Wt hangman application provides a more realistic example. The hangman app will do an initial setInternalPath() to '/play' if a user is already logged in (with the "Remember me" feature) and navigates to the deploy_path in the browser. If run in progressive mode, this will cause a redirect and the URL will get damaged. For instance, if the deploy_path is '/hangman', navigating to '/hangman' will result in a URL of '/hangman/play/play?wtd=...'. Navigating to '/hangman/' will result in a URL of '/hangmanplay/play?wtd=...' and the game will stop working because '/hangmanplay' is no longer within the deploy_path.

This occurs with a recent git version of Wt (3.3.0-32-ga20ef3f).

I've attached a one-line patch that seems to help, though it would certainly benefit from a review by someone more familiar with the code. The intent is to avoid updating the deployPath after the redirect.

NOTE: I will be providing a related report/patch to remove the wtd after the redirect...


Files

Actions #1

Updated by Koen Deforche over 11 years ago

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

Updated by Koen Deforche over 11 years ago

  • Status changed from InProgress to Resolved

Hey,

I've first fixed the 'bug' part (the incorrect URL). The second aspect is handled in response to your second bug report.

Regards,

koen

Actions #3

Updated by Koen Deforche over 11 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF