title: HTTPS Giving Segfault in cpp-httplib
body: <p>I'm trying to do some HTTP(<strong>S</strong>) requests with cpp-httplib. Why does</p>
  <pre><code>#include &lt;iostream&gt;
  #include &quot;httplib.h&quot;
  
  using namespace std;
  
  int main()
  {
      cout &lt;&lt; &quot;hi&quot; &lt;&lt; endl;
  
      auto res = httplib::Client(&quot;http://stackoverflow.com&quot;).Get(&quot;/&quot;);
      cout &lt;&lt; res &lt;&lt; endl;
  
      return 0;
  }
  </code></pre>
  <p>print</p>
  <pre><code>hi
  0x5605c058db50
  </code></pre>
  <p>(OK), but</p>
  <pre><code>#include &lt;iostream&gt;
  #include &quot;httplib.h&quot;
  
  using namespace std;
  
  int main()
  {
      cout &lt;&lt; &quot;hi&quot; &lt;&lt; endl;
  
      auto res = httplib::Client(&quot;https://stackoverflow.com&quot;).Get(&quot;/&quot;);
      cout &lt;&lt; res &lt;&lt; endl;
  
      return 0;
  }
  </code></pre>
  <p>(same code, just changed <code>http</code> to <code>https</code>)</p>
  <pre><code>hi
  Segmentation fault (core dumped)
  </code></pre>
  <p>?</p>
  <p>GDB <code>backtrace</code> gives me this after the segfault:</p>
  <pre><code>#0  0x000055555555eee8 in httplib::ClientImpl::Socket::is_open (this=0x50) at /home/viktor/delayWatcher/cpp-fetcher/libs/httplib.h:822
  #1  0x0000555555569a20 in httplib::ClientImpl::send (this=0x0, req=..., res=...) at /home/viktor/delayWatcher/cpp-fetcher/libs/httplib.h:4579
  #2  0x000055555556bb8b in httplib::ClientImpl::Get(char const*, std::multimap&lt;std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, httplib::detail::ci, std::allocator&lt;std::pair&lt;std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const, std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt; &gt; &gt; const&amp;, std::function&lt;bool (unsigned long, unsigned long)&gt;) (this=0x0, path=0x5555555bc887 &quot;/&quot;, headers=std::multimap with 0 elements, progress=...) at /home/viktor/delayWatcher/cpp-fetcher/libs/httplib.h:4980
  #3  0x000055555556ba1d in httplib::ClientImpl::Get (this=0x0, path=0x5555555bc887 &quot;/&quot;) at /home/viktor/delayWatcher/cpp-fetcher/libs/httplib.h:4958
  #4  0x000055555556c345 in httplib::Client::Get (this=0x7fffffffe320, path=0x5555555bc887 &quot;/&quot;) at /home/viktor/delayWatcher/cpp-fetcher/libs/httplib.h:6015
  #5  0x000055555555d767 in main () at /home/viktor/delayWatcher/cpp-fetcher/fetcher/main.cpp:11
  </code></pre>