fxa / uritemplate-js

An javascript implementation of RFC6570 Uri Templates
MIT License
97 stars 20 forks source link

Parsing template with port throws error #1

Closed jcassee closed 12 years ago

jcassee commented 12 years ago

Hi,

Trying to parse the following URI template gives an error:

UriTemplate.parse("http://localhost:8080/api/search{?q}"); ":" not allowed after a "/" in a regular uri"

Is the check at line 478 too strict?

Regards, Joost

fxa commented 12 years ago

Hi Joost, of course you are right. Even if implemented correctly, the if statement is nonsense. I think, a colon is allowed in the fragment part and even in the query part. I will remove the "if" and correct the test setup

jcassee commented 12 years ago

Thanks a lot!