File tree Expand file tree Collapse file tree 1 file changed +17
-8
lines changed
Release/src/http/listener Expand file tree Collapse file tree 1 file changed +17
-8
lines changed Original file line number Diff line number Diff line change @@ -39,15 +39,24 @@ static void check_listener_uri(const http::uri &address)
39
39
{
40
40
// Somethings like proper URI schema are verified by the URI class.
41
41
// We only need to check certain things specific to HTTP.
42
- if (address.scheme () == U (" https" ))
43
- {
44
- throw std::invalid_argument (" Listeners using 'https' are not yet supported" );
45
- }
46
42
47
- if (address.scheme () != U (" http" ))
48
- {
49
- throw std::invalid_argument (" URI scheme must be 'http'" );
50
- }
43
+ #ifdef _MS_WINDOWS
44
+ // HTTP Server API includes SSL support
45
+ if (address.scheme () != U (" http" ) && address.scheme () != U (" https" ))
46
+ {
47
+ throw std::invalid_argument (" URI scheme must be 'http' or 'https'" );
48
+ }
49
+ #else
50
+ if (address.scheme () == U (" https" ))
51
+ {
52
+ throw std::invalid_argument (" Listeners using 'https' are not yet supported" );
53
+ }
54
+
55
+ if (address.scheme () != U (" http" ))
56
+ {
57
+ throw std::invalid_argument (" URI scheme must be 'http'" );
58
+ }
59
+ #endif
51
60
52
61
if (address.host ().empty ())
53
62
{
You can’t perform that action at this time.
0 commit comments