* Support for http://*:9090 urls

* Update version to 1.0.2.3
This commit is contained in:
Stef Heyenrath
2017-08-08 22:58:12 +02:00
committed by GitHub
parent ef73accc9a
commit 2aee658dfa
6 changed files with 52 additions and 15 deletions

View File

@@ -1,5 +1,4 @@
#if NETSTANDARD
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
@@ -8,6 +7,7 @@ using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using WireMock.Http;
using WireMock.Validation;
namespace WireMock.Owin
@@ -20,7 +20,7 @@ namespace WireMock.Owin
public bool IsStarted { get; private set; }
public List<Uri> Urls { get; } = new List<Uri>();
public List<string> Urls { get; } = new List<string>();
public List<int> Ports { get; } = new List<int>();
@@ -31,9 +31,12 @@ namespace WireMock.Owin
foreach (string uriPrefix in uriPrefixes)
{
var uri = new Uri(uriPrefix);
Urls.Add(uri);
Ports.Add(uri.Port);
Urls.Add(uriPrefix);
int port;
string host;
PortUtil.TryExtractProtocolAndPort(uriPrefix, out host, out port);
Ports.Add(port);
}
_options = options;