Bug Tracker

Ticket #6908 (closed bug: fixed)

Opened 4 years ago

Last modified 4 years ago

$.ajax doesn't ignore case of scheme and host in URL.

Reported by: YOCKOW Owned by: SlexAxton
Priority: low Milestone: 1.4.4
Component: ajax Version: 1.4.3
Keywords: ajax, case-senstivity Cc:
Blocking: Blocked by:

Description

(ver 1.4.2)

line 5058: remote = parts && (parts[1] && parts[1] !== location.protocol
parts[2] !== location.host);

SHOULD BE

remote = parts && (parts[1] && parts[1].toLowerCase() !== location.protocol.toLowerCase()
parts[2].toLowerCase() !== location.host.toLowerCase());

because scheme in URL and domain names are case-insensitive.

Change History

comment:1 Changed 4 years ago by SlexAxton

  • Priority set to undecided
  • Status changed from new to open
  • Milestone changed from 1.4.3 to 1.4.4

I think this is valid. I'm not sure this comes up a lot, but if we think it's worth the few extra bytes, it could save someone some pain. Thoughts?

comment:2 Changed 4 years ago by SlexAxton

  • Priority changed from undecided to low

comment:3 Changed 4 years ago by SlexAxton

  • Keywords ajax, case-senstivity added
  • Owner set to SlexAxton
  • Status changed from open to assigned

comment:4 Changed 4 years ago by SlexAxton

I have made a pull request for this.  http://github.com/jquery/jquery/pull/62

comment:5 Changed 4 years ago by snover

  • Milestone changed from 1.4.4 to 1.4.5

Retargeting due to severity of regressions in 1.4.3.

comment:6 Changed 4 years ago by john

  • Status changed from assigned to closed
  • Version changed from 1.4.2 to 1.4.3
  • Resolution set to fixed
  • Milestone changed from 1.4.5 to 1.4.4

comment:7 Changed 4 years ago by snover

#6873 is a duplicate of this ticket.

Note: See TracTickets for help on using tickets.