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

Respect PORT from URL without escaping #2652

Closed
wants to merge 1 commit into from
Closed

Respect PORT from URL without escaping #2652

wants to merge 1 commit into from

Conversation

leostera
Copy link
Contributor

Allows to write a URL normally.

Escaping the port does not comply with the URL syntax

Regular Expression and it's position in the if clause are meant to short-circuit ASAP.

Allows to write urls normally.
@petebacondarwin
Copy link
Contributor

This is an interesting idea.

What you are saying is that since parameters cannot be identified as a number, then any parameter starting with a colon and only containing digits (e.g. :8080) must be a port and not a real parameter.

I like this. @IgorMinar - is there any reason why this should break previous functionality?

@petebacondarwin
Copy link
Contributor

PR Checklist (Minor Feature)

  • Contributor signed CLA now or in the past (if you just signed, leave a comment here with your real name for cross reference)
  • Feature improves existing core functionality
  • API is compatible with existing Angular apis and relevant standards (if applicable)
  • PR doesn't contain a breaking change
  • PR contains unit tests
  • PR contains e2e tests (if suitable)
  • PR contains documentation update
  • PR passes all tests on Travis (sanity)
  • PR passes all tests on ci.angularjs.org (cross-browser compatibility)
  • PR is rebased against recent master
  • PR is squashed into one commit per logical change
  • PR's commit messages are descriptive and allows us to autogenerate release notes (required commit message format)
  • All changes requested in review have been implemented

@@ -106,6 +106,13 @@ describe("resource", function() {
R.get({a: 'foo', b: 'bar'});
});

it('should support por unescaped url', function() {
Copy link
Contributor

Choose a reason for hiding this comment

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

typo : "por" -> "an"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My bad. This is to be fixed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it('should support unescaped port in url'), function() {

Is this better?

Choose a reason for hiding this comment

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

I think it should be "should support an unescaped port in url"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍 @Nami-Doc

@leostera
Copy link
Contributor Author

@petebacondarwin My full name is Leandro Ostera Villalva.

@petebacondarwin
Copy link
Contributor

This PR has moved to #2778

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants