Update Connector to support _ in the broker uri - #66
Conversation
Support underscore in the failover host name and parameters in the url
|
could you add a unit test with a example of such a hostname to prevent regressions in the future? |
|
Yes, no problem. I have already added a UT where the host contains underscore |
| $this->connectTimeout = $connectionTimeout; | ||
| $this->context = $context; | ||
| $pattern = "|^(([a-zA-Z0-9]+)://)+\(*([a-zA-Z0-9\.:/i,-]+)\)*\??([a-zA-Z0-9=&]*)$|i"; | ||
| $pattern = "|^(([a-zA-Z0-9]+)://)+\(*([a-zA-Z0-9\.:/i,-_]+)\)*\??([a-zA-Z0-9=&_]*)$|i"; |
There was a problem hiding this comment.
you also added the _ as allowed character within connection properties... was it intended?
There was a problem hiding this comment.
in other words, your unit test should also pass when only adding the first underscore
There was a problem hiding this comment.
Sorry, I was not intented. I did another commit to revert this change. Now in the pull request the last _ shouldn't appear
| $this->connectTimeout = $connectionTimeout; | ||
| $this->context = $context; | ||
| $pattern = "|^(([a-zA-Z0-9]+)://)+\(*([a-zA-Z0-9\.:/i,-]+)\)*\??([a-zA-Z0-9=&]*)$|i"; | ||
| $pattern = "|^(([a-zA-Z0-9]+)://)+\(*([a-zA-Z0-9\.:/i,-_]+)\)*\??([a-zA-Z0-9=&_]*)$|i"; |
|
the change looks good to me, thx. |
|
Thank you. I would like to know one this change is ready to be merged into master, how do you manage to generate a new tag with these changes? Thank you to take a look so fast :) |
|
Either @jmglsn has a few mintues to give his opinion within the next few days or I will take care of it at the end of this week. In the meantime you could use your own fork[1] in case you rely on this change in your project [1] http://stackoverflow.com/questions/13498519/how-to-require-a-fork-with-composer |
|
Great. Thank you for everything |
|
It's included in 4.2.1. |
|
Thank you very much! |
Support underscore in the failover host name and parameters in the url. This issue provokes that if you are using docker and the systems are generated automatically it doesn't work because of the _