Git Product home page Git Product logo

Comments (5)

vojtajina avatar vojtajina commented on May 12, 2024

Have already created branch to fix it:
http://github.com/vojtajina/angular.js/tree/fix-url-matcher

from angular.js.

mhevery avatar mhevery commented on May 12, 2024

let me know when it is ready for review and integration.

from angular.js.

IgorMinar avatar IgorMinar commented on May 12, 2024

is this: http://www.angularjs.org#xx a valid URI? we should check the RFC before we support it.

+1 on testing the regexp separately

from angular.js.

vojtajina avatar vojtajina commented on May 12, 2024

Thanks for note about RFC, I didn't think about it...
You can check RFC, they say:

An HTTP URL takes the form:
http:// <host> : <port> / <path> ? <searchpart>
where <host> and <port> are as described in Section 3.1. If :<port>
is omitted, the port defaults to 80.  No user name or password is
allowed.  <path> is an HTTP selector, and <searchpart> is a query
string. The <path> is optional, as is the <searchpart> and its
preceding "?". If neither <path> nor <searchpart> is present, the "/"
may also be omitted.

So, that means http://www.server.com is a valid url, but you are right, it's always good to add the forward slash.
Important thing is, that URL_MATCH is parser, not validator !

According to the rfc specification, "/" is not part of the path ! But check the javascript object window.location, at least in Firefox: "/" is part of the path property...

It's easy to change the regexp, that "/" would not be part of the url, but I would prefer to keep current behavior...

Well, I hope this patch is ready, the issue is fixed, whole branch is rebased to one commit.
Anyway, it would be good to add some more tests, consider adding more protocols (currently just http, https, ftp, file), etc...

from angular.js.

IgorMinar avatar IgorMinar commented on May 12, 2024

fixed via #68

from angular.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.