Compare commits

...

2 Commits

Author SHA1 Message Date
Stef Heyenrath
bf5afef7a1 1.2.5.0 2020-04-17 10:22:40 +00:00
Stef Heyenrath
a8934ec7f9 fix net452 (#454) 2020-04-17 12:18:45 +02:00
5 changed files with 590 additions and 583 deletions

View File

@@ -1,3 +1,7 @@
# 1.2.5.0 (17 April 2020)
- [#454](https://github.com/WireMock-Net/WireMock.Net/pull/454) - Fix port = 0 for net452 [bug] contributed by [StefH](https://github.com/StefH)
- [#453](https://github.com/WireMock-Net/WireMock.Net/issues/453) - MockServer not starting [bug]
# 1.2.4.0 (10 April 2020) # 1.2.4.0 (10 April 2020)
- [#439](https://github.com/WireMock-Net/WireMock.Net/pull/439) - Add support for GZip and Deflate [feature] contributed by [StefH](https://github.com/StefH) - [#439](https://github.com/WireMock-Net/WireMock.Net/pull/439) - Add support for GZip and Deflate [feature] contributed by [StefH](https://github.com/StefH)
- [#444](https://github.com/WireMock-Net/WireMock.Net/pull/444) - Add readme.md + license from mock4net [feature] contributed by [StefH](https://github.com/StefH) - [#444](https://github.com/WireMock-Net/WireMock.Net/pull/444) - Add readme.md + license from mock4net [feature] contributed by [StefH](https://github.com/StefH)

View File

@@ -4,7 +4,7 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<VersionPrefix>1.2.4</VersionPrefix> <VersionPrefix>1.2.5</VersionPrefix>
<PackageReleaseNotes>See CHANGELOG.md</PackageReleaseNotes> <PackageReleaseNotes>See CHANGELOG.md</PackageReleaseNotes>
<PackageIconUrl>https://raw.githubusercontent.com/WireMock-Net/WireMock.Net/master/WireMock.Net-Logo.png</PackageIconUrl> <PackageIconUrl>https://raw.githubusercontent.com/WireMock-Net/WireMock.Net/master/WireMock.Net-Logo.png</PackageIconUrl>
<PackageProjectUrl>https://github.com/WireMock-Net/WireMock.Net</PackageProjectUrl> <PackageProjectUrl>https://github.com/WireMock-Net/WireMock.Net</PackageProjectUrl>

View File

@@ -1,3 +1,3 @@
https://github.com/StefH/GitHubReleaseNotes https://github.com/StefH/GitHubReleaseNotes
GitHubReleaseNotes.exe --output CHANGELOG.md --skip-empty-releases --exclude-labels question invalid doc --version 1.2.4.0 GitHubReleaseNotes.exe --output CHANGELOG.md --skip-empty-releases --exclude-labels question invalid doc --version 1.2.5.0

File diff suppressed because it is too large Load Diff

View File

@@ -1,43 +1,43 @@
using System.Collections.Generic; using System.Collections.Generic;
using WireMock.Util; using WireMock.Util;
namespace WireMock.Owin namespace WireMock.Owin
{ {
internal class HostUrlOptions internal class HostUrlOptions
{ {
public ICollection<string> Urls { get; set; } public ICollection<string> Urls { get; set; }
public int? Port { get; set; } public int? Port { get; set; }
public bool UseSSL { get; set; } public bool UseSSL { get; set; }
public ICollection<(string Url, int Port)> GetDetails() public ICollection<(string Url, int Port)> GetDetails()
{ {
var list = new List<(string Url, int Port)>(); var list = new List<(string Url, int Port)>();
if (Urls == null) if (Urls == null)
{ {
int port = Port ?? FindFreeTcpPort(); int port = Port > 0 ? Port.Value : FindFreeTcpPort();
list.Add(($"{(UseSSL ? "https" : "http")}://localhost:{port}", port)); list.Add(($"{(UseSSL ? "https" : "http")}://localhost:{port}", port));
} }
else else
{ {
foreach (string url in Urls) foreach (string url in Urls)
{ {
PortUtils.TryExtract(url, out string protocol, out string host, out int port); PortUtils.TryExtract(url, out string protocol, out string host, out int port);
list.Add((url, port)); list.Add((url, port));
} }
} }
return list; return list;
} }
private int FindFreeTcpPort() private int FindFreeTcpPort()
{ {
#if USE_ASPNETCORE || NETSTANDARD2_0 || NETSTANDARD2_1 #if USE_ASPNETCORE || NETSTANDARD2_0 || NETSTANDARD2_1
return 0; return 0;
#else #else
return PortUtils.FindFreeTcpPort(); return PortUtils.FindFreeTcpPort();
#endif #endif
} }
} }
} }