mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 21:10:32 +01:00
Proxying with SSL Not Working in .NET Core 3.1 #307
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 @xadvfh on GitHub (Oct 16, 2020).
Describe the bug
I am trying to create a proxy with SSL enabled but keep getting the error
{"status":"The header name format is invalid."}.Expected behavior:
Proxy with ssl works.
Test to reproduce
-3 Navigate to https://localhost:[your-port]
Other related info
2, I am able to proxy with ssl via the Java version of wiremock so I know it's nothing to do with the website I am proxying to.
@xadvfh commented on GitHub (Nov 8, 2020):
@StefH any ideas on this issue?
@StefH commented on GitHub (Nov 9, 2020):
@xadvfh
I did test with my test-app:
WireMock.Net.Console.NETCoreApp3And with this mapping:
Works fine when I access my wiremock on https://localhost:9433 in postman-->

However I do get an error that my certificate is not valid, but that's expected:

@StefH commented on GitHub (Nov 17, 2020):
Does this help you @xadvfh , or do you still have issues?
@xadvfh commented on GitHub (Nov 26, 2020):
my apologies @StefH I didn't get notifications for this. I will try this out sometime this weekend or early next week and get back to you.
@xadvfh commented on GitHub (Dec 2, 2020):
@StefH this is still not working for me. I made a very simple program in another solution:
@StefH commented on GitHub (Dec 2, 2020):
Instead of Thread.Sleep use:
Works fine for me:

@xadvfh commented on GitHub (Dec 2, 2020):
Still not working. What could I be doing wrong?
@StefH commented on GitHub (Dec 2, 2020):
Are you using .NET Framework or .NET Core?
@xadvfh commented on GitHub (Dec 2, 2020):
.NET core
@xadvfh commented on GitHub (Dec 2, 2020):
@StefH
@StefH commented on GitHub (Dec 2, 2020):
OK Thanks for the information.
Issue is related to .NET Core 3.1, it seems that headers starting with a ":" give problems.
PR = https://github.com/WireMock-Net/WireMock.Net/pull/547
Can you try version
1.3.7-ci-14243.nupkgfrom MyGet (https://github.com/WireMock-Net/WireMock.Net/wiki/MyGet-preview-versions).@xadvfh commented on GitHub (Dec 2, 2020):
@StefH that worked! thanks!
@StefH commented on GitHub (Dec 3, 2020):
@xadvfh -> a new official version will be released today.
@xadvfh commented on GitHub (Dec 7, 2020):
tested and works in the official new version. thanks again.