mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 22:30:41 +01:00
Issue: Incorrect port matching #141
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @alec-anikin on GitHub (Sep 5, 2018).
Hi!
Regex from PortUtil.UrlDetailsRegex doesn't work for urls like "http://0.0.0.0:5000"
It should be
^(?<proto>\w+)://[^/]+?:(?<port>\d+)/?@StefH commented on GitHub (Sep 11, 2018):
Hello @alec-anikin, thanks for reporting.
However, maybe updating the regex even further to
^((?<proto>\w+)://)(?<host>[^/]+?):(?<port>\d+)\/?$is even better?For

https://0.0.0.0:5000, this matches like:And for

https://localhost:5000, this matches like:@StefH commented on GitHub (Sep 17, 2018):
Hi @alec-anikin ; what do you think?
@StefH commented on GitHub (Sep 20, 2018):
Will be fixed in PR