Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lift_uriSuffix can get lost during long-running AJAX requests #1327

Merged
merged 1 commit into from
Oct 11, 2012

Conversation

Shadowfiend
Copy link
Member

Because lift_uriSuffix is read during doAjaxCycle, a long-running AJAX request that blocks processing of two sequentially queued AJAX calls can result in mangled uriSuffix reads.

The situation is as such:

  • I do an AJAX request with suffix A. It takes 5s.
  • I do an AJAX request with suffix B. lift_uriSuffix is now B.
  • I do an AJAX request with suffix C. lift_uriSuffix is now C.
  • The first request completes, the second is processed. This request now sees suffix C. It is fired off with the wrong suffix.
  • The second request completes, the third is processed. This request now sees no suffix at all. It is fired off with no suffix.

The solution to this is to read the suffix during lift_ajaxHandler where we queue the request up, rather than waiting for other requests to complete.

By having it in doAjaxCycle, there were situations where the uri suffix
could get lost. The most obvious one was when a long-running ajax
request was occurring, and two AJAX requests were queued during that
time frame. This would result in the first request getting the second
request's uriSuffix, and the second request getting no suffix at all.

We now immediately put the uriSuffix into the sending data when
lift_ajaxHandler is called.
@ghost ghost assigned Shadowfiend Sep 24, 2012
dpp pushed a commit that referenced this pull request Oct 11, 2012
lift_uriSuffix can get lost during long-running AJAX requests
@dpp dpp merged commit 932d06b into master Oct 11, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants