Comments and changes to this ticket
-
Michael Klishin (antares) March 26th, 2009 @ 12:07 AM
- Tag set to do, do_myql
- Milestone set to 0.10.0
- Assigned user set to Dirkjan Bussink
This ticket was in spam box, I marked it as ham. Maybe it is no longer relevant.
-
Dirkjan Bussink March 26th, 2009 @ 02:30 AM
I don't see the fix in the repository specified here. Also don't really get why it would be a problem in dm-more. Egon, could you please elaborate?
-
Michael Klishin (antares) March 26th, 2009 @ 04:43 AM
I guess port mentioned above is in connection string, however, I just successfully instantiated a connection to local postgres server with explicitly given port (I used default one at 5432 though). I expect all DO adapters use the same URI parser.
-
egon March 26th, 2009 @ 03:42 PM
Sorry, it's not with mysql, it's in the dm-validation for urls : dm-validations/lib/dm-validations/formats/url.rb
The regex used doesn't include a colon before the port specification for a URL, and therefore, doesn't recognize any URL containing a port as valid.
-
Michael Klishin (antares) March 26th, 2009 @ 06:27 PM
- Tag changed from do, do_myql to dm-types, uri
- State changed from unconfirmed to confirmed
- Assigned user changed from Dirkjan Bussink to Michael Klishin (antares)
@egon
Thanks for clarification
-
Michael Klishin (antares) March 28th, 2009 @ 09:52 AM
- Tag changed from dm-types, uri to dm-validations, uri
-
Michael Klishin (antares) March 28th, 2009 @ 09:53 AM
- State changed from confirmed to resolved
Fixed with a remark to RFC compliant URIs in cd0e5b35ee2
-
Dan Kubb (dkubb) March 28th, 2009 @ 09:54 AM
(from [cd0e5b35ee29dc1e680d287b2682e21973bae86f]) [dm-validations] Make sure URI format allows URIs with port
- since in web world URIs like http://localhost:4000 are often not really allowed, we leave them out intentionally
- for cases when exactly RFC compliant URI is needed, another format should be added in the future
[#821 state:resolved] http://github.com/datamapper/dm-...
-
egon March 28th, 2009 @ 02:50 PM
The format that needs to be recognized is more like http://www.something.com:8088/ne...
The new regex does not recognize that case either, only http://www.something.com:PORT (no place to put a request).
The regex should be as in the code I checked in:
/(^$)|(^(http|https):\/\/[a-z0-9]+([-.]{1}[a-z0-9]+).[a-z]{2,5}((:[0-9]{1,5})?\/.)?$)/ix
You can, or not, escape the colon. The regex now checked in, does not recognize the case it needs to recognize.
-
Michael Klishin (antares) March 29th, 2009 @ 12:11 AM
I added some more examples. Let me know what to add, or fork dm-more and add them yourself, here is what spec group for valid URIs looks like at the moment
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
People watching this ticket
Tags
Referenced by
-
821 URL with port not recognized as valid [#821 state:resolved] http://github.com/datamapper/dm-...