Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

fix(ngResources): support IPv6 URLs #12532

Closed
wants to merge 1 commit into from

Conversation

lgalfaso
Copy link
Contributor

@lgalfaso lgalfaso commented Aug 9, 2015

Do not confuse IPv6 URLs domains and resource parameters.

Closes #12512

Do not confuse IPv6 URLs domains and resource parameters.

Closes angular#12512
@@ -348,6 +348,7 @@ function shallowClearAndCopy(src, dst) {
*/
angular.module('ngResource', ['ng']).
provider('$resource', function() {
var PROTOCOL_AND_DOMAIN_REGEX = /^http(?:s)?:\/\/[^\/]*/;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not (?:s)? --> s? ?

@gkalpak
Copy link
Member

gkalpak commented Aug 16, 2015

What about the https? part of the RegExp ? Couldn't people be using other protocols ?
(I can't think of any good reason, but people do all sorts of stuff without a good reason :))

Should we add a breaking change notice (or avoid it altogether) ?


Other than that, it LGTM 👍

@lgalfaso lgalfaso closed this in b643f0d Aug 16, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants