Skip to content

Commit 57c2e9e

Browse files
author
megaposer
committed
Rename methods and variable names / incorrporate feedback from microsoft#39 review
1 parent 948ce4f commit 57c2e9e

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

Release/include/cpprest/http_client.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class http_client_config
101101
, m_set_user_nativehandle_options([](native_handle)->void{})
102102
#if !defined(_WIN32) && !defined(__cplusplus_winrt)
103103
, m_ssl_context_callback([](boost::asio::ssl::context&)->void{})
104-
, m_tlsext_host_name(true)
104+
, m_tlsext_sni_enabled(true)
105105
#endif
106106
#if defined(_WIN32) && !defined(__cplusplus_winrt)
107107
, m_buffer_request(false)
@@ -350,22 +350,22 @@ class http_client_config
350350
}
351351

352352
/// <summary>
353-
/// Gets the TLS server name indication (SNI) property.
353+
/// Gets the TLS extension server name indication (SNI) status.
354354
/// </summary>
355355
/// <returns>True if TLS server name indication is enabled, false otherwise.</returns>
356-
bool tlsext_host_name() const
356+
bool is_tlsext_sni_enabled() const
357357
{
358-
return m_tlsext_host_name;
358+
return m_tlsext_sni_enabled;
359359
}
360360

361361
/// <summary>
362-
/// Sets the TLS server name indication (SNI) property.
362+
/// Sets the TLS extension server name indication (SNI) status.
363363
/// </summary>
364-
/// <param name="tlsext_host_name">False to disable the TLS (ClientHello) extension for server name indication, true otherwise.</param>
365-
/// <remarks>Note: This setting is required in most virtual hosting scenarios.</remarks>
366-
void set_tlsext_host_name(bool tlsext_host_name)
364+
/// <param name="tlsext_sni_enabled">False to disable the TLS (ClientHello) extension for server name indication, true otherwise.</param>
365+
/// <remarks>Note: This setting is enabled by default as it is required in most virtual hosting scenarios.</remarks>
366+
void set_tlsext_sni_enabled(bool tlsext_sni_enabled)
367367
{
368-
m_tlsext_host_name = tlsext_host_name;
368+
m_tlsext_sni_enabled = tlsext_sni_enabled;
369369
}
370370
#endif
371371

@@ -392,7 +392,7 @@ class http_client_config
392392

393393
#if !defined(_WIN32) && !defined(__cplusplus_winrt)
394394
std::function<void(boost::asio::ssl::context&)> m_ssl_context_callback;
395-
bool m_tlsext_host_name;
395+
bool m_tlsext_sni_enabled;
396396
#endif
397397
#if defined(_WIN32) && !defined(__cplusplus_winrt)
398398
bool m_buffer_request;

Release/src/http/client/http_client_asio.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ class asio_connection
155155
}
156156

157157
// Check to set host name for Server Name Indication (SNI)
158-
if (config.tlsext_host_name())
158+
if (config.is_tlsext_sni_enabled())
159159
{
160160
SSL_set_tlsext_host_name(m_ssl_stream->native_handle(), const_cast<char *>(host_name.data()));
161161
}

0 commit comments

Comments
 (0)