Bug Tracker

Modify

Ticket #3493 (closed bug: duplicate)

Opened 6 years ago

Last modified 5 years ago

$.getJSON doesn't properly take into account protocol when determining whether or not to make a remote request

Reported by: sjogreen Owned by:
Priority: major Milestone: 1.3
Component: ajax Version: 1.2.6
Keywords: Cc:
Blocking: Blocked by:

Description

$.getJSON determines whether or not to insert a script tag for a JSONP type request or just to make a plain XmlHttpRequest based on whether or not the hostname matches the current host. Unfortunately, this doesn't take into account protocol (which matters in the same orgin policy) so that getJSON fails to make an https request to the SAME domain as an http page but works fine for https requests to a different domain.

If it would just insert the script tag instead, this would work fine.

Change History

comment:1 Changed 5 years ago by flesler

  • Status changed from new to closed
  • Resolution set to duplicate

I think I already fixed this on [5731] + [5588]. Can you try using the last version from trunk ?

Do reopen if you still find an issue.

Duplicate of #3045.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.