Skip to main content

Bug Tracker

Side navigation

#6399 closed bug (invalid)

Opened April 05, 2010 11:35PM UTC

Closed October 03, 2010 01:32AM UTC

Last modified March 14, 2012 01:51AM UTC

Jsonp ajax request errors on success callback when doing a redirect

Reported by: cblaze22 Owned by:
Priority: undecided Milestone: 1.4.3
Component: ajax Version: 1.4.2
Keywords: Cc:
Blocked by: Blocking:
Description

There is a bug in the jquery ajax jsonp request on success when doing a redirect from http to https. The error happens on this line.

window[ jsonp ] = undefined;

I am making a https ajax call and doing a redirect in the success page with http.

window.location = window.location.toString().replace('https://', 'http://') + '?success';

The jquery success method finishes up, but still tries to finish by trying to access the window in the dom, but can't because it was originally from an https page, and now its on a http page.

Attachments (0)
Change History (2)

Changed June 12, 2010 02:53AM UTC by dmethvin comment:1

component: unfiledajax
description: \ \ There is a bug in the jquery ajax jsonp request on success when doing a redirect from http to https. The error happens on this line. \ \ window[ jsonp ] = undefined; \ \ I am making a https ajax call and doing a redirect in the success page with http. \ \ window.location = window.location.toString().replace('https://', 'http://') + '?success'; \ \ The jquery success method finishes up, but still tries to finish by trying to access the window in the dom, but can't because it was originally from an https page, and now its on a http page. \ \ There is a bug in the jquery ajax jsonp request on success when doing a redirect from http to https. The error happens on this line. \ \ window[ jsonp ] = undefined; \ \ I am making a https ajax call and doing a redirect in the success page with http. \ \ window.location = window.location.toString().replace('https://', 'http://') + '?success'; \ \ The jquery success method finishes up, but still tries to finish by trying to access the window in the dom, but can't because it was originally from an https page, and now its on a http page. \

Changed October 03, 2010 01:32AM UTC by addyosmani comment:2

description: \ There is a bug in the jquery ajax jsonp request on success when doing a redirect from http to https. The error happens on this line. \ \ window[ jsonp ] = undefined; \ \ I am making a https ajax call and doing a redirect in the success page with http. \ \ window.location = window.location.toString().replace('https://', 'http://') + '?success'; \ \ The jquery success method finishes up, but still tries to finish by trying to access the window in the dom, but can't because it was originally from an https page, and now its on a http page. \ There is a bug in the jquery ajax jsonp request on success when doing a redirect from http to https. The error happens on this line. \ \ window[ jsonp ] = undefined; \ \ I am making a https ajax call and doing a redirect in the success page with http. \ \ window.location = window.location.toString().replace('https://', 'http://') + '?success'; \ \ The jquery success method finishes up, but still tries to finish by trying to access the window in the dom, but can't because it was originally from an https page, and now its on a http page. \
priority: → undecided
resolution: → invalid
status: newclosed

Please re-submit your ticket with a valid test case (code) where this bug is replicated so we can further investigate. At the moment we have no way of establishing whether the redirect issue is due to your server-side/app code's method of redirection or whether this is due to the way the ajax request is completing.