willi 5 роки тому
батько
коміт
f3628f8cab
100 змінених файлів з 47049 додано та 4122 видалено
  1. 1 0
      .idea/vcs.xml
  2. 192 106
      .idea/workspace.xml
  3. 1 2
      CMakeLists.txt
  4. 2 0
      lib/CMakeLists.txt
  5. 14 0
      lib/include/ModuleHTTP.h
  6. 8 0
      lib/src/ModuleHTTP.cpp
  7. 230 0
      thirdparty/cpp-httplib/CMakeLists.txt
  8. 22 0
      thirdparty/cpp-httplib/LICENSE
  9. 610 0
      thirdparty/cpp-httplib/README.md
  10. 14 0
      thirdparty/cpp-httplib/appveyor.yml
  11. 42 0
      thirdparty/cpp-httplib/example/Makefile
  12. 33 0
      thirdparty/cpp-httplib/example/benchmark.cc
  13. 3401 0
      thirdparty/cpp-httplib/example/ca-bundle.crt
  14. 41 0
      thirdparty/cpp-httplib/example/client.cc
  15. 160 0
      thirdparty/cpp-httplib/example/client.vcxproj
  16. 46 0
      thirdparty/cpp-httplib/example/example.sln
  17. 19 0
      thirdparty/cpp-httplib/example/hello.cc
  18. 60 0
      thirdparty/cpp-httplib/example/redirect.cc
  19. 113 0
      thirdparty/cpp-httplib/example/server.cc
  20. 160 0
      thirdparty/cpp-httplib/example/server.vcxproj
  21. 32 0
      thirdparty/cpp-httplib/example/simplecli.cc
  22. 135 0
      thirdparty/cpp-httplib/example/simplesvr.cc
  23. 111 0
      thirdparty/cpp-httplib/example/sse.cc
  24. 61 0
      thirdparty/cpp-httplib/example/upload.cc
  25. 5580 0
      thirdparty/cpp-httplib/httplib.h
  26. 33 0
      thirdparty/cpp-httplib/httplibConfig.cmake.in
  27. 32 0
      thirdparty/cpp-httplib/split.py
  28. 30 0
      thirdparty/cpp-httplib/test/Makefile
  29. 3401 0
      thirdparty/cpp-httplib/test/ca-bundle.crt
  30. 9131 0
      thirdparty/cpp-httplib/test/gtest/gtest-all.cc
  31. 19570 0
      thirdparty/cpp-httplib/test/gtest/gtest.h
  32. 39 0
      thirdparty/cpp-httplib/test/gtest/gtest_main.cc
  33. BIN
      thirdparty/cpp-httplib/test/image.jpg
  34. 13 0
      thirdparty/cpp-httplib/test/proxy/Dockerfile
  35. 1 0
      thirdparty/cpp-httplib/test/proxy/basic_passwd
  36. 81 0
      thirdparty/cpp-httplib/test/proxy/basic_squid.conf
  37. 1 0
      thirdparty/cpp-httplib/test/proxy/digest_passwd
  38. 81 0
      thirdparty/cpp-httplib/test/proxy/digest_squid.conf
  39. 22 0
      thirdparty/cpp-httplib/test/proxy/docker-compose.yml
  40. 1 0
      thirdparty/cpp-httplib/test/proxy/down.sh
  41. 1 0
      thirdparty/cpp-httplib/test/proxy/up.sh
  42. 2953 0
      thirdparty/cpp-httplib/test/test.cc
  43. 18 0
      thirdparty/cpp-httplib/test/test.conf
  44. 18 0
      thirdparty/cpp-httplib/test/test.rootCA.conf
  45. 28 0
      thirdparty/cpp-httplib/test/test.sln
  46. 174 0
      thirdparty/cpp-httplib/test/test.vcxproj
  47. 305 0
      thirdparty/cpp-httplib/test/test_proxy.cc
  48. 8 0
      thirdparty/cpp-httplib/test/www/dir/index.html
  49. 1 0
      thirdparty/cpp-httplib/test/www/dir/test.abcde
  50. 1 0
      thirdparty/cpp-httplib/test/www/dir/test.html
  51. 8 0
      thirdparty/cpp-httplib/test/www2/dir/index.html
  52. 1 0
      thirdparty/cpp-httplib/test/www2/dir/test.html
  53. 8 0
      thirdparty/cpp-httplib/test/www3/dir/index.html
  54. 1 0
      thirdparty/cpp-httplib/test/www3/dir/test.html
  55. 0 1
      thirdparty/curl
  56. 0 47
      thirdparty/curlpp/.gitignore
  57. 0 23
      thirdparty/curlpp/.hgignore
  58. 0 54
      thirdparty/curlpp/.travis.yml
  59. 0 115
      thirdparty/curlpp/CMakeLists.txt
  60. 0 1
      thirdparty/curlpp/CNAME
  61. 0 34
      thirdparty/curlpp/Readme.md
  62. 0 1
      thirdparty/curlpp/_config.yml
  63. 0 45
      thirdparty/curlpp/appveyor.yml
  64. 0 5
      thirdparty/curlpp/conanfile.txt
  65. 0 13
      thirdparty/curlpp/doc/AUTHORS
  66. 0 21
      thirdparty/curlpp/doc/LICENSE
  67. 0 238
      thirdparty/curlpp/doc/README.win32
  68. 0 4
      thirdparty/curlpp/doc/TODO
  69. BIN
      thirdparty/curlpp/doc/guide.pdf
  70. 0 706
      thirdparty/curlpp/doc/guide.tex
  71. 0 26
      thirdparty/curlpp/examples/CMakeLists.txt
  72. 0 36
      thirdparty/curlpp/examples/README
  73. 0 43
      thirdparty/curlpp/examples/example00.cpp
  74. 0 171
      thirdparty/curlpp/examples/example01.cpp
  75. 0 104
      thirdparty/curlpp/examples/example02.cpp
  76. 0 88
      thirdparty/curlpp/examples/example03.cpp
  77. 0 89
      thirdparty/curlpp/examples/example04.cpp
  78. 0 120
      thirdparty/curlpp/examples/example05.cpp
  79. 0 144
      thirdparty/curlpp/examples/example06.cpp
  80. 0 174
      thirdparty/curlpp/examples/example07.cpp
  81. 0 98
      thirdparty/curlpp/examples/example08.cpp
  82. 0 96
      thirdparty/curlpp/examples/example09.cpp
  83. 0 99
      thirdparty/curlpp/examples/example10.cpp
  84. 0 107
      thirdparty/curlpp/examples/example11.cpp
  85. 0 75
      thirdparty/curlpp/examples/example12.cpp
  86. 0 125
      thirdparty/curlpp/examples/example13.cpp
  87. 0 147
      thirdparty/curlpp/examples/example14.cpp
  88. 0 61
      thirdparty/curlpp/examples/example15.cpp
  89. 0 78
      thirdparty/curlpp/examples/example16.cpp
  90. 0 103
      thirdparty/curlpp/examples/example17.cpp
  91. 0 115
      thirdparty/curlpp/examples/example18.cpp
  92. 0 81
      thirdparty/curlpp/examples/example19.cpp
  93. 0 74
      thirdparty/curlpp/examples/example20.cpp
  94. 0 87
      thirdparty/curlpp/examples/example21.cpp
  95. 0 75
      thirdparty/curlpp/examples/example22.cpp
  96. 0 55
      thirdparty/curlpp/examples/example23.cpp
  97. 0 104
      thirdparty/curlpp/examples/example24.cpp
  98. 0 40
      thirdparty/curlpp/extras/CMakeLists.txt
  99. 0 91
      thirdparty/curlpp/extras/curlpp-config.in
  100. 0 0
      thirdparty/curlpp/extras/curlpp.m4

+ 1 - 0
.idea/vcs.xml

@@ -2,6 +2,7 @@
 <project version="4">
   <component name="VcsDirectoryMappings">
     <mapping directory="$PROJECT_DIR$" vcs="Git" />
+    <mapping directory="$PROJECT_DIR$/thirdparty/cpp-httplib" vcs="Git" />
     <mapping directory="$PROJECT_DIR$/thirdparty/curl" vcs="Git" />
     <mapping directory="$PROJECT_DIR$/thirdparty/curlpp" vcs="Git" />
     <mapping directory="$PROJECT_DIR$/thirdparty/json" vcs="Git" />

+ 192 - 106
.idea/workspace.xml

@@ -2,10 +2,10 @@
 <project version="4">
   <component name="CMakeRunConfigurationManager" shouldGenerate="true" shouldDeleteObsolete="true">
     <generated>
+      <config projectName="mdd" targetName="auslegung_test" />
+      <config projectName="mdd" targetName="gtest_main" />
       <config projectName="mdd" targetName="gtest" />
       <config projectName="mdd" targetName="mdd_lib" />
-      <config projectName="mdd" targetName="gtest_main" />
-      <config projectName="mdd" targetName="auslegung_test" />
     </generated>
   </component>
   <component name="CMakeSettings">
@@ -15,9 +15,106 @@
   </component>
   <component name="ChangeListManager">
     <list default="true" id="4ddbafad-b85e-492e-80ec-3c73ef45688f" name="Default Changelist" comment="">
+      <change afterPath="$PROJECT_DIR$/lib/include/ModuleHTTP.h" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/lib/src/ModuleHTTP.cpp" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/vcs.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/vcs.xml" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/CMakeLists.txt" beforeDir="false" afterPath="$PROJECT_DIR$/CMakeLists.txt" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/lib/CMakeLists.txt" beforeDir="false" afterPath="$PROJECT_DIR$/lib/CMakeLists.txt" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curl" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/.gitignore" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/.hgignore" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/.travis.yml" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/CMakeLists.txt" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/CNAME" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/Readme.md" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/_config.yml" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/appveyor.yml" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/conanfile.txt" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/doc/AUTHORS" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/doc/LICENSE" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/doc/README.win32" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/doc/TODO" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/doc/guide.pdf" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/doc/guide.tex" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/examples/CMakeLists.txt" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/examples/README" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/examples/example00.cpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/examples/example01.cpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/examples/example02.cpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/examples/example03.cpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/examples/example04.cpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/examples/example05.cpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/examples/example06.cpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/examples/example07.cpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/examples/example08.cpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/examples/example09.cpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/examples/example10.cpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/examples/example11.cpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/examples/example12.cpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/examples/example13.cpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/examples/example14.cpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/examples/example15.cpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/examples/example16.cpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/examples/example17.cpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/examples/example18.cpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/examples/example19.cpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/examples/example20.cpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/examples/example21.cpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/examples/example22.cpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/examples/example23.cpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/examples/example24.cpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/extras/CMakeLists.txt" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/extras/curlpp-config.in" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/extras/curlpp.m4" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/extras/curlpp.pc.in" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/extras/curlpp.spec.in" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/include/curlpp/Easy.hpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/include/curlpp/Easy.inl" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/include/curlpp/Exception.hpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/include/curlpp/Form.hpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/include/curlpp/Info.hpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/include/curlpp/Info.inl" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/include/curlpp/Infos.hpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/include/curlpp/Multi.hpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/include/curlpp/Option.hpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/include/curlpp/Option.inl" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/include/curlpp/OptionBase.hpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/include/curlpp/Options.hpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/include/curlpp/Types.hpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/include/curlpp/cURLpp.hpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/include/curlpp/internal/CurlHandle.hpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/include/curlpp/internal/CurlHandle.inl" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/include/curlpp/internal/OptionContainer.hpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/include/curlpp/internal/OptionContainer.inl" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/include/curlpp/internal/OptionContainerType.hpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/include/curlpp/internal/OptionList.hpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/include/curlpp/internal/OptionSetter.hpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/include/curlpp/internal/OptionSetter.inl" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/include/curlpp/internal/SList.hpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/include/utilspp/EmptyType.hpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/include/utilspp/NonCopyable.hpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/include/utilspp/NullType.hpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/include/utilspp/SmartPtr.hpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/include/utilspp/ThreadingFactoryMutex.hpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/include/utilspp/ThreadingFactoryMutex.inl" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/include/utilspp/ThreadingSingle.hpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/include/utilspp/ThreadingSingle.inl" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/include/utilspp/TypeList.hpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/include/utilspp/TypeTrait.hpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/include/utilspp/clone_ptr.hpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/src/curlpp/Easy.cpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/src/curlpp/Exception.cpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/src/curlpp/Form.cpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/src/curlpp/Info.cpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/src/curlpp/Multi.cpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/src/curlpp/OptionBase.cpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/src/curlpp/Options.cpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/src/curlpp/cURLpp.cpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/src/curlpp/internal/CurlHandle.cpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/src/curlpp/internal/OptionList.cpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/src/curlpp/internal/OptionSetter.cpp" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/thirdparty/curlpp/src/curlpp/internal/SList.cpp" beforeDir="false" />
     </list>
     <ignored path="$PROJECT_DIR$/cmake-build-debug/" />
     <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
@@ -36,22 +133,10 @@
   <component name="FileEditorManager">
     <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/lib/src/ModuleSwitch.cpp">
-          <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="240">
-              <caret line="16" column="26" selection-start-line="16" selection-start-column="26" selection-end-line="16" selection-end-column="26" />
-              <folding>
-                <element signature="e#0#25#0" expanded="true" />
-              </folding>
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/lib/test/test_ModuleSwitch.cpp">
+        <entry file="file://$PROJECT_DIR$/lib/test/test_ProcessorManual.cpp">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="135">
-              <caret line="9" column="30" selection-start-line="9" selection-start-column="30" selection-end-line="9" selection-end-column="30" />
+            <state relative-caret-position="15">
+              <caret line="55" column="31" selection-start-line="55" selection-start-column="31" selection-end-line="55" selection-end-column="31" />
               <folding>
                 <element signature="e#0#24#0" expanded="true" />
                 <element signature="e#70#98#0" expanded="true" />
@@ -61,49 +146,49 @@
         </entry>
       </file>
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/lib/test/test_ModuleMath.cpp">
+        <entry file="file://$PROJECT_DIR$/CMakeLists.txt">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="885">
-              <caret line="59" selection-start-line="59" selection-end-line="59" />
-              <folding>
-                <element signature="e#0#24#0" expanded="true" />
-              </folding>
+            <state relative-caret-position="255">
+              <caret line="17" column="21" selection-start-line="17" selection-start-column="21" selection-end-line="17" selection-end-column="21" />
             </state>
           </provider>
         </entry>
       </file>
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/lib/test/test_ProcessorManual.cpp">
+        <entry file="file://$PROJECT_DIR$/lib/include/ModuleHTTP.h">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="15">
-              <caret line="55" column="31" selection-start-line="55" selection-start-column="31" selection-end-line="55" selection-end-column="31" />
-              <folding>
-                <element signature="e#0#24#0" expanded="true" />
-                <element signature="e#70#98#0" expanded="true" />
-              </folding>
+            <state relative-caret-position="135">
+              <caret line="9" column="16" selection-start-line="9" selection-start-column="16" selection-end-line="9" selection-end-column="16" />
             </state>
           </provider>
         </entry>
       </file>
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/thirdparty/curl/README">
+        <entry file="file://$PROJECT_DIR$/lib/include/ModuleMath.h">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="-261" />
+            <state relative-caret-position="510">
+              <caret line="34" column="21" selection-start-line="34" selection-start-column="21" selection-end-line="34" selection-end-column="21" />
+            </state>
           </provider>
         </entry>
       </file>
-      <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/thirdparty/curl/CMakeLists.txt">
+      <file pinned="false" current-in-tab="true">
+        <entry file="file://$PROJECT_DIR$/lib/src/ModuleHTTP.cpp">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="-630" />
+            <state relative-caret-position="75">
+              <caret line="5" lean-forward="true" selection-start-line="5" selection-end-line="5" />
+              <folding>
+                <element signature="e#0#23#0" expanded="true" />
+              </folding>
+            </state>
           </provider>
         </entry>
       </file>
-      <file pinned="false" current-in-tab="true">
-        <entry file="file://$PROJECT_DIR$/CMakeLists.txt">
+      <file pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/lib/CMakeLists.txt">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="255">
-              <caret line="17" column="65" selection-start-line="17" selection-start-column="65" selection-end-line="17" selection-end-column="65" />
+            <state relative-caret-position="525">
+              <caret line="35" selection-start-line="35" selection-end-line="35" />
             </state>
           </provider>
         </entry>
@@ -111,8 +196,8 @@
       <file pinned="false" current-in-tab="false">
         <entry file="file://$PROJECT_DIR$/lib/include/ModuleBase.h">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="270">
-              <caret line="18" column="38" selection-start-line="18" selection-start-column="38" selection-end-line="18" selection-end-column="38" />
+            <state relative-caret-position="105">
+              <caret line="8" column="32" selection-start-line="8" selection-start-column="32" selection-end-line="8" selection-end-column="32" />
               <folding>
                 <element signature="e#51#69#0" expanded="true" />
               </folding>
@@ -121,21 +206,12 @@
         </entry>
       </file>
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/lib/src/ModuleBase.cpp">
+        <entry file="file://$PROJECT_DIR$/lib/include/IModule.h">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="750">
-              <caret line="50" column="34" selection-start-line="50" selection-start-column="34" selection-end-line="50" selection-end-column="34" />
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/lib/src/ProcessorManual.cpp">
-          <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="390">
-              <caret line="26" column="42" selection-start-line="26" selection-start-column="42" selection-end-line="26" selection-end-column="42" />
+            <state relative-caret-position="180">
+              <caret line="12" column="10" selection-start-line="12" selection-start-column="10" selection-end-line="12" selection-end-column="10" />
               <folding>
-                <element signature="e#0#28#0" expanded="true" />
+                <element signature="e#45#65#0" expanded="true" />
               </folding>
             </state>
           </provider>
@@ -191,7 +267,6 @@
         <option value="$PROJECT_DIR$/lib/src/UniqueBase.cpp" />
         <option value="$PROJECT_DIR$/lib/src/Output.cpp" />
         <option value="$PROJECT_DIR$/lib/include/IUnique.h" />
-        <option value="$PROJECT_DIR$/lib/CMakeLists.txt" />
         <option value="$PROJECT_DIR$/lib/include/Output.h" />
         <option value="$PROJECT_DIR$/lib/include/IInput.h" />
         <option value="$PROJECT_DIR$/lib/include/Input.h" />
@@ -211,7 +286,10 @@
         <option value="$PROJECT_DIR$/lib/src/ModuleSwitch.cpp" />
         <option value="$PROJECT_DIR$/lib/src/ProcessorManual.cpp" />
         <option value="$PROJECT_DIR$/lib/test/test_ProcessorManual.cpp" />
+        <option value="$PROJECT_DIR$/lib/CMakeLists.txt" />
+        <option value="$PROJECT_DIR$/lib/include/ModuleHTTP.h" />
         <option value="$PROJECT_DIR$/CMakeLists.txt" />
+        <option value="$PROJECT_DIR$/lib/src/ModuleHTTP.cpp" />
       </list>
     </option>
   </component>
@@ -282,14 +360,7 @@
               <item name="master_thesis_ws" type="47feb1d3:ProjectViewModuleNode" />
               <item name="master_thesis_ws" type="462c0819:PsiDirectoryNode" />
               <item name="thirdparty" type="462c0819:PsiDirectoryNode" />
-              <item name="curl" type="462c0819:PsiDirectoryNode" />
-            </path>
-            <path>
-              <item name="mdd" type="b2602c69:ProjectViewProjectNode" />
-              <item name="master_thesis_ws" type="47feb1d3:ProjectViewModuleNode" />
-              <item name="master_thesis_ws" type="462c0819:PsiDirectoryNode" />
-              <item name="thirdparty" type="462c0819:PsiDirectoryNode" />
-              <item name="curlpp" type="462c0819:PsiDirectoryNode" />
+              <item name="cpp-httplib" type="462c0819:PsiDirectoryNode" />
             </path>
           </expand>
           <select />
@@ -376,14 +447,14 @@
       </method>
     </configuration>
     <list>
-      <item itemvalue="Google Test.All in auslegung_test" />
-      <item itemvalue="Google Test.ModuleMath" />
-      <item itemvalue="Google Test.ModuleMath.ARRAYINT_PLUS_ARRAYInt" />
-      <item itemvalue="Google Test.ModuleMath.add" />
       <item itemvalue="CMake Application.auslegung_test" />
       <item itemvalue="CMake Application.gtest" />
       <item itemvalue="CMake Application.gtest_main" />
       <item itemvalue="CMake Application.mdd_lib" />
+      <item itemvalue="Google Test.All in auslegung_test" />
+      <item itemvalue="Google Test.ModuleMath" />
+      <item itemvalue="Google Test.ModuleMath.ARRAYINT_PLUS_ARRAYInt" />
+      <item itemvalue="Google Test.ModuleMath.add" />
     </list>
     <recent_temporary>
       <list>
@@ -428,7 +499,7 @@
       <workItem from="1590139016676" duration="24307000" />
       <workItem from="1590401033286" duration="1155000" />
       <workItem from="1590443025824" duration="116000" />
-      <workItem from="1590444664396" duration="1004000" />
+      <workItem from="1590444664396" duration="2078000" />
     </task>
     <servers />
   </component>
@@ -465,7 +536,7 @@
     </history-entry>
   </component>
   <component name="TimeTrackingManager">
-    <option name="totallyTimeSpent" value="156880000" />
+    <option name="totallyTimeSpent" value="157954000" />
   </component>
   <component name="TodoView" selected-index="2">
     <todo-panel id="selected-file">
@@ -567,8 +638,6 @@
     </watches-manager>
   </component>
   <component name="editorHistoryManager">
-    <entry file="file://$PROJECT_DIR$/lib/src/Data.cpp" />
-    <entry file="file://$PROJECT_DIR$/lib/include/Data.h" />
     <entry file="file://$PROJECT_DIR$/lib/include/IData.h" />
     <entry file="file:///usr/include/c++/7/bits/shared_ptr_base.h">
       <provider selected="true" editor-type-id="text-editor">
@@ -648,13 +717,6 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/lib/CMakeLists.txt">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="105">
-          <caret line="7" column="23" lean-forward="true" selection-start-line="7" selection-start-column="23" selection-end-line="7" selection-end-column="23" />
-        </state>
-      </provider>
-    </entry>
     <entry file="file://$PROJECT_DIR$/lib/include/HandlerModule.h">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="180">
@@ -693,16 +755,6 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/lib/include/IModule.h">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="255">
-          <caret line="17" column="8" lean-forward="true" selection-start-line="17" selection-start-column="8" selection-end-line="18" selection-end-column="60" />
-          <folding>
-            <element signature="e#45#65#0" expanded="true" />
-          </folding>
-        </state>
-      </provider>
-    </entry>
     <entry file="file://$PROJECT_DIR$/lib/include/IProcessor.h">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="285">
@@ -778,13 +830,6 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/lib/include/ModuleMath.h">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="510">
-          <caret line="34" column="21" selection-start-line="34" selection-start-column="21" selection-end-line="34" selection-end-column="21" />
-        </state>
-      </provider>
-    </entry>
     <entry file="file:///usr/src/gtest/src/gtest.cc">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="37215">
@@ -850,16 +895,6 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/lib/include/ModuleBase.h">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="270">
-          <caret line="18" column="38" selection-start-line="18" selection-start-column="38" selection-end-line="18" selection-end-column="38" />
-          <folding>
-            <element signature="e#51#69#0" expanded="true" />
-          </folding>
-        </state>
-      </provider>
-    </entry>
     <entry file="file://$PROJECT_DIR$/lib/src/ModuleBase.cpp">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="750">
@@ -898,10 +933,61 @@
         <state relative-caret-position="-630" />
       </provider>
     </entry>
+    <entry file="file://$PROJECT_DIR$/lib/include/IModule.h">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="180">
+          <caret line="12" column="10" selection-start-line="12" selection-start-column="10" selection-end-line="12" selection-end-column="10" />
+          <folding>
+            <element signature="e#45#65#0" expanded="true" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/lib/include/ModuleBase.h">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="105">
+          <caret line="8" column="32" selection-start-line="8" selection-start-column="32" selection-end-line="8" selection-end-column="32" />
+          <folding>
+            <element signature="e#51#69#0" expanded="true" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/lib/include/ModuleMath.h">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="510">
+          <caret line="34" column="21" selection-start-line="34" selection-start-column="21" selection-end-line="34" selection-end-column="21" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/lib/include/ModuleHTTP.h">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="135">
+          <caret line="9" column="16" selection-start-line="9" selection-start-column="16" selection-end-line="9" selection-end-column="16" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/lib/CMakeLists.txt">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="525">
+          <caret line="35" selection-start-line="35" selection-end-line="35" />
+        </state>
+      </provider>
+    </entry>
     <entry file="file://$PROJECT_DIR$/CMakeLists.txt">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="255">
-          <caret line="17" column="65" selection-start-line="17" selection-start-column="65" selection-end-line="17" selection-end-column="65" />
+          <caret line="17" column="21" selection-start-line="17" selection-start-column="21" selection-end-line="17" selection-end-column="21" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/lib/src/ModuleHTTP.cpp">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="75">
+          <caret line="5" lean-forward="true" selection-start-line="5" selection-end-line="5" />
+          <folding>
+            <element signature="e#0#23#0" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>

+ 1 - 2
CMakeLists.txt

@@ -14,6 +14,5 @@ if(${TESTS_ENABLED})
 endif()
 
 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/json/single_include)
-include_directories(${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/curl)
-include_directories(${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/curlpp)
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/cpp-httplib)
 add_subdirectory(lib)

+ 2 - 0
lib/CMakeLists.txt

@@ -13,6 +13,7 @@ add_library(${PROJECT_NAME} STATIC
         include/IProcessor.h
         include/IUnique.h
         include/ModuleBase.h
+        include/ModuleHTTP.h
         include/ModuleMath.h
         include/ModuleSwitch.h
         include/Output.h
@@ -21,6 +22,7 @@ add_library(${PROJECT_NAME} STATIC
 
         src/Input.cpp
         src/ModuleBase.cpp
+        src/ModuleHTTP.cpp
         src/ModuleMath.cpp
         src/ModuleSwitch.cpp
         src/Output.cpp

+ 14 - 0
lib/include/ModuleHTTP.h

@@ -0,0 +1,14 @@
+#ifndef MDD_MODULEHTTP_H
+#define MDD_MODULEHTTP_H
+
+#include "ModuleBase.h"
+
+namespace mdd{
+    class ModuleHTTP : public ModuleBase{
+    public:
+        ModuleHTTP(std::string fname, std::string id, int port);
+        bool update() override;
+    };
+}
+
+#endif //MDD_MODULEHTTP_H

+ 8 - 0
lib/src/ModuleHTTP.cpp

@@ -0,0 +1,8 @@
+#include "ModuleHTTP.h"
+#include <httplib.h>
+
+namespace mdd{
+    bool ModuleHTTP::update() {
+
+    }
+}

+ 230 - 0
thirdparty/cpp-httplib/CMakeLists.txt

@@ -0,0 +1,230 @@
+#[[
+	Build options:
+	* HTTPLIB_USE_OPENSSL_IF_AVAILABLE (default on)
+	* HTTPLIB_USE_ZLIB_IF_AVAILABLE (default on)
+	* HTTPLIB_REQUIRE_OPENSSL (default off)
+	* HTTPLIB_REQUIRE_ZLIB (default off)
+	* HTTPLIB_COMPILE (default off)
+
+	-------------------------------------------------------------------------------
+
+	After installation with Cmake, a find_package(httplib) is available.
+	This creates a httplib::httplib target (if found).
+	It can be linked like so:
+
+	target_link_libraries(your_exe httplib::httplib)
+
+	The following will build & install for later use.
+
+	Linux/macOS:
+
+	mkdir -p build
+	cd build
+	cmake -DCMAKE_BUILD_TYPE=Release ..
+	sudo cmake --build . --target install
+
+	Windows:
+
+	mkdir build
+	cd build
+	cmake ..
+	runas /user:Administrator "cmake --build . --config Release --target install"
+
+	-------------------------------------------------------------------------------
+
+	These three variables are available after you run find_package(httplib)
+	* HTTPLIB_HEADER_PATH - this is the full path to the installed header.
+	* HTTPLIB_IS_USING_OPENSSL - a bool for if OpenSSL support is enabled.
+	* HTTPLIB_IS_USING_ZLIB - a bool for if ZLIB support is enabled.
+	* HTTPLIB_IS_COMPILED - a bool for if the library is header-only or compiled.
+
+	Want to use precompiled headers (Cmake feature since v3.16)?
+	It's as simple as doing the following (before linking):
+
+	target_precompile_headers(httplib::httplib INTERFACE "${HTTPLIB_HEADER_PATH}")
+
+	-------------------------------------------------------------------------------
+
+	FindPython3 requires Cmake v3.12
+]]
+cmake_minimum_required(VERSION 3.12.0 FATAL_ERROR)
+project(httplib LANGUAGES CXX)
+
+# Change as needed to set an OpenSSL minimum version.
+# This is used in the installed Cmake config file.
+set(_HTTPLIB_OPENSSL_MIN_VER "1.1.1")
+
+# Allow for a build to require OpenSSL to pass, instead of just being optional
+option(HTTPLIB_REQUIRE_OPENSSL "Requires OpenSSL to be found & linked, or fails build." OFF)
+option(HTTPLIB_REQUIRE_ZLIB "Requires ZLIB to be found & linked, or fails build." OFF)
+# Allow for a build to casually enable OpenSSL/ZLIB support, but silenty continue if not found.
+# Make these options so their automatic use can be specifically disabled (as needed)
+option(HTTPLIB_USE_OPENSSL_IF_AVAILABLE "Uses OpenSSL (if available) to enable HTTPS support." ON)
+option(HTTPLIB_USE_ZLIB_IF_AVAILABLE "Uses ZLIB (if available) to enable compression support." ON)
+# Lets you compile the program as a regular library instead of header-only
+option(HTTPLIB_COMPILE "If ON, uses a Python script to split the header into a compilable header & source file (requires Python v3)." OFF)
+# Defaults to static library
+option(BUILD_SHARED_LIBS "Build the library as a shared library instead of static. Has no effect if using header-only." OFF)
+if (BUILD_SHARED_LIBS AND WIN32 AND HTTPLIB_COMPILE)
+	# Necessary for Windows if building shared libs
+	# See https://stackoverflow.com/a/40743080
+	set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
+endif()
+
+# Threads needed for <thread> on some systems, and for <pthread.h> on Linux
+find_package(Threads REQUIRED)
+# Since Cmake v3.11, Crypto & SSL became optional when not specified as COMPONENTS.
+if(HTTPLIB_REQUIRE_OPENSSL)
+	find_package(OpenSSL ${_HTTPLIB_OPENSSL_MIN_VER} COMPONENTS Crypto SSL REQUIRED)
+elseif(HTTPLIB_USE_OPENSSL_IF_AVAILABLE)
+	find_package(OpenSSL ${_HTTPLIB_OPENSSL_MIN_VER} COMPONENTS Crypto SSL QUIET)
+endif()
+if(HTTPLIB_REQUIRE_ZLIB)
+	find_package(ZLIB REQUIRED)
+elseif(HTTPLIB_USE_ZLIB_IF_AVAILABLE)
+	find_package(ZLIB QUIET)
+endif()
+
+# Used for default, common dirs that the end-user can change (if needed)
+# like CMAKE_INSTALL_INCLUDEDIR or CMAKE_INSTALL_DATADIR
+include(GNUInstallDirs)
+
+if(HTTPLIB_COMPILE)
+	# Put the split script into the build dir
+	configure_file(split.py "${CMAKE_CURRENT_BINARY_DIR}/split.py"
+		COPYONLY
+	)
+	# Needs to be in the same dir as the python script
+	configure_file(httplib.h "${CMAKE_CURRENT_BINARY_DIR}/httplib.h"
+		COPYONLY
+	)
+
+	# Used outside of this if-else
+	set(_INTERFACE_OR_PUBLIC PUBLIC)
+	# Brings in the Python3_EXECUTABLE path we can use.
+	find_package(Python3 REQUIRED)
+	# Actually split the file
+	# Keeps the output in the build dir to not pollute the main dir
+	execute_process(COMMAND ${Python3_EXECUTABLE} "${CMAKE_CURRENT_BINARY_DIR}/split.py"
+		WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+		ERROR_VARIABLE _httplib_split_error
+	)
+	if(_httplib_split_error)
+		message(FATAL_ERROR "Failed when trying to split Cpp-httplib with the Python script.\n${_httplib_split_error}")
+	endif()
+
+	# split.py puts output in "out"
+	set(_httplib_build_includedir "${CMAKE_CURRENT_BINARY_DIR}/out")
+	# This will automatically be either static or shared based on the value of BUILD_SHARED_LIBS
+	add_library(${PROJECT_NAME} "${_httplib_build_includedir}/httplib.cc")
+	target_sources(${PROJECT_NAME}
+		PUBLIC
+			$<BUILD_INTERFACE:${_httplib_build_includedir}/httplib.h>
+			$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/httplib.h>
+	)
+else()
+	# This is for header-only.
+	set(_INTERFACE_OR_PUBLIC INTERFACE)
+	add_library(${PROJECT_NAME} INTERFACE)
+	set(_httplib_build_includedir "${CMAKE_CURRENT_SOURCE_DIR}")
+endif()
+# Lets you address the target with httplib::httplib
+# Only useful if building in-tree, versus using it from an installation.
+add_library(${PROJECT_NAME}::${PROJECT_NAME} ALIAS ${PROJECT_NAME})
+
+# Might be missing some, but this list is somewhat comprehensive
+target_compile_features(${PROJECT_NAME} ${_INTERFACE_OR_PUBLIC}
+	cxx_std_11
+	cxx_nullptr
+	cxx_lambdas
+	cxx_override
+	cxx_defaulted_functions
+	cxx_attribute_deprecated
+	cxx_auto_type
+	cxx_decltype
+	cxx_deleted_functions
+	cxx_range_for
+	cxx_sizeof_member
+)
+
+target_include_directories(${PROJECT_NAME} ${_INTERFACE_OR_PUBLIC}
+    $<BUILD_INTERFACE:${_httplib_build_includedir}>
+    $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
+)
+
+# Always require threads
+target_link_libraries(${PROJECT_NAME} ${_INTERFACE_OR_PUBLIC}
+		Threads::Threads
+)
+
+# We check for the target when using IF_AVAILABLE since it's possible we didn't find it.
+if(HTTPLIB_USE_OPENSSL_IF_AVAILABLE AND TARGET OpenSSL::SSL AND TARGET OpenSSL::Crypto OR HTTPLIB_REQUIRE_OPENSSL)
+	target_link_libraries(${PROJECT_NAME} ${_INTERFACE_OR_PUBLIC}
+		OpenSSL::SSL OpenSSL::Crypto
+	)
+	target_compile_definitions(${PROJECT_NAME} ${_INTERFACE_OR_PUBLIC}
+		CPPHTTPLIB_OPENSSL_SUPPORT
+	)
+	set(HTTPLIB_IS_USING_OPENSSL TRUE)
+else()
+	set(HTTPLIB_IS_USING_OPENSSL FALSE)
+endif()
+
+# We check for the target when using IF_AVAILABLE since it's possible we didn't find it.
+if(HTTPLIB_USE_ZLIB_IF_AVAILABLE AND TARGET ZLIB::ZLIB OR HTTPLIB_REQUIRE_ZLIB)
+	target_link_libraries(${PROJECT_NAME} ${_INTERFACE_OR_PUBLIC}
+		ZLIB::ZLIB
+	)
+	target_compile_definitions(${PROJECT_NAME} ${_INTERFACE_OR_PUBLIC}
+		CPPHTTPLIB_ZLIB_SUPPORT
+	)
+	set(HTTPLIB_IS_USING_ZLIB TRUE)
+else()
+	set(HTTPLIB_IS_USING_ZLIB FALSE)
+endif()
+
+# Cmake's find_package search path is different based on the system
+# See https://cmake.org/cmake/help/latest/command/find_package.html for the list
+if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
+	set(_TARGET_INSTALL_CMAKEDIR "${CMAKE_INSTALL_PREFIX}/cmake/${PROJECT_NAME}")
+else()
+	# On Non-Windows, it should be /usr/lib/cmake/<name>/<name>Config.cmake
+	# NOTE: This may or may not work for macOS...
+	set(_TARGET_INSTALL_CMAKEDIR "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}")
+endif()
+
+include(CMakePackageConfigHelpers)
+
+# Configures the meta-file httplibConfig.cmake.in to replace variables with paths/values/etc.
+configure_package_config_file("${PROJECT_NAME}Config.cmake.in"
+	"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
+	INSTALL_DESTINATION "${_TARGET_INSTALL_CMAKEDIR}"
+	# Passes the includedir install path
+	PATH_VARS CMAKE_INSTALL_FULL_INCLUDEDIR
+	# There aren't any components, so don't use the macro
+	NO_CHECK_REQUIRED_COMPONENTS_MACRO
+)
+
+# Creates the export httplibTargets.cmake
+# This is strictly what holds compilation requirements
+# and linkage information (doesn't find deps though).
+install(TARGETS ${PROJECT_NAME}
+	EXPORT httplibTargets
+	LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+	ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
+install(FILES "${_httplib_build_includedir}/httplib.h" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
+
+install(FILES
+		"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
+	DESTINATION ${_TARGET_INSTALL_CMAKEDIR}
+)
+
+# NOTE: This path changes depending on if it's on Windows or Linux
+install(EXPORT httplibTargets
+	# Puts the targets into the httplib namespace
+	# So this makes httplib::httplib linkable after doing find_package(httplib)
+	NAMESPACE ${PROJECT_NAME}::
+	DESTINATION ${_TARGET_INSTALL_CMAKEDIR}
+)

+ 22 - 0
thirdparty/cpp-httplib/LICENSE

@@ -0,0 +1,22 @@
+The MIT License (MIT)
+
+Copyright (c) 2017 yhirose
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+

+ 610 - 0
thirdparty/cpp-httplib/README.md

@@ -0,0 +1,610 @@
+cpp-httplib
+===========
+
+[![](https://github.com/yhirose/cpp-httplib/workflows/test/badge.svg)](https://github.com/yhirose/cpp-httplib/actions)
+[![Bulid Status](https://ci.appveyor.com/api/projects/status/github/yhirose/cpp-httplib?branch=master&svg=true)](https://ci.appveyor.com/project/yhirose/cpp-httplib)
+
+A C++11 single-file header-only cross platform HTTP/HTTPS library.
+
+It's extremely easy to setup. Just include **httplib.h** file in your code!
+
+For Windows users: Please read [this note](https://github.com/yhirose/cpp-httplib#windows).
+
+Server Example
+--------------
+
+```c++
+#include <httplib.h>
+
+int main(void)
+{
+  using namespace httplib;
+
+  Server svr;
+
+  svr.Get("/hi", [](const Request& req, Response& res) {
+    res.set_content("Hello World!", "text/plain");
+  });
+
+  svr.Get(R"(/numbers/(\d+))", [&](const Request& req, Response& res) {
+    auto numbers = req.matches[1];
+    res.set_content(numbers, "text/plain");
+  });
+
+  svr.Get("/body-header-param", [](const Request& req, Response& res) {
+    if (req.has_header("Content-Length")) {
+      auto val = req.get_header_value("Content-Length");
+    }
+    if (req.has_param("key")) {
+      auto val = req.get_param_value("key");
+    }
+    res.set_content(req.body, "text/plain");
+  });
+
+  svr.Get("/stop", [&](const Request& req, Response& res) {
+    svr.stop();
+  });
+
+  svr.listen("localhost", 1234);
+}
+```
+
+`Post`, `Put`, `Delete` and `Options` methods are also supported.
+
+### Bind a socket to multiple interfaces and any available port
+
+```cpp
+int port = svr.bind_to_any_port("0.0.0.0");
+svr.listen_after_bind();
+```
+
+### Static File Server
+
+```cpp
+// Mount / to ./www directory
+auto ret = svr.set_mount_point("/", "./www");
+if (!ret) {
+  // The specified base directory doesn't exist...
+}
+
+// Mount /public to ./www directory
+ret = svr.set_mount_point("/public", "./www");
+
+// Mount /public to ./www1 and ./www2 directories
+ret = svr.set_mount_point("/public", "./www1"); // 1st order to search
+ret = svr.set_mount_point("/public", "./www2"); // 2nd order to search
+
+// Remove mount /
+ret = svr.remove_mount_point("/");
+
+// Remove mount /public
+ret = svr.remove_mount_point("/public");
+```
+
+```cpp
+// User defined file extension and MIME type mappings
+svr.set_file_extension_and_mimetype_mapping("cc", "text/x-c");
+svr.set_file_extension_and_mimetype_mapping("cpp", "text/x-c");
+svr.set_file_extension_and_mimetype_mapping("hh", "text/x-h");
+```
+
+The followings are built-in mappings:
+
+| Extension |     MIME Type          |
+| :-------- | :--------------------- |
+| txt       | text/plain             |
+| html, htm | text/html              |
+| css       | text/css               |
+| jpeg, jpg | image/jpg              |
+| png       | image/png              |
+| gif       | image/gif              |
+| svg       | image/svg+xml          |
+| ico       | image/x-icon           |
+| json      | application/json       |
+| pdf       | application/pdf        |
+| js        | application/javascript |
+| wasm      | application/wasm       |
+| xml       | application/xml        |
+| xhtml     | application/xhtml+xml  |
+
+NOTE: These the static file server methods are not thread safe.
+
+### Logging
+
+```cpp
+svr.set_logger([](const auto& req, const auto& res) {
+  your_logger(req, res);
+});
+```
+
+### Error handler
+
+```cpp
+svr.set_error_handler([](const auto& req, auto& res) {
+  auto fmt = "<p>Error Status: <span style='color:red;'>%d</span></p>";
+  char buf[BUFSIZ];
+  snprintf(buf, sizeof(buf), fmt, res.status);
+  res.set_content(buf, "text/html");
+});
+```
+
+### 'multipart/form-data' POST data
+
+```cpp
+svr.Post("/multipart", [&](const auto& req, auto& res) {
+  auto size = req.files.size();
+  auto ret = req.has_file("name1");
+  const auto& file = req.get_file_value("name1");
+  // file.filename;
+  // file.content_type;
+  // file.content;
+});
+```
+
+### Receive content with Content receiver
+
+```cpp
+svr.Post("/content_receiver",
+  [&](const Request &req, Response &res, const ContentReader &content_reader) {
+    if (req.is_multipart_form_data()) {
+      MultipartFormDataItems files;
+      content_reader(
+        [&](const MultipartFormData &file) {
+          files.push_back(file);
+          return true;
+        },
+        [&](const char *data, size_t data_length) {
+          files.back().content.append(data, data_length);
+          return true;
+        });
+    } else {
+      std::string body;
+      content_reader([&](const char *data, size_t data_length) {
+        body.append(data, data_length);
+        return true;
+      });
+      res.set_content(body, "text/plain");
+    }
+  });
+```
+
+### Send content with Content provider
+
+```cpp
+const size_t DATA_CHUNK_SIZE = 4;
+
+svr.Get("/stream", [&](const Request &req, Response &res) {
+  auto data = new std::string("abcdefg");
+
+  res.set_content_provider(
+    data->size(), // Content length
+    [data](size_t offset, size_t length, DataSink &sink) {
+      const auto &d = *data;
+      sink.write(&d[offset], std::min(length, DATA_CHUNK_SIZE));
+      return true; // return 'false' if you want to cancel the process.
+    },
+    [data] { delete data; });
+});
+```
+
+### Chunked transfer encoding
+
+```cpp
+svr.Get("/chunked", [&](const Request& req, Response& res) {
+  res.set_chunked_content_provider(
+    [](size_t offset, DataSink &sink) {
+      sink.write("123", 3);
+      sink.write("345", 3);
+      sink.write("789", 3);
+      sink.done();
+      return true; // return 'false' if you want to cancel the process.
+    }
+  );
+});
+```
+
+### 'Expect: 100-continue' handler
+
+As default, the server sends `100 Continue` response for `Expect: 100-continue` header.
+
+```cpp
+// Send a '417 Expectation Failed' response.
+svr.set_expect_100_continue_handler([](const Request &req, Response &res) {
+  return 417;
+});
+```
+
+```cpp
+// Send a final status without reading the message body.
+svr.set_expect_100_continue_handler([](const Request &req, Response &res) {
+  return res.status = 401;
+});
+```
+
+### Keep-Alive connection
+
+```cpp
+svr.set_keep_alive_max_count(2); // Default is 5
+```
+
+### Timeout
+
+```c++
+svr.set_read_timeout(5, 0); // 5 seconds
+svr.set_write_timeout(5, 0); // 5 seconds
+svr.set_idle_interval(0, 100000); // 100 milliseconds
+```
+
+### Set maximum payload length for reading request body
+
+```c++
+svr.set_payload_max_length(1024 * 1024 * 512); // 512MB
+```
+
+### Server-Sent Events
+
+Please check [here](https://github.com/yhirose/cpp-httplib/blob/master/example/sse.cc).
+
+### Default thread pool support
+
+
+`ThreadPool` is used as a default task queue, and the default thread count is set to value from `std::thread::hardware_concurrency()`.
+
+You can change the thread count by setting `CPPHTTPLIB_THREAD_POOL_COUNT`.
+
+### Override the default thread pool with yours
+
+```cpp
+class YourThreadPoolTaskQueue : public TaskQueue {
+public:
+  YourThreadPoolTaskQueue(size_t n) {
+    pool_.start_with_thread_count(n);
+  }
+
+  virtual void enqueue(std::function<void()> fn) override {
+    pool_.enqueue(fn);
+  }
+
+  virtual void shutdown() override {
+    pool_.shutdown_gracefully();
+  }
+
+private:
+  YourThreadPool pool_;
+};
+
+svr.new_task_queue = [] {
+  return new YourThreadPoolTaskQueue(12);
+};
+```
+
+Client Example
+--------------
+
+```c++
+#include <httplib.h>
+#include <iostream>
+
+int main(void)
+{
+  // IMPORTANT: 1st parameter must be a hostname or an IP adress string.
+  httplib::Client cli("localhost", 1234);
+
+  auto res = cli.Get("/hi");
+  if (res && res->status == 200) {
+    std::cout << res->body << std::endl;
+  }
+}
+```
+
+### GET with HTTP headers
+
+```c++
+httplib::Headers headers = {
+  { "Accept-Encoding", "gzip, deflate" }
+};
+auto res = cli.Get("/hi", headers);
+```
+
+### GET with Content Receiver
+
+```c++
+std::string body;
+
+auto res = cli.Get("/large-data",
+  [&](const char *data, size_t data_length) {
+    body.append(data, data_length);
+    return true;
+  });
+
+assert(res->body.empty());
+```
+
+### POST
+
+```c++
+res = cli.Post("/post", "text", "text/plain");
+res = cli.Post("/person", "name=john1&note=coder", "application/x-www-form-urlencoded");
+```
+
+### POST with parameters
+
+```c++
+httplib::Params params;
+params.emplace("name", "john");
+params.emplace("note", "coder");
+
+auto res = cli.Post("/post", params);
+```
+ or
+
+```c++
+httplib::Params params{
+  { "name", "john" },
+  { "note", "coder" }
+};
+
+auto res = cli.Post("/post", params);
+```
+
+### POST with Multipart Form Data
+
+```c++
+httplib::MultipartFormDataItems items = {
+  { "text1", "text default", "", "" },
+  { "text2", "aωb", "", "" },
+  { "file1", "h\ne\n\nl\nl\no\n", "hello.txt", "text/plain" },
+  { "file2", "{\n  \"world\", true\n}\n", "world.json", "application/json" },
+  { "file3", "", "", "application/octet-stream" },
+};
+
+auto res = cli.Post("/multipart", items);
+```
+
+### PUT
+
+```c++
+res = cli.Put("/resource/foo", "text", "text/plain");
+```
+
+### DELETE
+
+```c++
+res = cli.Delete("/resource/foo");
+```
+
+### OPTIONS
+
+```c++
+res = cli.Options("*");
+res = cli.Options("/resource/foo");
+```
+
+### Timeout
+
+```c++
+cli.set_connection_timeout(0, 300000); // 300 milliseconds
+cli.set_read_timeout(5, 0); // 5 seconds
+cli.set_write_timeout(5, 0); // 5 seconds
+```
+
+### Receive content with Content receiver
+
+```cpp
+std::string body;
+auto res = cli.Get(
+  "/stream", Headers(),
+  [&](const Response &response) {
+    EXPECT_EQ(200, response.status);
+    return true; // return 'false' if you want to cancel the request.
+  },
+  [&](const char *data, size_t data_length) {
+    body.append(data, data_length);
+    return true; // return 'false' if you want to cancel the request.
+  });
+```
+
+### Send content with Content provider
+
+```cpp
+std::string body = ...;
+auto res = cli_.Post(
+  "/stream", body.size(),
+  [](size_t offset, size_t length, DataSink &sink) {
+    sink.write(body.data() + offset, length);
+    return true; // return 'false' if you want to cancel the request.
+  },
+  "text/plain");
+```
+
+### With Progress Callback
+
+```cpp
+httplib::Client client(url, port);
+
+// prints: 0 / 000 bytes => 50% complete
+std::shared_ptr<httplib::Response> res =
+  cli.Get("/", [](uint64_t len, uint64_t total) {
+    printf("%lld / %lld bytes => %d%% complete\n",
+      len, total,
+      (int)(len*100/total));
+    return true; // return 'false' if you want to cancel the request.
+  }
+);
+```
+
+![progress](https://user-images.githubusercontent.com/236374/33138910-495c4ecc-cf86-11e7-8693-2fc6d09615c4.gif)
+
+### Authentication
+
+```cpp
+// Basic Authentication
+cli.set_basic_auth("user", "pass");
+
+// Digest Authentication
+cli.set_digest_auth("user", "pass");
+```
+
+NOTE: OpenSSL is required for Digest Authentication.
+
+### Proxy server support
+
+```cpp
+cli.set_proxy("host", port);
+
+// Basic Authentication
+cli.set_proxy_basic_auth("user", "pass");
+
+// Digest Authentication
+cli.set_proxy_digest_auth("user", "pass");
+```
+
+NOTE: OpenSSL is required for Digest Authentication.
+
+### Range
+
+```cpp
+httplib::Client cli("httpbin.org");
+
+auto res = cli.Get("/range/32", {
+  httplib::make_range_header({{1, 10}}) // 'Range: bytes=1-10'
+});
+// res->status should be 206.
+// res->body should be "bcdefghijk".
+```
+
+```cpp
+httplib::make_range_header({{1, 10}, {20, -1}})      // 'Range: bytes=1-10, 20-'
+httplib::make_range_header({{100, 199}, {500, 599}}) // 'Range: bytes=100-199, 500-599'
+httplib::make_range_header({{0, 0}, {-1, 1}})        // 'Range: bytes=0-0, -1'
+```
+
+### Keep-Alive connection
+
+```cpp
+cli.set_keep_alive_max_count(2); // Default is 5
+
+std::vector<Request> requests;
+Get(requests, "/get-request1");
+Get(requests, "/get-request2");
+Post(requests, "/post-request1", "text", "text/plain");
+Post(requests, "/post-request2", "text", "text/plain");
+
+const size_t DATA_CHUNK_SIZE = 4;
+std::string data("abcdefg");
+Post(requests, "/post-request-with-content-provider",
+  data.size(),
+  [&](size_t offset, size_t length, DataSink &sink){
+    sink.write(&data[offset], std::min(length, DATA_CHUNK_SIZE));
+  },
+  "text/plain");
+
+std::vector<Response> responses;
+if (cli.send(requests, responses)) {
+  for (const auto& res: responses) {
+    ...
+  }
+}
+```
+
+### Redirect
+
+```cpp
+httplib::Client cli("yahoo.com");
+
+auto res = cli.Get("/");
+res->status; // 301
+
+cli.set_follow_location(true);
+res = cli.Get("/");
+res->status; // 200
+```
+
+### Use a specitic network interface
+
+NOTE: This feature is not available on Windows, yet.
+
+```cpp
+cli.set_interface("eth0"); // Interface name, IP address or host name
+```
+
+OpenSSL Support
+---------------
+
+SSL support is available with `CPPHTTPLIB_OPENSSL_SUPPORT`. `libssl` and `libcrypto` should be linked.
+
+NOTE: cpp-httplib supports 1.1.1 (until 2023-09-11) and 1.0.2 (2019-12-31).
+
+```c++
+#define CPPHTTPLIB_OPENSSL_SUPPORT
+
+SSLServer svr("./cert.pem", "./key.pem");
+
+SSLClient cli("localhost", 8080);
+cli.set_ca_cert_path("./ca-bundle.crt");
+cli.enable_server_certificate_verification(true);
+```
+
+Zlib Support
+------------
+
+'gzip' compression is available with `CPPHTTPLIB_ZLIB_SUPPORT`. `libz` should be linked.
+
+The server applies gzip compression to the following MIME type contents:
+
+  * all text types
+  * image/svg+xml
+  * application/javascript
+  * application/json
+  * application/xml
+  * application/xhtml+xml
+
+### Compress content on client
+
+```c++
+cli.set_compress(true);
+res = cli.Post("/resource/foo", "...", "text/plain");
+```
+
+Split httplib.h into .h and .cc
+-------------------------------
+
+```bash
+> python3 split.py
+> ls out
+httplib.h  httplib.cc
+```
+
+NOTE
+----
+
+### g++
+
+g++ 4.8 and below cannot build this library since `<regex>` in the versions are [broken](https://stackoverflow.com/questions/12530406/is-gcc-4-8-or-earlier-buggy-about-regular-expressions).
+
+### Windows
+
+Include `httplib.h` before `Windows.h` or include `Windows.h` by defining `WIN32_LEAN_AND_MEAN` beforehand.
+
+```cpp
+#include <httplib.h>
+#include <Windows.h>
+```
+
+```cpp
+#define WIN32_LEAN_AND_MEAN
+#include <Windows.h>
+#include <httplib.h>
+```
+
+Note: Cygwin on Windows is not supported.
+
+License
+-------
+
+MIT license (© 2020 Yuji Hirose)
+
+Special Thanks To
+-----------------
+
+[These folks](https://github.com/yhirose/cpp-httplib/graphs/contributors) made great contributions to polish this library to totally another level from a simple toy!

+ 14 - 0
thirdparty/cpp-httplib/appveyor.yml

@@ -0,0 +1,14 @@
+image:
+  - Visual Studio 2019
+
+platform:
+  - x64
+
+build_script:
+  - cmd: >-
+      cd test
+
+      msbuild.exe test.sln /verbosity:minimal /t:Build /p:Configuration=Release;Platform=%PLATFORM%
+
+test_script:
+  - cmd: x64\Release\test.exe

+ 42 - 0
thirdparty/cpp-httplib/example/Makefile

@@ -0,0 +1,42 @@
+
+#CXX = clang++
+CXXFLAGS = -std=c++14 -I.. -Wall -Wextra -pthread
+OPENSSL_DIR = /usr/local/opt/openssl
+OPENSSL_SUPPORT = -DCPPHTTPLIB_OPENSSL_SUPPORT -I$(OPENSSL_DIR)/include -L$(OPENSSL_DIR)/lib -lssl -lcrypto
+ZLIB_SUPPORT = -DCPPHTTPLIB_ZLIB_SUPPORT -lz
+
+all: server client hello simplecli simplesvr upload redirect sse benchmark
+
+server : server.cc ../httplib.h Makefile
+	$(CXX) -o server $(CXXFLAGS) server.cc $(OPENSSL_SUPPORT) $(ZLIB_SUPPORT)
+
+client : client.cc ../httplib.h Makefile
+	$(CXX) -o client $(CXXFLAGS) client.cc $(OPENSSL_SUPPORT) $(ZLIB_SUPPORT)
+
+hello : hello.cc ../httplib.h Makefile
+	$(CXX) -o hello $(CXXFLAGS) hello.cc $(OPENSSL_SUPPORT) $(ZLIB_SUPPORT)
+
+simplecli : simplecli.cc ../httplib.h Makefile
+	$(CXX) -o simplecli $(CXXFLAGS) simplecli.cc $(OPENSSL_SUPPORT) $(ZLIB_SUPPORT)
+
+simplesvr : simplesvr.cc ../httplib.h Makefile
+	$(CXX) -o simplesvr $(CXXFLAGS) simplesvr.cc $(OPENSSL_SUPPORT) $(ZLIB_SUPPORT)
+
+upload : upload.cc ../httplib.h Makefile
+	$(CXX) -o upload $(CXXFLAGS) upload.cc $(OPENSSL_SUPPORT) $(ZLIB_SUPPORT)
+
+redirect : redirect.cc ../httplib.h Makefile
+	$(CXX) -o redirect $(CXXFLAGS) redirect.cc $(OPENSSL_SUPPORT) $(ZLIB_SUPPORT)
+
+sse : sse.cc ../httplib.h Makefile
+	$(CXX) -o sse $(CXXFLAGS) sse.cc $(OPENSSL_SUPPORT) $(ZLIB_SUPPORT)
+
+benchmark : benchmark.cc ../httplib.h Makefile
+	$(CXX) -o benchmark $(CXXFLAGS) benchmark.cc $(OPENSSL_SUPPORT) $(ZLIB_SUPPORT)
+
+pem:
+	openssl genrsa 2048 > key.pem
+	openssl req -new -key key.pem | openssl x509 -days 3650 -req -signkey key.pem > cert.pem
+
+clean:
+	rm server client hello simplecli simplesvr upload redirect sse benchmark *.pem

+ 33 - 0
thirdparty/cpp-httplib/example/benchmark.cc

@@ -0,0 +1,33 @@
+#include <chrono>
+#include <httplib.h>
+#include <iostream>
+
+using namespace std;
+
+struct StopWatch {
+  StopWatch(const string &label) : label_(label) {
+    start_ = chrono::system_clock::now();
+  }
+  ~StopWatch() {
+    auto end = chrono::system_clock::now();
+    auto diff = end - start_;
+    auto count = chrono::duration_cast<chrono::milliseconds>(diff).count();
+    cout << label_ << ": " << count << " millisec." << endl;
+  }
+  string label_;
+  chrono::system_clock::time_point start_;
+};
+
+int main(void) {
+  string body(1024 * 5, 'a');
+
+  httplib::Client cli("httpbin.org", 80);
+
+  for (int i = 0; i < 3; i++) {
+    StopWatch sw(to_string(i).c_str());
+    auto res = cli.Post("/post", body, "application/octet-stream");
+    assert(res->status == 200);
+  }
+
+  return 0;
+}

Різницю між файлами не показано, бо вона завелика
+ 3401 - 0
thirdparty/cpp-httplib/example/ca-bundle.crt


+ 41 - 0
thirdparty/cpp-httplib/example/client.cc

@@ -0,0 +1,41 @@
+//
+//  client.cc
+//
+//  Copyright (c) 2019 Yuji Hirose. All rights reserved.
+//  MIT License
+//
+
+#include <httplib.h>
+#include <iostream>
+
+#define CA_CERT_FILE "./ca-bundle.crt"
+
+using namespace std;
+
+int main(void) {
+#ifdef CPPHTTPLIB_OPENSSL_SUPPORT
+  httplib::SSLClient cli("localhost", 8080);
+  // httplib::SSLClient cli("google.com");
+  // httplib::SSLClient cli("www.youtube.com");
+  cli.set_ca_cert_path(CA_CERT_FILE);
+  cli.enable_server_certificate_verification(true);
+#else
+  httplib::Client cli("localhost", 8080);
+#endif
+
+  auto res = cli.Get("/hi");
+  if (res) {
+    cout << res->status << endl;
+    cout << res->get_header_value("Content-Type") << endl;
+    cout << res->body << endl;
+  } else {
+#ifdef CPPHTTPLIB_OPENSSL_SUPPORT
+    auto result = cli.get_openssl_verify_result();
+    if (result) {
+      cout << "verify error: " << X509_verify_cert_error_string(result) << endl;
+    }
+#endif
+  }
+
+  return 0;
+}

+ 160 - 0
thirdparty/cpp-httplib/example/client.vcxproj

@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{6DB1FC63-B153-4279-92B7-D8A11AF285D6}</ProjectGuid>
+    <Keyword>Win32Proj</Keyword>
+    <RootNamespace>client</RootNamespace>
+    <WindowsTargetPlatformVersion>10.0.15063.0</WindowsTargetPlatformVersion>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <CharacterSet>Unicode</CharacterSet>
+    <PlatformToolset>v141</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <CharacterSet>Unicode</CharacterSet>
+    <PlatformToolset>v141</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <CharacterSet>Unicode</CharacterSet>
+    <PlatformToolset>v141</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <CharacterSet>Unicode</CharacterSet>
+    <PlatformToolset>v141</PlatformToolset>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <LinkIncremental>true</LinkIncremental>
+    <IntDir>$(Configuration)\$(ProjectName)_obj\</IntDir>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <LinkIncremental>true</LinkIncremental>
+    <IntDir>$(Platform)\$(Configuration)\$(ProjectName)_obj\</IntDir>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <LinkIncremental>false</LinkIncremental>
+    <IntDir>$(Configuration)\$(ProjectName)_obj\</IntDir>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <LinkIncremental>false</LinkIncremental>
+    <IntDir>$(Platform)\$(Configuration)\$(ProjectName)_obj\</IntDir>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <Optimization>Disabled</Optimization>
+      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>..</AdditionalIncludeDirectories>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <AdditionalDependencies>Ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <ClCompile>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <Optimization>Disabled</Optimization>
+      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>..</AdditionalIncludeDirectories>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <AdditionalDependencies>Ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <WarningLevel>Level3</WarningLevel>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <Optimization>MaxSpeed</Optimization>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>..</AdditionalIncludeDirectories>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <OptimizeReferences>true</OptimizeReferences>
+      <AdditionalDependencies>Ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <ClCompile>
+      <WarningLevel>Level3</WarningLevel>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <Optimization>MaxSpeed</Optimization>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>..</AdditionalIncludeDirectories>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <OptimizeReferences>true</OptimizeReferences>
+      <AdditionalDependencies>Ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="client.cc" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>

+ 46 - 0
thirdparty/cpp-httplib/example/example.sln

@@ -0,0 +1,46 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+VisualStudioVersion = 15.0.27703.2047
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "server", "server.vcxproj", "{864CD288-050A-4C8B-9BEF-3048BD876C5B}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "client", "client.vcxproj", "{6DB1FC63-B153-4279-92B7-D8A11AF285D6}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{280E605F-0CB8-4336-8D9F-CE50A9472AE2}"
+	ProjectSection(SolutionItems) = preProject
+		..\README.md = ..\README.md
+	EndProjectSection
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Win32 = Debug|Win32
+		Debug|x64 = Debug|x64
+		Release|Win32 = Release|Win32
+		Release|x64 = Release|x64
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{864CD288-050A-4C8B-9BEF-3048BD876C5B}.Debug|Win32.ActiveCfg = Debug|Win32
+		{864CD288-050A-4C8B-9BEF-3048BD876C5B}.Debug|Win32.Build.0 = Debug|Win32
+		{864CD288-050A-4C8B-9BEF-3048BD876C5B}.Debug|x64.ActiveCfg = Debug|x64
+		{864CD288-050A-4C8B-9BEF-3048BD876C5B}.Debug|x64.Build.0 = Debug|x64
+		{864CD288-050A-4C8B-9BEF-3048BD876C5B}.Release|Win32.ActiveCfg = Release|Win32
+		{864CD288-050A-4C8B-9BEF-3048BD876C5B}.Release|Win32.Build.0 = Release|Win32
+		{864CD288-050A-4C8B-9BEF-3048BD876C5B}.Release|x64.ActiveCfg = Release|x64
+		{864CD288-050A-4C8B-9BEF-3048BD876C5B}.Release|x64.Build.0 = Release|x64
+		{6DB1FC63-B153-4279-92B7-D8A11AF285D6}.Debug|Win32.ActiveCfg = Debug|Win32
+		{6DB1FC63-B153-4279-92B7-D8A11AF285D6}.Debug|Win32.Build.0 = Debug|Win32
+		{6DB1FC63-B153-4279-92B7-D8A11AF285D6}.Debug|x64.ActiveCfg = Debug|x64
+		{6DB1FC63-B153-4279-92B7-D8A11AF285D6}.Debug|x64.Build.0 = Debug|x64
+		{6DB1FC63-B153-4279-92B7-D8A11AF285D6}.Release|Win32.ActiveCfg = Release|Win32
+		{6DB1FC63-B153-4279-92B7-D8A11AF285D6}.Release|Win32.Build.0 = Release|Win32
+		{6DB1FC63-B153-4279-92B7-D8A11AF285D6}.Release|x64.ActiveCfg = Release|x64
+		{6DB1FC63-B153-4279-92B7-D8A11AF285D6}.Release|x64.Build.0 = Release|x64
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+		SolutionGuid = {7097C9E4-07F8-48C6-A888-BBA9EBB5D17D}
+	EndGlobalSection
+EndGlobal

+ 19 - 0
thirdparty/cpp-httplib/example/hello.cc

@@ -0,0 +1,19 @@
+//
+//  hello.cc
+//
+//  Copyright (c) 2019 Yuji Hirose. All rights reserved.
+//  MIT License
+//
+
+#include <httplib.h>
+using namespace httplib;
+
+int main(void) {
+  Server svr;
+
+  svr.Get("/hi", [](const Request & /*req*/, Response &res) {
+    res.set_content("Hello World!", "text/plain");
+  });
+
+  svr.listen("localhost", 8080);
+}

+ 60 - 0
thirdparty/cpp-httplib/example/redirect.cc

@@ -0,0 +1,60 @@
+//
+//  redirect.cc
+//
+//  Copyright (c) 2019 Yuji Hirose. All rights reserved.
+//  MIT License
+//
+
+#include <httplib.h>
+
+#define SERVER_CERT_FILE "./cert.pem"
+#define SERVER_PRIVATE_KEY_FILE "./key.pem"
+
+using namespace httplib;
+
+int main(void) {
+  // HTTP server
+  Server http;
+#ifdef CPPHTTPLIB_OPENSSL_SUPPORT
+  SSLServer https(SERVER_CERT_FILE, SERVER_PRIVATE_KEY_FILE);
+#endif
+
+  http.Get("/test", [](const Request & /*req*/, Response &res) {
+    res.set_content("Test\n", "text/plain");
+  });
+
+  http.set_error_handler([](const Request & /*req*/, Response &res) {
+    res.set_redirect("https://localhost:8081/");
+  });
+
+  // HTTPS server
+#ifdef CPPHTTPLIB_OPENSSL_SUPPORT
+  https.Get("/", [=](const Request & /*req*/, Response &res) {
+    res.set_redirect("/hi");
+  });
+
+  https.Get("/hi", [](const Request & /*req*/, Response &res) {
+    res.set_content("Hello World!\n", "text/plain");
+  });
+
+  https.Get("/stop", [&](const Request & /*req*/, Response & /*res*/) {
+    https.stop();
+    http.stop();
+  });
+#endif
+
+  // Run servers
+  auto httpThread = std::thread([&]() { http.listen("localhost", 8080); });
+
+#ifdef CPPHTTPLIB_OPENSSL_SUPPORT
+  auto httpsThread = std::thread([&]() { https.listen("localhost", 8081); });
+#endif
+
+  httpThread.join();
+
+#ifdef CPPHTTPLIB_OPENSSL_SUPPORT
+  httpsThread.join();
+#endif
+
+  return 0;
+}

+ 113 - 0
thirdparty/cpp-httplib/example/server.cc

@@ -0,0 +1,113 @@
+//
+//  sample.cc
+//
+//  Copyright (c) 2019 Yuji Hirose. All rights reserved.
+//  MIT License
+//
+
+#include <chrono>
+#include <cstdio>
+#include <httplib.h>
+
+#define SERVER_CERT_FILE "./cert.pem"
+#define SERVER_PRIVATE_KEY_FILE "./key.pem"
+
+using namespace httplib;
+
+std::string dump_headers(const Headers &headers) {
+  std::string s;
+  char buf[BUFSIZ];
+
+  for (auto it = headers.begin(); it != headers.end(); ++it) {
+    const auto &x = *it;
+    snprintf(buf, sizeof(buf), "%s: %s\n", x.first.c_str(), x.second.c_str());
+    s += buf;
+  }
+
+  return s;
+}
+
+std::string log(const Request &req, const Response &res) {
+  std::string s;
+  char buf[BUFSIZ];
+
+  s += "================================\n";
+
+  snprintf(buf, sizeof(buf), "%s %s %s", req.method.c_str(),
+           req.version.c_str(), req.path.c_str());
+  s += buf;
+
+  std::string query;
+  for (auto it = req.params.begin(); it != req.params.end(); ++it) {
+    const auto &x = *it;
+    snprintf(buf, sizeof(buf), "%c%s=%s",
+             (it == req.params.begin()) ? '?' : '&', x.first.c_str(),
+             x.second.c_str());
+    query += buf;
+  }
+  snprintf(buf, sizeof(buf), "%s\n", query.c_str());
+  s += buf;
+
+  s += dump_headers(req.headers);
+
+  s += "--------------------------------\n";
+
+  snprintf(buf, sizeof(buf), "%d %s\n", res.status, res.version.c_str());
+  s += buf;
+  s += dump_headers(res.headers);
+  s += "\n";
+
+  if (!res.body.empty()) { s += res.body; }
+
+  s += "\n";
+
+  return s;
+}
+
+int main(void) {
+#ifdef CPPHTTPLIB_OPENSSL_SUPPORT
+  SSLServer svr(SERVER_CERT_FILE, SERVER_PRIVATE_KEY_FILE);
+#else
+  Server svr;
+#endif
+
+  if (!svr.is_valid()) {
+    printf("server has an error...\n");
+    return -1;
+  }
+
+  svr.Get("/", [=](const Request & /*req*/, Response &res) {
+    res.set_redirect("/hi");
+  });
+
+  svr.Get("/hi", [](const Request & /*req*/, Response &res) {
+    res.set_content("Hello World!\n", "text/plain");
+  });
+
+  svr.Get("/slow", [](const Request & /*req*/, Response &res) {
+    std::this_thread::sleep_for(std::chrono::seconds(2));
+    res.set_content("Slow...\n", "text/plain");
+  });
+
+  svr.Get("/dump", [](const Request &req, Response &res) {
+    res.set_content(dump_headers(req.headers), "text/plain");
+  });
+
+  svr.Get("/stop",
+          [&](const Request & /*req*/, Response & /*res*/) { svr.stop(); });
+
+  svr.set_error_handler([](const Request & /*req*/, Response &res) {
+    const char *fmt = "<p>Error Status: <span style='color:red;'>%d</span></p>";
+    char buf[BUFSIZ];
+    snprintf(buf, sizeof(buf), fmt, res.status);
+    res.set_content(buf, "text/html");
+  });
+
+  svr.set_logger([](const Request &req, const Response &res) {
+    printf("%s", log(req, res).c_str());
+  });
+
+  svr.listen("localhost", 8080);
+
+  return 0;
+}

+ 160 - 0
thirdparty/cpp-httplib/example/server.vcxproj

@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{864CD288-050A-4C8B-9BEF-3048BD876C5B}</ProjectGuid>
+    <Keyword>Win32Proj</Keyword>
+    <RootNamespace>sample</RootNamespace>
+    <WindowsTargetPlatformVersion>10.0.15063.0</WindowsTargetPlatformVersion>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <CharacterSet>Unicode</CharacterSet>
+    <PlatformToolset>v141</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <CharacterSet>Unicode</CharacterSet>
+    <PlatformToolset>v141</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <CharacterSet>Unicode</CharacterSet>
+    <PlatformToolset>v141</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <CharacterSet>Unicode</CharacterSet>
+    <PlatformToolset>v141</PlatformToolset>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <LinkIncremental>true</LinkIncremental>
+    <IntDir>$(Configuration)\$(ProjectName)_obj\</IntDir>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <LinkIncremental>true</LinkIncremental>
+    <IntDir>$(Platform)\$(Configuration)\$(ProjectName)_obj\</IntDir>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <LinkIncremental>false</LinkIncremental>
+    <IntDir>$(Configuration)\$(ProjectName)_obj\</IntDir>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <LinkIncremental>false</LinkIncremental>
+    <IntDir>$(Platform)\$(Configuration)\$(ProjectName)_obj\</IntDir>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <Optimization>Disabled</Optimization>
+      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>..</AdditionalIncludeDirectories>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <AdditionalDependencies>Ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <ClCompile>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <Optimization>Disabled</Optimization>
+      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>..</AdditionalIncludeDirectories>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <AdditionalDependencies>Ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <WarningLevel>Level3</WarningLevel>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <Optimization>MaxSpeed</Optimization>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>..</AdditionalIncludeDirectories>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <OptimizeReferences>true</OptimizeReferences>
+      <AdditionalDependencies>Ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <ClCompile>
+      <WarningLevel>Level3</WarningLevel>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <Optimization>MaxSpeed</Optimization>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>..</AdditionalIncludeDirectories>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <OptimizeReferences>true</OptimizeReferences>
+      <AdditionalDependencies>Ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="server.cc" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>

+ 32 - 0
thirdparty/cpp-httplib/example/simplecli.cc

@@ -0,0 +1,32 @@
+//
+//  simplecli.cc
+//
+//  Copyright (c) 2019 Yuji Hirose. All rights reserved.
+//  MIT License
+//
+
+#include <httplib.h>
+#include <iostream>
+
+#define CA_CERT_FILE "./ca-bundle.crt"
+
+using namespace std;
+
+int main(void) {
+#ifdef CPPHTTPLIB_OPENSSL_SUPPORT
+  auto res = httplib::Client2("https://localhost:8080")
+    .set_ca_cert_path(CA_CERT_FILE)
+    // .enable_server_certificate_verification(true)
+    .Get("/hi");
+#else
+  auto res = httplib::Client2("http://localhost:8080").Get("/hi");
+#endif
+
+  if (res) {
+    cout << res->status << endl;
+    cout << res->get_header_value("Content-Type") << endl;
+    cout << res->body << endl;
+  }
+
+  return 0;
+}

+ 135 - 0
thirdparty/cpp-httplib/example/simplesvr.cc

@@ -0,0 +1,135 @@
+//
+//  simplesvr.cc
+//
+//  Copyright (c) 2019 Yuji Hirose. All rights reserved.
+//  MIT License
+//
+
+#include <cstdio>
+#include <httplib.h>
+#include <iostream>
+
+#define SERVER_CERT_FILE "./cert.pem"
+#define SERVER_PRIVATE_KEY_FILE "./key.pem"
+
+using namespace httplib;
+using namespace std;
+
+string dump_headers(const Headers &headers) {
+  string s;
+  char buf[BUFSIZ];
+
+  for (const auto &x : headers) {
+    snprintf(buf, sizeof(buf), "%s: %s\n", x.first.c_str(), x.second.c_str());
+    s += buf;
+  }
+
+  return s;
+}
+
+string dump_multipart_files(const MultipartFormDataMap &files) {
+  string s;
+  char buf[BUFSIZ];
+
+  s += "--------------------------------\n";
+
+  for (const auto &x : files) {
+    const auto &name = x.first;
+    const auto &file = x.second;
+
+    snprintf(buf, sizeof(buf), "name: %s\n", name.c_str());
+    s += buf;
+
+    snprintf(buf, sizeof(buf), "filename: %s\n", file.filename.c_str());
+    s += buf;
+
+    snprintf(buf, sizeof(buf), "content type: %s\n", file.content_type.c_str());
+    s += buf;
+
+    snprintf(buf, sizeof(buf), "text length: %lu\n", file.content.size());
+    s += buf;
+
+    s += "----------------\n";
+  }
+
+  return s;
+}
+
+string log(const Request &req, const Response &res) {
+  string s;
+  char buf[BUFSIZ];
+
+  s += "================================\n";
+
+  snprintf(buf, sizeof(buf), "%s %s %s", req.method.c_str(),
+           req.version.c_str(), req.path.c_str());
+  s += buf;
+
+  string query;
+  for (auto it = req.params.begin(); it != req.params.end(); ++it) {
+    const auto &x = *it;
+    snprintf(buf, sizeof(buf), "%c%s=%s",
+             (it == req.params.begin()) ? '?' : '&', x.first.c_str(),
+             x.second.c_str());
+    query += buf;
+  }
+  snprintf(buf, sizeof(buf), "%s\n", query.c_str());
+  s += buf;
+
+  s += dump_headers(req.headers);
+  s += dump_multipart_files(req.files);
+
+  s += "--------------------------------\n";
+
+  snprintf(buf, sizeof(buf), "%d\n", res.status);
+  s += buf;
+  s += dump_headers(res.headers);
+
+  return s;
+}
+
+int main(int argc, const char **argv) {
+  if (argc > 1 && string("--help") == argv[1]) {
+    cout << "usage: simplesvr [PORT] [DIR]" << endl;
+    return 1;
+  }
+
+#ifdef CPPHTTPLIB_OPENSSL_SUPPORT
+  SSLServer svr(SERVER_CERT_FILE, SERVER_PRIVATE_KEY_FILE);
+#else
+  Server svr;
+#endif
+
+  svr.Post("/multipart", [](const Request &req, Response &res) {
+    auto body = dump_headers(req.headers) + dump_multipart_files(req.files);
+
+    res.set_content(body, "text/plain");
+  });
+
+  svr.set_error_handler([](const Request & /*req*/, Response &res) {
+    const char *fmt = "<p>Error Status: <span style='color:red;'>%d</span></p>";
+    char buf[BUFSIZ];
+    snprintf(buf, sizeof(buf), fmt, res.status);
+    res.set_content(buf, "text/html");
+  });
+
+  svr.set_logger(
+      [](const Request &req, const Response &res) { cout << log(req, res); });
+
+  auto port = 8080;
+  if (argc > 1) { port = atoi(argv[1]); }
+
+  auto base_dir = "./";
+  if (argc > 2) { base_dir = argv[2]; }
+
+  if (!svr.set_mount_point("/", base_dir)) {
+    cout << "The specified base directory doesn't exist...";
+    return 1;
+  }
+
+  cout << "The server started at port " << port << "..." << endl;
+
+  svr.listen("localhost", port);
+
+  return 0;
+}

+ 111 - 0
thirdparty/cpp-httplib/example/sse.cc

@@ -0,0 +1,111 @@
+//
+//  sse.cc
+//
+//  Copyright (c) 2020 Yuji Hirose. All rights reserved.
+//  MIT License
+//
+
+#include <atomic>
+#include <chrono>
+#include <condition_variable>
+#include <httplib.h>
+#include <iostream>
+#include <mutex>
+#include <sstream>
+#include <thread>
+
+using namespace httplib;
+using namespace std;
+
+class EventDispatcher {
+public:
+  EventDispatcher() {
+    id_ = 0;
+    cid_ = -1;
+  }
+
+  void wait_event(DataSink *sink) {
+    unique_lock<mutex> lk(m_);
+    int id = id_;
+    cv_.wait(lk, [&] { return cid_ == id; });
+    if (sink->is_writable()) { sink->write(message_.data(), message_.size()); }
+  }
+
+  void send_event(const string &message) {
+    lock_guard<mutex> lk(m_);
+    cid_ = id_++;
+    message_ = message;
+    cv_.notify_all();
+  }
+
+private:
+  mutex m_;
+  condition_variable cv_;
+  atomic_int id_;
+  atomic_int cid_;
+  string message_;
+};
+
+const auto html = R"(
+<!DOCTYPE html>
+<html lang="en">
+<head>
+<meta charset="UTF-8">
+<title>SSE demo</title>
+</head>
+<body>
+<script>
+const ev1 = new EventSource("event1");
+ev1.onmessage = function(e) {
+  console.log('ev1', e.data);
+}
+const ev2 = new EventSource("event2");
+ev2.onmessage = function(e) {
+  console.log('ev2', e.data);
+}
+</script>
+</body>
+</html>
+)";
+
+int main(void) {
+  EventDispatcher ed;
+
+  Server svr;
+
+  svr.Get("/", [&](const Request & /*req*/, Response &res) {
+    res.set_content(html, "text/html");
+  });
+
+  svr.Get("/event1", [&](const Request & /*req*/, Response &res) {
+    cout << "connected to event1..." << endl;
+    res.set_header("Content-Type", "text/event-stream");
+    res.set_chunked_content_provider([&](size_t /*offset*/, DataSink &sink) {
+      ed.wait_event(&sink);
+      return true;
+    });
+  });
+
+  svr.Get("/event2", [&](const Request & /*req*/, Response &res) {
+    cout << "connected to event2..." << endl;
+    res.set_header("Content-Type", "text/event-stream");
+    res.set_chunked_content_provider([&](size_t /*offset*/, DataSink &sink) {
+      ed.wait_event(&sink);
+      return true;
+    });
+  });
+
+  thread t([&] {
+    int id = 0;
+    while (true) {
+      this_thread::sleep_for(chrono::seconds(1));
+      cout << "send event: " << id << std::endl;
+      std::stringstream ss;
+      ss << "data: " << id << "\n\n";
+      ed.send_event(ss.str());
+      id++;
+    }
+  });
+
+  svr.listen("localhost", 1234);
+}

+ 61 - 0
thirdparty/cpp-httplib/example/upload.cc

@@ -0,0 +1,61 @@
+//
+//  upload.cc
+//
+//  Copyright (c) 2019 Yuji Hirose. All rights reserved.
+//  MIT License
+//
+
+#include <fstream>
+#include <httplib.h>
+#include <iostream>
+using namespace httplib;
+using namespace std;
+
+const char *html = R"(
+<form id="formElem">
+  <input type="file" name="image_file" accept="image/*">
+  <input type="file" name="text_file" accept="text/*">
+  <input type="submit">
+</form>
+<script>
+  formElem.onsubmit = async (e) => {
+    e.preventDefault();
+    let res = await fetch('/post', {
+      method: 'POST',
+      body: new FormData(formElem)
+    });
+    console.log(await res.text());
+  };
+</script>
+)";
+
+int main(void) {
+  Server svr;
+
+  svr.Get("/", [](const Request & /*req*/, Response &res) {
+    res.set_content(html, "text/html");
+  });
+
+  svr.Post("/post", [](const Request &req, Response &res) {
+    auto image_file = req.get_file_value("image_file");
+    auto text_file = req.get_file_value("text_file");
+
+    cout << "image file length: " << image_file.content.length() << endl
+         << "image file name: " << image_file.filename << endl
+         << "text file length: " << text_file.content.length() << endl
+         << "text file name: " << text_file.filename << endl;
+
+    {
+      ofstream ofs(image_file.filename, ios::binary);
+      ofs << image_file.content;
+    }
+    {
+      ofstream ofs(text_file.filename);
+      ofs << text_file.content;
+    }
+
+    res.set_content("done", "text/plain");
+  });
+
+  svr.listen("localhost", 1234);
+}

Різницю між файлами не показано, бо вона завелика
+ 5580 - 0
thirdparty/cpp-httplib/httplib.h


+ 33 - 0
thirdparty/cpp-httplib/httplibConfig.cmake.in

@@ -0,0 +1,33 @@
+# Generates a macro to auto-configure everything
+@PACKAGE_INIT@
+
+# Setting these here so they're accessible after install.
+# Might be useful for some users to check which settings were used.
+set(HTTPLIB_IS_USING_OPENSSL @HTTPLIB_IS_USING_OPENSSL@)
+set(HTTPLIB_IS_USING_ZLIB @HTTPLIB_IS_USING_ZLIB@)
+set(HTTPLIB_IS_COMPILED @HTTPLIB_COMPILE@)
+
+include(CMakeFindDependencyMacro)
+
+# We add find_dependency calls here to not make the end-user have to call them.
+find_dependency(Threads REQUIRED)
+if(@HTTPLIB_IS_USING_OPENSSL@)
+	# OpenSSL COMPONENTS were added in Cmake v3.11
+	if(CMAKE_VERSION VERSION_LESS "3.11")
+		find_dependency(OpenSSL @_HTTPLIB_OPENSSL_MIN_VER@ REQUIRED)
+	else()
+		# Once the COMPONENTS were added, they were made optional when not specified.
+		# Since we use both, we need to search for both.
+		find_dependency(OpenSSL @_HTTPLIB_OPENSSL_MIN_VER@ COMPONENTS Crypto SSL REQUIRED)
+	endif()
+endif()
+if(@HTTPLIB_IS_USING_ZLIB@)
+	find_dependency(ZLIB REQUIRED)
+endif()
+
+# Lets the end-user find the header path if needed
+# This is helpful if you're using Cmake's pre-compiled header feature
+set_and_check(HTTPLIB_HEADER_PATH "@PACKAGE_CMAKE_INSTALL_FULL_INCLUDEDIR@/httplib.h")
+
+# Brings in the target library
+include("${CMAKE_CURRENT_LIST_DIR}/httplibTargets.cmake")

+ 32 - 0
thirdparty/cpp-httplib/split.py

@@ -0,0 +1,32 @@
+import os
+import sys
+
+border = '// ----------------------------------------------------------------------------'
+
+PythonVersion = sys.version_info[0];
+
+with open('httplib.h') as f:
+    lines = f.readlines()
+    inImplementation = False
+    
+    if PythonVersion < 3:
+        os.makedirs('out')
+    else:
+        os.makedirs('out', exist_ok=True)
+        
+    with open('out/httplib.h', 'w') as fh:
+        with open('out/httplib.cc', 'w') as fc:
+            fc.write('#include "httplib.h"\n')
+            fc.write('namespace httplib {\n')
+            for line in lines:
+                isBorderLine = border in line
+                if isBorderLine:
+                    inImplementation = not inImplementation
+                else:
+                    if inImplementation:
+                        fc.write(line.replace('inline ', ''))
+                        pass
+                    else:
+                        fh.write(line)
+                        pass
+            fc.write('} // namespace httplib\n')

+ 30 - 0
thirdparty/cpp-httplib/test/Makefile

@@ -0,0 +1,30 @@
+
+#CXX = clang++
+CXXFLAGS = -ggdb -O0 -std=c++11 -DGTEST_USE_OWN_TR1_TUPLE -I.. -I. -Wall -Wextra -Wtype-limits -Wconversion
+OPENSSL_DIR = /usr/local/opt/openssl
+OPENSSL_SUPPORT = -DCPPHTTPLIB_OPENSSL_SUPPORT -I$(OPENSSL_DIR)/include -L$(OPENSSL_DIR)/lib -lssl -lcrypto
+ZLIB_SUPPORT = -DCPPHTTPLIB_ZLIB_SUPPORT -lz
+
+all : test
+	./test
+
+proxy : test_proxy
+	./test_proxy
+
+test : test.cc ../httplib.h Makefile cert.pem
+	$(CXX) -o test $(CXXFLAGS) test.cc gtest/gtest-all.cc gtest/gtest_main.cc $(OPENSSL_SUPPORT) $(ZLIB_SUPPORT) -pthread
+
+test_proxy : test_proxy.cc ../httplib.h Makefile cert.pem
+	$(CXX) -o test_proxy $(CXXFLAGS) test_proxy.cc gtest/gtest-all.cc gtest/gtest_main.cc $(OPENSSL_SUPPORT) $(ZLIB_SUPPORT) -pthread
+
+cert.pem:
+	openssl genrsa 2048 > key.pem
+	openssl req -new -batch -config test.conf -key key.pem | openssl x509 -days 3650 -req -signkey key.pem > cert.pem
+	openssl genrsa 2048 > rootCA.key.pem
+	openssl req -x509 -new -batch -config test.rootCA.conf -key rootCA.key.pem -days 1024 > rootCA.cert.pem
+	openssl genrsa 2048 > client.key.pem
+	openssl req -new -batch -config test.conf -key client.key.pem | openssl x509 -days 370 -req -CA rootCA.cert.pem -CAkey rootCA.key.pem -CAcreateserial > client.cert.pem
+	#c_rehash .
+
+clean:
+	rm -f test test_proxy pem *.0 *.1 *.srl

Різницю між файлами не показано, бо вона завелика
+ 3401 - 0
thirdparty/cpp-httplib/test/ca-bundle.crt


Різницю між файлами не показано, бо вона завелика
+ 9131 - 0
thirdparty/cpp-httplib/test/gtest/gtest-all.cc


Різницю між файлами не показано, бо вона завелика
+ 19570 - 0
thirdparty/cpp-httplib/test/gtest/gtest.h


+ 39 - 0
thirdparty/cpp-httplib/test/gtest/gtest_main.cc

@@ -0,0 +1,39 @@
+// Copyright 2006, Google Inc.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+//     * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+//     * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#include <iostream>
+
+#include "gtest/gtest.h"
+
+GTEST_API_ int main(int argc, char **argv) {
+  std::cout << "Running main() from gtest_main.cc\n";
+
+  testing::InitGoogleTest(&argc, argv);
+  return RUN_ALL_TESTS();
+}

BIN
thirdparty/cpp-httplib/test/image.jpg


+ 13 - 0
thirdparty/cpp-httplib/test/proxy/Dockerfile

@@ -0,0 +1,13 @@
+FROM centos:7
+
+ARG auth="basic"
+ARG port="3128"
+
+RUN yum install -y squid
+
+COPY ./${auth}_squid.conf /etc/squid/squid.conf
+COPY ./${auth}_passwd /etc/squid/passwd
+
+EXPOSE ${port}
+
+CMD ["/usr/sbin/squid", "-N"]

+ 1 - 0
thirdparty/cpp-httplib/test/proxy/basic_passwd

@@ -0,0 +1 @@
+hello:$apr1$O6S28OBL$8dr3ixl4Mohf97hgsYvLy/

+ 81 - 0
thirdparty/cpp-httplib/test/proxy/basic_squid.conf

@@ -0,0 +1,81 @@
+#
+# Recommended minimum configuration:
+#
+
+# Example rule allowing access from your local networks.
+# Adapt to list your (internal) IP networks from where browsing
+# should be allowed
+acl localnet src 0.0.0.1-0.255.255.255	# RFC 1122 "this" network (LAN)
+acl localnet src 10.0.0.0/8		# RFC 1918 local private network (LAN)
+acl localnet src 100.64.0.0/10		# RFC 6598 shared address space (CGN)
+acl localnet src 169.254.0.0/16 	# RFC 3927 link-local (directly plugged) machines
+acl localnet src 172.16.0.0/12		# RFC 1918 local private network (LAN)
+acl localnet src 192.168.0.0/16		# RFC 1918 local private network (LAN)
+acl localnet src fc00::/7       	# RFC 4193 local private network range
+acl localnet src fe80::/10      	# RFC 4291 link-local (directly plugged) machines
+
+acl SSL_ports port 443
+acl Safe_ports port 80		# http
+acl Safe_ports port 21		# ftp
+acl Safe_ports port 443		# https
+acl Safe_ports port 70		# gopher
+acl Safe_ports port 210		# wais
+acl Safe_ports port 1025-65535	# unregistered ports
+acl Safe_ports port 280		# http-mgmt
+acl Safe_ports port 488		# gss-http
+acl Safe_ports port 591		# filemaker
+acl Safe_ports port 777		# multiling http
+acl CONNECT method CONNECT
+
+auth_param basic program /usr/lib64/squid/basic_ncsa_auth /etc/squid/passwd
+auth_param basic realm proxy
+acl authenticated proxy_auth REQUIRED
+http_access allow authenticated
+
+#
+# Recommended minimum Access Permission configuration:
+#
+# Deny requests to certain unsafe ports
+http_access deny !Safe_ports
+
+# Deny CONNECT to other than secure SSL ports
+http_access deny CONNECT !SSL_ports
+
+# Only allow cachemgr access from localhost
+http_access allow localhost manager
+http_access deny manager
+
+# We strongly recommend the following be uncommented to protect innocent
+# web applications running on the proxy server who think the only
+# one who can access services on "localhost" is a local user
+#http_access deny to_localhost
+
+#
+# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
+#
+
+# Example rule allowing access from your local networks.
+# Adapt localnet in the ACL section to list your (internal) IP networks
+# from where browsing should be allowed
+http_access allow localnet
+http_access allow localhost
+
+# And finally deny all other access to this proxy
+http_access deny all
+
+# Squid normally listens to port 3128
+http_port 3128
+
+# Uncomment and adjust the following to add a disk cache directory.
+#cache_dir ufs /var/spool/squid 100 16 256
+
+# Leave coredumps in the first cache dir
+coredump_dir /var/spool/squid
+
+#
+# Add any of your own refresh_pattern entries above these.
+#
+refresh_pattern ^ftp:		1440	20%	10080
+refresh_pattern ^gopher:	1440	0%	1440
+refresh_pattern -i (/cgi-bin/|\?) 0	0%	0
+refresh_pattern .		0	20%	4320

+ 1 - 0
thirdparty/cpp-httplib/test/proxy/digest_passwd

@@ -0,0 +1 @@
+hello:world

+ 81 - 0
thirdparty/cpp-httplib/test/proxy/digest_squid.conf

@@ -0,0 +1,81 @@
+#
+# Recommended minimum configuration:
+#
+
+# Example rule allowing access from your local networks.
+# Adapt to list your (internal) IP networks from where browsing
+# should be allowed
+acl localnet src 0.0.0.1-0.255.255.255	# RFC 1122 "this" network (LAN)
+acl localnet src 10.0.0.0/8		# RFC 1918 local private network (LAN)
+acl localnet src 100.64.0.0/10		# RFC 6598 shared address space (CGN)
+acl localnet src 169.254.0.0/16 	# RFC 3927 link-local (directly plugged) machines
+acl localnet src 172.16.0.0/12		# RFC 1918 local private network (LAN)
+acl localnet src 192.168.0.0/16		# RFC 1918 local private network (LAN)
+acl localnet src fc00::/7       	# RFC 4193 local private network range
+acl localnet src fe80::/10      	# RFC 4291 link-local (directly plugged) machines
+
+acl SSL_ports port 443
+acl Safe_ports port 80		# http
+acl Safe_ports port 21		# ftp
+acl Safe_ports port 443		# https
+acl Safe_ports port 70		# gopher
+acl Safe_ports port 210		# wais
+acl Safe_ports port 1025-65535	# unregistered ports
+acl Safe_ports port 280		# http-mgmt
+acl Safe_ports port 488		# gss-http
+acl Safe_ports port 591		# filemaker
+acl Safe_ports port 777		# multiling http
+acl CONNECT method CONNECT
+
+auth_param digest program /usr/lib64/squid/digest_file_auth /etc/squid/passwd
+auth_param digest realm proxy
+acl authenticated proxy_auth REQUIRED
+http_access allow authenticated
+
+#
+# Recommended minimum Access Permission configuration:
+#
+# Deny requests to certain unsafe ports
+http_access deny !Safe_ports
+
+# Deny CONNECT to other than secure SSL ports
+http_access deny CONNECT !SSL_ports
+
+# Only allow cachemgr access from localhost
+http_access allow localhost manager
+http_access deny manager
+
+# We strongly recommend the following be uncommented to protect innocent
+# web applications running on the proxy server who think the only
+# one who can access services on "localhost" is a local user
+#http_access deny to_localhost
+
+#
+# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
+#
+
+# Example rule allowing access from your local networks.
+# Adapt localnet in the ACL section to list your (internal) IP networks
+# from where browsing should be allowed
+http_access allow localnet
+http_access allow localhost
+
+# And finally deny all other access to this proxy
+http_access deny all
+
+# Squid normally listens to port 3128
+http_port 3129
+
+# Uncomment and adjust the following to add a disk cache directory.
+#cache_dir ufs /var/spool/squid 100 16 256
+
+# Leave coredumps in the first cache dir
+coredump_dir /var/spool/squid
+
+#
+# Add any of your own refresh_pattern entries above these.
+#
+refresh_pattern ^ftp:		1440	20%	10080
+refresh_pattern ^gopher:	1440	0%	1440
+refresh_pattern -i (/cgi-bin/|\?) 0	0%	0
+refresh_pattern .		0	20%	4320

+ 22 - 0
thirdparty/cpp-httplib/test/proxy/docker-compose.yml

@@ -0,0 +1,22 @@
+version: '2'
+
+services:
+  squid_basic:
+    image: squid_basic
+    restart: always
+    ports:
+      - "3128:3128"
+    build:
+      context: ./
+      args:
+        auth: basic
+
+  squid_digest:
+    image: squid_digest
+    restart: always
+    ports:
+      - "3129:3129"
+    build:
+      context: ./
+      args:
+        auth: digest

+ 1 - 0
thirdparty/cpp-httplib/test/proxy/down.sh

@@ -0,0 +1 @@
+docker-compose down --rmi all

+ 1 - 0
thirdparty/cpp-httplib/test/proxy/up.sh

@@ -0,0 +1 @@
+docker-compose up -d

Різницю між файлами не показано, бо вона завелика
+ 2953 - 0
thirdparty/cpp-httplib/test/test.cc


+ 18 - 0
thirdparty/cpp-httplib/test/test.conf

@@ -0,0 +1,18 @@
+[req]
+default_bits           = 2048
+distinguished_name     = req_distinguished_name
+attributes             = req_attributes
+prompt                 = no
+output_password        = mypass
+
+[req_distinguished_name]
+C                      = US
+ST                     = Test State or Province
+L                      = Test Locality
+O                      = Organization Name
+OU                     = Organizational Unit Name
+CN                     = Common Name
+emailAddress           = test@email.address
+
+[req_attributes]
+challengePassword              = 1234

+ 18 - 0
thirdparty/cpp-httplib/test/test.rootCA.conf

@@ -0,0 +1,18 @@
+[req]
+default_bits           = 2048
+distinguished_name     = req_distinguished_name
+attributes             = req_attributes
+prompt                 = no
+output_password        = mypass
+
+[req_distinguished_name]
+C                      = US
+ST                     = Test State or Province
+L                      = Test Locality
+O                      = Organization Name
+OU                     = Organizational Unit Name
+CN                     = Root CA Name
+emailAddress           = test@email.address
+
+[req_attributes]
+challengePassword              = 1234

+ 28 - 0
thirdparty/cpp-httplib/test/test.sln

@@ -0,0 +1,28 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Express 2013 for Windows Desktop
+VisualStudioVersion = 12.0.20617.1 PREVIEW
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test", "test.vcxproj", "{6B3E6769-052D-4BC0-9D2C-E9127C3DBB26}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Win32 = Debug|Win32
+		Debug|x64 = Debug|x64
+		Release|Win32 = Release|Win32
+		Release|x64 = Release|x64
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{6B3E6769-052D-4BC0-9D2C-E9127C3DBB26}.Debug|Win32.ActiveCfg = Debug|Win32
+		{6B3E6769-052D-4BC0-9D2C-E9127C3DBB26}.Debug|Win32.Build.0 = Debug|Win32
+		{6B3E6769-052D-4BC0-9D2C-E9127C3DBB26}.Debug|x64.ActiveCfg = Debug|x64
+		{6B3E6769-052D-4BC0-9D2C-E9127C3DBB26}.Debug|x64.Build.0 = Debug|x64
+		{6B3E6769-052D-4BC0-9D2C-E9127C3DBB26}.Release|Win32.ActiveCfg = Release|Win32
+		{6B3E6769-052D-4BC0-9D2C-E9127C3DBB26}.Release|Win32.Build.0 = Release|Win32
+		{6B3E6769-052D-4BC0-9D2C-E9127C3DBB26}.Release|x64.ActiveCfg = Release|x64
+		{6B3E6769-052D-4BC0-9D2C-E9127C3DBB26}.Release|x64.Build.0 = Release|x64
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal

+ 174 - 0
thirdparty/cpp-httplib/test/test.vcxproj

@@ -0,0 +1,174 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{6B3E6769-052D-4BC0-9D2C-E9127C3DBB26}</ProjectGuid>
+    <Keyword>Win32Proj</Keyword>
+    <RootNamespace>test</RootNamespace>
+    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <PlatformToolset>v142</PlatformToolset>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <PlatformToolset>v142</PlatformToolset>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <PlatformToolset>v142</PlatformToolset>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <PlatformToolset>v142</PlatformToolset>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <LinkIncremental>true</LinkIncremental>
+    <IncludePath>$(IncludePath)</IncludePath>
+    <LibraryPath>$(LibraryPath)</LibraryPath>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <LinkIncremental>true</LinkIncremental>
+    <IncludePath>$(IncludePath)</IncludePath>
+    <LibraryPath>$(LibraryPath)</LibraryPath>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <LinkIncremental>false</LinkIncremental>
+    <IncludePath>$(IncludePath)</IncludePath>
+    <LibraryPath>$(LibraryPath)</LibraryPath>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <LinkIncremental>false</LinkIncremental>
+    <IncludePath>$(IncludePath)</IncludePath>
+    <LibraryPath>$(LibraryPath)</LibraryPath>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level4</WarningLevel>
+      <Optimization>Disabled</Optimization>
+      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>./;../</AdditionalIncludeDirectories>
+      <AdditionalUsingDirectories>
+      </AdditionalUsingDirectories>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <AdditionalDependencies>Ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <ClCompile>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level4</WarningLevel>
+      <Optimization>Disabled</Optimization>
+      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>./;../</AdditionalIncludeDirectories>
+      <AdditionalUsingDirectories>
+      </AdditionalUsingDirectories>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <AdditionalDependencies>Ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <WarningLevel>Level4</WarningLevel>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <Optimization>MaxSpeed</Optimization>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>./;../</AdditionalIncludeDirectories>
+      <AdditionalUsingDirectories>
+      </AdditionalUsingDirectories>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <OptimizeReferences>true</OptimizeReferences>
+      <AdditionalDependencies>Ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <ClCompile>
+      <WarningLevel>Level4</WarningLevel>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <Optimization>MaxSpeed</Optimization>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>./;../</AdditionalIncludeDirectories>
+      <AdditionalUsingDirectories>
+      </AdditionalUsingDirectories>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <OptimizeReferences>true</OptimizeReferences>
+      <AdditionalDependencies>Ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="gtest\gtest-all.cc" />
+    <ClCompile Include="gtest\gtest_main.cc" />
+    <ClCompile Include="test.cc" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>

+ 305 - 0
thirdparty/cpp-httplib/test/test_proxy.cc

@@ -0,0 +1,305 @@
+#include <future>
+#include <gtest/gtest.h>
+#include <httplib.h>
+
+using namespace std;
+using namespace httplib;
+
+void ProxyTest(Client& cli, bool basic) {
+  cli.set_proxy("localhost", basic ? 3128 : 3129);
+  auto res = cli.Get("/get");
+  ASSERT_TRUE(res != nullptr);
+  EXPECT_EQ(407, res->status);
+}
+
+TEST(ProxyTest, NoSSLBasic) {
+  Client cli("httpbin.org");
+  ProxyTest(cli, true);
+}
+
+#ifdef CPPHTTPLIB_OPENSSL_SUPPORT
+TEST(ProxyTest, SSLBasic) {
+  SSLClient cli("httpbin.org");
+  ProxyTest(cli, true);
+}
+
+TEST(ProxyTest, NoSSLDigest) {
+  Client cli("httpbin.org");
+  ProxyTest(cli, false);
+}
+
+TEST(ProxyTest, SSLDigest) {
+  SSLClient cli("httpbin.org");
+  ProxyTest(cli, false);
+}
+#endif
+
+// ----------------------------------------------------------------------------
+
+void RedirectProxyText(Client& cli, const char *path, bool basic) {
+  cli.set_proxy("localhost", basic ? 3128 : 3129);
+  if (basic) {
+    cli.set_proxy_basic_auth("hello", "world");
+  } else {
+#ifdef CPPHTTPLIB_OPENSSL_SUPPORT
+    cli.set_proxy_digest_auth("hello", "world");
+#endif
+  }
+  cli.set_follow_location(true);
+
+  auto res = cli.Get(path);
+  ASSERT_TRUE(res != nullptr);
+  EXPECT_EQ(200, res->status);
+}
+
+TEST(RedirectTest, HTTPBinNoSSLBasic) {
+  Client cli("httpbin.org");
+  RedirectProxyText(cli, "/redirect/2", true);
+}
+
+#ifdef CPPHTTPLIB_OPENSSL_SUPPORT
+TEST(RedirectTest, HTTPBinNoSSLDigest) {
+  Client cli("httpbin.org");
+  RedirectProxyText(cli, "/redirect/2", false);
+}
+
+TEST(RedirectTest, HTTPBinSSLBasic) {
+  SSLClient cli("httpbin.org");
+  RedirectProxyText(cli, "/redirect/2", true);
+}
+
+TEST(RedirectTest, HTTPBinSSLDigest) {
+  SSLClient cli("httpbin.org");
+  RedirectProxyText(cli, "/redirect/2", false);
+}
+#endif
+
+#ifdef CPPHTTPLIB_OPENSSL_SUPPORT
+TEST(RedirectTest, YouTubeNoSSLBasic) {
+  Client cli("youtube.com");
+  RedirectProxyText(cli, "/", true);
+}
+
+TEST(RedirectTest, YouTubeNoSSLDigest) {
+  Client cli("youtube.com");
+  RedirectProxyText(cli, "/", false);
+}
+
+TEST(RedirectTest, YouTubeSSLBasic) {
+  SSLClient cli("youtube.com");
+  RedirectProxyText(cli, "/", true);
+}
+
+TEST(RedirectTest, YouTubeSSLDigest) {
+  SSLClient cli("youtube.com");
+  RedirectProxyText(cli, "/", false);
+}
+#endif
+
+// ----------------------------------------------------------------------------
+
+void BaseAuthTestFromHTTPWatch(Client& cli) {
+  cli.set_proxy("localhost", 3128);
+  cli.set_proxy_basic_auth("hello", "world");
+
+  {
+    auto res = cli.Get("/basic-auth/hello/world");
+    ASSERT_TRUE(res != nullptr);
+    EXPECT_EQ(401, res->status);
+  }
+
+  {
+    auto res =
+        cli.Get("/basic-auth/hello/world",
+                {make_basic_authentication_header("hello", "world")});
+    ASSERT_TRUE(res != nullptr);
+    EXPECT_EQ("{\n  \"authenticated\": true, \n  \"user\": \"hello\"\n}\n", res->body);
+    EXPECT_EQ(200, res->status);
+  }
+
+  {
+    cli.set_basic_auth("hello", "world");
+    auto res = cli.Get("/basic-auth/hello/world");
+    ASSERT_TRUE(res != nullptr);
+    EXPECT_EQ("{\n  \"authenticated\": true, \n  \"user\": \"hello\"\n}\n", res->body);
+    EXPECT_EQ(200, res->status);
+  }
+
+  {
+    cli.set_basic_auth("hello", "bad");
+    auto res = cli.Get("/basic-auth/hello/world");
+    ASSERT_TRUE(res != nullptr);
+    EXPECT_EQ(401, res->status);
+  }
+
+  {
+    cli.set_basic_auth("bad", "world");
+    auto res = cli.Get("/basic-auth/hello/world");
+    ASSERT_TRUE(res != nullptr);
+    EXPECT_EQ(401, res->status);
+  }
+}
+
+TEST(BaseAuthTest, NoSSL) {
+  Client cli("httpbin.org");
+  BaseAuthTestFromHTTPWatch(cli);
+}
+
+#ifdef CPPHTTPLIB_OPENSSL_SUPPORT
+TEST(BaseAuthTest, SSL) {
+  SSLClient cli("httpbin.org");
+  BaseAuthTestFromHTTPWatch(cli);
+}
+#endif
+
+// ----------------------------------------------------------------------------
+
+#ifdef CPPHTTPLIB_OPENSSL_SUPPORT
+void DigestAuthTestFromHTTPWatch(Client& cli) {
+  cli.set_proxy("localhost", 3129);
+  cli.set_proxy_digest_auth("hello", "world");
+
+  {
+    auto res = cli.Get("/digest-auth/auth/hello/world");
+    ASSERT_TRUE(res != nullptr);
+    EXPECT_EQ(401, res->status);
+  }
+
+  {
+    std::vector<std::string> paths = {
+        "/digest-auth/auth/hello/world/MD5",
+        "/digest-auth/auth/hello/world/SHA-256",
+        "/digest-auth/auth/hello/world/SHA-512",
+        "/digest-auth/auth-int/hello/world/MD5",
+    };
+
+    cli.set_digest_auth("hello", "world");
+    for (auto path : paths) {
+      auto res = cli.Get(path.c_str());
+      ASSERT_TRUE(res != nullptr);
+      EXPECT_EQ("{\n  \"authenticated\": true, \n  \"user\": \"hello\"\n}\n", res->body);
+      EXPECT_EQ(200, res->status);
+    }
+
+    cli.set_digest_auth("hello", "bad");
+    for (auto path : paths) {
+      auto res = cli.Get(path.c_str());
+      ASSERT_TRUE(res != nullptr);
+      EXPECT_EQ(401, res->status);
+    }
+
+    // NOTE: Until httpbin.org fixes issue #46, the following test is commented
+    // out. Plese see https://httpbin.org/digest-auth/auth/hello/world
+    // cli.set_digest_auth("bad", "world");
+    // for (auto path : paths) {
+    //   auto res = cli.Get(path.c_str());
+    //   ASSERT_TRUE(res != nullptr);
+    //   EXPECT_EQ(401, res->status);
+    // }
+  }
+}
+
+TEST(DigestAuthTest, SSL) {
+  SSLClient cli("httpbin.org");
+  DigestAuthTestFromHTTPWatch(cli);
+}
+
+TEST(DigestAuthTest, NoSSL) {
+  Client cli("httpbin.org");
+  DigestAuthTestFromHTTPWatch(cli);
+}
+#endif
+
+// ----------------------------------------------------------------------------
+
+void KeepAliveTest(Client& cli, bool basic) {
+  cli.set_proxy("localhost", basic ? 3128 : 3129);
+  if (basic) {
+    cli.set_proxy_basic_auth("hello", "world");
+  } else {
+#ifdef CPPHTTPLIB_OPENSSL_SUPPORT
+    cli.set_proxy_digest_auth("hello", "world");
+#endif
+  }
+
+  cli.set_keep_alive_max_count(4);
+  cli.set_follow_location(true);
+  cli.set_digest_auth("hello", "world");
+
+  std::vector<Request> requests;
+
+  Get(requests, "/get");
+  Get(requests, "/redirect/2");
+
+  std::vector<std::string> paths = {
+      "/digest-auth/auth/hello/world/MD5",
+      "/digest-auth/auth/hello/world/SHA-256",
+      "/digest-auth/auth/hello/world/SHA-512",
+      "/digest-auth/auth-int/hello/world/MD5",
+  };
+
+  for (auto path : paths) {
+    Get(requests, path.c_str());
+  }
+
+  {
+    int count = 100;
+    while (count--) {
+      Get(requests, "/get");
+    }
+  }
+
+  std::vector<Response> responses;
+  auto ret = cli.send(requests, responses);
+  ASSERT_TRUE(ret == true);
+  ASSERT_TRUE(requests.size() == responses.size());
+
+  size_t i = 0;
+
+  {
+    auto &res = responses[i++];
+    EXPECT_EQ(200, res.status);
+  }
+
+  {
+    auto &res = responses[i++];
+    EXPECT_EQ(200, res.status);
+  }
+
+
+  {
+    int count = static_cast<int>(paths.size());
+    while (count--) {
+      auto &res = responses[i++];
+      EXPECT_EQ("{\n  \"authenticated\": true, \n  \"user\": \"hello\"\n}\n", res.body);
+      EXPECT_EQ(200, res.status);
+    }
+  }
+
+  for (; i < responses.size(); i++) {
+    auto &res = responses[i];
+    EXPECT_EQ(200, res.status);
+  }
+}
+
+TEST(KeepAliveTest, NoSSLWithBasic) {
+  Client cli("httpbin.org");
+  KeepAliveTest(cli, true);
+}
+
+TEST(KeepAliveTest, SSLWithBasic) {
+  SSLClient cli("httpbin.org");
+  KeepAliveTest(cli, true);
+}
+
+#ifdef CPPHTTPLIB_OPENSSL_SUPPORT
+TEST(KeepAliveTest, NoSSLWithDigest) {
+  Client cli("httpbin.org");
+  KeepAliveTest(cli, false);
+}
+
+TEST(KeepAliveTest, SSLWithDigest) {
+  SSLClient cli("httpbin.org");
+  KeepAliveTest(cli, false);
+}
+#endif

+ 8 - 0
thirdparty/cpp-httplib/test/www/dir/index.html

@@ -0,0 +1,8 @@
+<html>
+<head>
+</head>
+<body>
+  <a href="/dir/test.html">Test</a>
+  <a href="/hi">hi</a>
+</body>
+</html>

+ 1 - 0
thirdparty/cpp-httplib/test/www/dir/test.abcde

@@ -0,0 +1 @@
+abcde

+ 1 - 0
thirdparty/cpp-httplib/test/www/dir/test.html

@@ -0,0 +1 @@
+test.html

+ 8 - 0
thirdparty/cpp-httplib/test/www2/dir/index.html

@@ -0,0 +1,8 @@
+<html>
+<head>
+</head>
+<body>
+  <a href="/dir/test.html">Test</a>
+  <a href="/hi">hi</a>
+</body>
+</html>

+ 1 - 0
thirdparty/cpp-httplib/test/www2/dir/test.html

@@ -0,0 +1 @@
+test.html

+ 8 - 0
thirdparty/cpp-httplib/test/www3/dir/index.html

@@ -0,0 +1,8 @@
+<html>
+<head>
+</head>
+<body>
+  <a href="/dir/test.html">Test</a>
+  <a href="/hi">hi</a>
+</body>
+</html>

+ 1 - 0
thirdparty/cpp-httplib/test/www3/dir/test.html

@@ -0,0 +1 @@
+test.html

+ 0 - 1
thirdparty/curl

@@ -1 +0,0 @@
-Subproject commit ad829b21ae9e0f11a821a0a98a1aaab161efa9a2

+ 0 - 47
thirdparty/curlpp/.gitignore

@@ -1,47 +0,0 @@
-*.Po
-*.o
-*.a
-*.la
-*.lo
-*.Plo
-*.dylib
-*.lai
-Makefile
-*~
-
-build/
-m4/
-CMakeFiles/
-
-examples/example01
-examples/example02
-examples/example03
-examples/example04
-examples/example05
-examples/example06
-examples/example07
-examples/example08
-examples/example09
-examples/example10
-examples/example11
-examples/example12
-examples/example13
-examples/example14
-examples/example15
-examples/example16
-examples/example17
-examples/example18
-examples/example19
-examples/example20
-examples/example21
-examples/example22
-examples/example23
-examples/example24
-examples/example25
-
-*.exe
-CMakeCache.txt
-
-conanbuildinfo.cmake
-conaninfo.txt
-bin/

+ 0 - 23
thirdparty/curlpp/.hgignore

@@ -1,23 +0,0 @@
-(^|/)\.svn($|/)
-(^|/)\.hg($|/)
-(^|/)\.hgtags($|/)
-^curlpp-svn.log$
-^tailor.state$
-^tailor.state.old$
-^tailor.state.journal$
-.*\.o
-.*\.lo
-.*\.a
-.*\.la
-.*\.Plo
-.*\.Po
-#.*#$
-Makefile$
-Makefile.in$
-include/curlpp/config.h.in
-include/curlpp/config.h
-^examples/example[0-9]*$
-aclocal.m4$
-.dylib$
-curlpp.pc$
-curlpp.spec$

+ 0 - 54
thirdparty/curlpp/.travis.yml

@@ -1,54 +0,0 @@
-language: cpp
-
-# precise gcc doesn't have c++11 support
-
-matrix:
-  include:
-    - os: linux
-      dist: trusty
-      compiler: clang
-      env: NAME="trusty"
-    - os: linux
-      dist: trusty
-      compiler: gcc
-      env: NAME="trusty"
-    - os: linux
-      dist: precise
-      compiler: clang
-      env: NAME="precise"
-    - os: osx
-      osx_image: xcode7.2
-    - os: osx
-      compiler: clang
-    - os: osx
-      compiler: gcc
-
-addons:
-  apt:
-    packages:
-      - libcurl4-openssl-dev
-
-before_script:
-  - mkdir build && cd build
-  - cmake ../
-
-script:
-  - make && sudo make install
-  - cd ../examples && mkdir build && cd build
-  - cmake ../
-  - make 
-
-
-install:
-- echo install-----------------------------------------------------------------
-# Download and install libcurl 
-- if [[ $TRAVIS_OS_NAME == "osx" ]]; then
-    brew update;
-    brew install curl;
-  fi
-# install cmake 3.2 for precise
-- if [[ $NAME == "precise" ]]; then
-    sudo add-apt-repository ppa:george-edison55/precise-backports --yes;
-    sudo apt-get update;
-    sudo apt-get install cmake-data cmake;
-  fi  

+ 0 - 115
thirdparty/curlpp/CMakeLists.txt

@@ -1,115 +0,0 @@
-project(curlpp) 
-
-
-# In response to CMake 3.0 generating warnings regarding policy CMP0042,
-# the OSX RPATH settings have been updated per recommendations found
-# in the CMake Wiki:
-#  http://www.cmake.org/Wiki/CMake_RPATH_handling#Mac_OS_X_and_the_RPATH
-if(POLICY CMP0042)
-    cmake_policy(SET CMP0042 NEW) # MACOSX_RPATH
-    set(CMAKE_MACOSX_RPATH TRUE)
-endif()
-
-# for unix platform, define install directories.
-include(GNUInstallDirs)
-
-if(WIN32)
-    # cmake 3.4 is required for CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS
-    cmake_minimum_required(VERSION 3.4)
-
-    # c++ 11 support from cmake 3.4 or newer
-    set(CMAKE_CXX_STANDARD 11) # C++11...
-    set(CMAKE_CXX_STANDARD_REQUIRED ON) #...is required...
-    set(CMAKE_CXX_EXTENSIONS OFF) #...without compiler extensions like gnu++11
-
-    set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
-  else()
-    if (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} VERSION_LESS 3.1)
-        cmake_minimum_required(VERSION 2.8)
-        # c++11 support for cmake 2.8.12 - 3.0.x
-        #
-        # for non-windows platform we try to keep cmake 2.8 support
-        # since entreprise distribution tends to have 2.8 version.
-        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
-    else()
-        # c++ 11 support from cmake 3.1 or newer
-        set(CMAKE_CXX_STANDARD 11) # C++11...
-        set(CMAKE_CXX_STANDARD_REQUIRED ON) #...is required...
-        set(CMAKE_CXX_EXTENSIONS OFF) #...without compiler extensions like gnu++11
-    endif()
-endif()
-
-
-# Conan.io integration
-if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/conanbuildinfo.cmake)
-    include(${CMAKE_CURRENT_SOURCE_DIR}/conanbuildinfo.cmake)
-    conan_basic_setup()
-endif()
-
-# extra (pkg-config-related files)
-add_subdirectory(extras)
-
-#########################################################################################
-# Look for dependencies
-
-# Documented at https://cmake.org/cmake/help/v3.0/module/FindCURL.html?highlight=curlpp
-# Seems simple.
-
-message(STATUS "Looking for CURL")
-include(FindCURL)
-find_package(CURL REQUIRED)
-
-if(CURL_FOUND)
-  message(STATUS "Found CURL version: ${CURL_VERSION_STRING}")
-  message(STATUS "Using CURL include dir(s): ${CURL_INCLUDE_DIRS}")
-  message(STATUS "Using CURL lib(s): ${CURL_LIBRARIES}")
-else()
-  message(FATAL_ERROR "Could not find CURL")
-endif()
-
-# All following targets should search these directories for headers
-include_directories( 
-  ${CMAKE_CURRENT_SOURCE_DIR}/include
-  ${CURL_INCLUDE_DIRS}
-)
-
-#########################################################################################
-# Define Targets
-
-# If building on windows, install path will be in build/winbuild
-if(CMAKE_SYSTEM MATCHES "Windows")
-   if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
-      set(CMAKE_INSTALL_PREFIX "winbuild")
-   endif()
-endif()
-
-file(GLOB_RECURSE HeaderFileList "${CMAKE_CURRENT_SOURCE_DIR}/include/*")
-file(GLOB_RECURSE SourceFileList "${CMAKE_CURRENT_SOURCE_DIR}/src/*")
-add_library(${PROJECT_NAME} SHARED ${HeaderFileList} ${SourceFileList})
-target_link_libraries(${PROJECT_NAME} ${CURL_LIBRARIES} ${CONAN_LIBS})
-set_target_properties(${PROJECT_NAME} PROPERTIES SOVERSION 1 VERSION 1.0.0)
-
-add_library(${PROJECT_NAME}_static STATIC ${HeaderFileList} ${SourceFileList})
-
-# Make sure that on unix-platforms shared and static libraries have
-# the same root name, but different suffixes.
-#
-#  (solution taken from https://cmake.org/Wiki/CMake_FAQ#How_do_I_make_my_shared_and_static_libraries_have_the_same_root_name.2C_but_different_suffixes.3F)
-# 
-# Making shared and static libraries have the same root name, but different suffixes
-SET_TARGET_PROPERTIES(${PROJECT_NAME}_static PROPERTIES OUTPUT_NAME ${PROJECT_NAME})
-# Now the library target "curlpp_static" will be named "curlpp.lib" with MS tools.
-# This conflicts with the "curlpp.lib" import library corresponding to "curlpp.dll",
-# so we add a "lib" prefix (which is default on other platforms anyway):
-SET_TARGET_PROPERTIES(${PROJECT_NAME}_static PROPERTIES PREFIX "lib")
-target_link_libraries(${PROJECT_NAME}_static ${CURL_LIBRARIES} ${CONAN_LIBS})
-
-# install headers
-install(DIRECTORY include/utilspp/ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/utilspp")
-install(DIRECTORY include/curlpp/ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/curlpp")
-
-install(TARGETS ${PROJECT_NAME} ${PROJECT_NAME}_static
-        RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
-        LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
-        ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
-

+ 0 - 1
thirdparty/curlpp/CNAME

@@ -1 +0,0 @@
-www.curlpp.org

+ 0 - 34
thirdparty/curlpp/Readme.md

@@ -1,34 +0,0 @@
-[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Travis CI](https://img.shields.io/travis/jpbarrette/curlpp.svg)](https://travis-ci.org/jpbarrette/curlpp) [![AppVeyor CI](https://img.shields.io/appveyor/ci/jpbarrette/curlpp.svg)](https://ci.appveyor.com/project/jpbarrette/curlpp)
-
-# Description
-
-[cURLpp](http://www.curlpp.org) is a C++ wrapper for libcURL. libcURL is described as:
-
-<cite>
-a free and easy-to-use client-side URL transfer library, supporting FTP, FTPS, HTTP, HTTPS, GOPHER, TELNET, DICT, FILE and LDAP. libcurl supports HTTPS certificates, HTTP POST, HTTP PUT, FTP uploading, kerberos, HTTP form based upload, proxies, cookies, user+password authentication, file transfer resume, http proxy tunneling and more!
-</cite>
-
-<cite>
-libcurl is highly portable, it builds and works identically on numerous platforms, including Solaris, NetBSD, FreeBSD, OpenBSD, Darwin, HPUX, IRIX, AIX, Tru64, Linux, Windows, Amiga, OS/2, BeOs, Mac OS X, Ultrix, QNX, OpenVMS, RISC OS, Novell NetWare, DOS and more...
-</cite>
-
-<cite>
-libcurl is free, thread-safe, IPv6 compatible, feature rich, well supported and fast.
-</cite>
-
-First, I need to quote Daniel Stenberg, the maintener of libcURL:
-<cite>You can use libcURL instantly from within your C++ programs. You don't need cURLpp for that, cURLpp just adds an OO'ified layer that libcURL doesn't normally provide.</cite> It means that you need to be sure that you need, or want, cURLpp features. If not, I suggest to use directly the libcURL library. So, what are thoses features that cURLpp offers?
-
-* You can query handles for option values (version 0.5.x and newer only).
-* It uses the C++ standard library structures instead of home made ones.
-* It is exception safe.
-* It is type safe.
-
-# Download
-
-Latest version is available on GitHub [here](https://github.com/jpbarrette/curlpp/releases/latest).
-
-# Documentation
-
-The programming guide is [here](https://github.com/jpbarrette/curlpp/tree/master/doc/guide.pdf). This guide is greatly inspired by the libcURL guide, that I strongly suggest to read. There's also some examples in the "[examples](http://github.com/jpbarrette/curlpp/tree/master/examples)/" source directory of cURLpp.
-

+ 0 - 1
thirdparty/curlpp/_config.yml

@@ -1 +0,0 @@
-theme: jekyll-theme-minimal

+ 0 - 45
thirdparty/curlpp/appveyor.yml

@@ -1,45 +0,0 @@
-version: '0.7.4.{build}'
-
-environment:
-    matrix:
-      - PRJ_GEN: "Visual Studio 11 2012 Win64"
-        BDIR: msvc2012
-        PRJ_CFG: Release
-        PRJ_GEN_VERSION: 11
-      - PRJ_GEN: "Visual Studio 12 2013 Win64"
-        BDIR: msvc2013
-        PRJ_CFG: Release
-        PRJ_GEN_VERSION: 12
-      - PRJ_GEN: "Visual Studio 14 2015 Win64"
-        BDIR: msvc2015
-        PRJ_CFG: Release
-        PRJ_GEN_VERSION: 14
-      - PRJ_GEN: "Visual Studio 11 2012 Win64"
-        BDIR: msvc2012
-        PRJ_CFG: Debug
-        PRJ_GEN_VERSION: 11
-      - PRJ_GEN: "Visual Studio 12 2013 Win64"
-        BDIR: msvc2013
-        PRJ_CFG: Debug
-        PRJ_GEN_VERSION: 12
-      - PRJ_GEN: "Visual Studio 14 2015 Win64"
-        BDIR: msvc2015
-        PRJ_CFG: Debug
-        PRJ_GEN_VERSION: 14
-
-install:
-      - cmd: echo "Downloading conan..."
-      - cmd: set PATH=%PATH%;%PYTHON%/Scripts/
-      - cmd: pip.exe install conan
-      - cmd: conan user # Create the conan data directory
-      - cmd: conan --version
-
-build_script:
-    - mkdir build.%BDIR%
-    - IF %PRJ_GEN_VERSION% == 11 call "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Tools\vsvars32.bat"
-    - conan install --build=missing -s compiler="Visual Studio" -s compiler.version=%PRJ_GEN_VERSION% -s build_type=%PRJ_CFG% .
-    - cd build.%BDIR%
-    - cmake .. -G"%PRJ_GEN%"
-    - cmake --build . --config %PRJ_CFG% --clean-first
-
-

+ 0 - 5
thirdparty/curlpp/conanfile.txt

@@ -1,5 +0,0 @@
-[requires]
-libcurl/7.50.3@bincrafters/stable
-
-[generators]
-cmake

+ 0 - 13
thirdparty/curlpp/doc/AUTHORS

@@ -1,13 +0,0 @@
-Eric Lavigne (erlavigne at wanadoo.fr)
-Jean-Philippe Barrette-LaPierre (jpb at rrette.com)
-
-Thanks to some patch providers:
-Thomas Boutry
-Jonathan Wakely
-Peter Krumins
-Ben Golding
-Glenn <crass_no_spam at users dot berlios dot de>
-Hoef Jan
-Gisle Vanem
-Paul Lacy
-Nicolas Le Goff

+ 0 - 21
thirdparty/curlpp/doc/LICENSE

@@ -1,21 +0,0 @@
-Copyright (c) <2002-2004> <Jean-Philippe Barrette-LaPierre>
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files 
-(cURLpp), to deal in the Software without restriction, 
-including without limitation the rights to use, copy, modify, merge,
-publish, distribute, sublicense, and/or sell copies of the Software,
-and to permit persons to whom the Software is furnished to do so, 
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-

+ 0 - 238
thirdparty/curlpp/doc/README.win32

@@ -1,238 +0,0 @@
-Read the README file first.
-
-As of version 0.6.0 curlpp has been built and run on win32.
-
-Information contained in this file does not apply to cygwin builds.
-
-curlpp has been tested on 
-Microsoft Visual C++ 7.1 (2003), (by Giuseppe "Cowo" Corbelli)
-Microsoft Visual C++ 8.0 (2005), (by Andrei Korostelev)
-Microsoft Visual C++ 9.0 (2008), (by Piotr Dobrogost)
-but any modern C++ compiler should do the job.
-
-BUILDING CURLPP WITH MSVC
--------------------------
-
-BUILDING CURLPP
-
-You can build curlpp in three different ways
-
-A. from within MS Visual Studio IDE
-B. using msbuild tool and solution files
-C. using namke and makefile
-
-
-A. and B.
-
-	In case of A. and B. first you have to create solution files for your version of MS Visual Studio.
-	To do this use win32\create-vc-solution.bat	batch file with one of the following parameters:
-	7.1, for Visual Studio 2003
-	8, for Visual Studio 2005
-	9, for Visual Studio 2008
-	This batch file needs sed to be run successfully. You can download sed for win32 platform here
-	http://gnuwin32.sourceforge.net/packages/sed.htm
-    
-
-A. Building from within IDE
-
-    Choosing configuration
-
-        Choose configuration you would like to build. What configuration you want depens on three aspects.
-        1. Weather you want to build dynamic library (dll) or static library (lib). 
-           Choose configuration with DynamicLib or StaticLib prefix.
-        2. Weather you want to build debug or release version of the library.
-           Choose configuration with Debug or Release infix.
-        3. Weather you want static runtime library (RTL) to be used by curlpp or dynamic one.
-           Choose configuration with StaticRTL or DynamicRTL suffix.
-       
-        Names' suffixes of output .lib and .dll files depend on the all three choices.
-
-        MTd - dynamic, debug, static RTL
-        MT -  dynamic, release, static RTL
-        MDd - dynamic, debug, dynamic RTL
-        MD -  dynamic, release, dynamic RTL
-		
-        staticMTd - static, debug, static RTL
-        staticMT -  static, release, static RTL
-        staticMDd - static, debug, dynamic RTL
-        staticMD -  static, release, dynamic RTL
-
-        We will refer to these suffixes and types of libraries as "build category" further in this document.
-
-    Setting include directory
-    
-        If you are building curlpp using the original directory structure then you don't need to set value of user macro 
-        CURLPP_INCLUDE_PATH (by default ".\include"). If however you modified the original directory structure you have
-        to set value of this macro to the path, where you have curlpp source files.
-		
-	Setting output directory
-	
-		The output files will be placed in a directory set in CURLPP_LIB_PATH user macro (by default ".out\lib").
-
-		
-B. Building using msbuild
-
-    Open a command prompt and change folder to the root of curlpp tree.
-
-    set LIBCURL_PATH=/where/curl/is/installed
-    set OPENSSL_PATH=/where/openssl/is/installed (only if you have libcurl with ssl support and ssl installed)
-    msbuild curlpp.sln /t:Rebuild /p:Configuration=<Configuration>
-        where <Configuration> is one of
-        - DynamicLibDebugDynamicRTL
-        - DynamicLibDebugStaticRTL
-        - DynamicLibReleaseDynamicRTL
-        - DynamicLibReleaseStaticRTL
-        - StaticLibDebugDynamicRTL
-        - StaticLibDebugStaticRTL
-        - StaticLibReleaseDynamicRTL
-        - StaticLibReleaseStaticRTL
-        
-    Output files will be placed in a directory set in CURLPP_LIB_PATH.
-    
-    Any of DynamicLib* configurations will build a .dll library file and a .lib library import file.
-    Any of StaticLib* configurations will build the .lib static (inline) library.
-	Any of *Debug* configurations will in addition build a .pdb Program Database file.
-
-	
-C. Building using nmake
-
-	Open a command prompt and change folder to the root of curlpp tree.
-	Run nmake /f makefile with the following parameters
-	BUILD_CFG=[dynamic|static]-[debug|release]
-	RTLIB_CFG=[dynamic|static]-[debug|release]
-	LIBCURL_CFG=[dynamic|static]-[debug|release]
-
-	All options are optional.
-	Default for BUILD_CFG is dynamic-release.
-	Default for others is the value of BUILD_CFG.
-	Edit the LIBCURL_PATH or set LIBCURL_PATH envvar!
-
-
-NOTES
-    
-    Linking with libcurl
-    
-    All versions of this library need libcurl (c library) include files to compile and lib file to link successfully.
-    To build curlpp you first have to set value of LIBCURL_PATH user macro to your installation of libcurl.
-    This macro is used in the project file for VC9 to find include and lib files of libcurl.
-    Steps to set user macro. Select View/Property Manager, double-click curlpp property sheet, go to
-    Common Properties/User Macros/, double-click name of macro you want to modify, modify it and click OK.
-    Filename of libcurl's lib file should be in the form libcurlX.lib where X denotes build category chosen for curlpp.
-    (see Linking with RTL)
-    If it has different name you have to change .lib filename in
-    Project properties\Librarian\Additional Dependencies (when building static library)
-    or
-    Project properties\Linker\Input\Additional Dependencies (when building dynamic library).
-    
-
-    Linking with static libcurl
-    
-    If you are not going to use libcurl as a dll and you would like to include it into your library/executable by
-    linking to static version of libcurl you have to define preprocessor symbol CURL_STATICLIB. You can do it in
-    Project/Properties/C/C++/Preprocessor/Preprocessor Definitions.
-    By default all StaticLib* configurations define this symbol. If for some reason you would like to build static
-    curlpp library which links do dynamic libcurl library you have to remove CURL_STATICLIB define.
-
-    
-    Linking with RTL
-    
-    You have to link with libcurl which uses RTL in the same way as you are going to use RTL in curlpp lib.
-    Refering to build categories defined earlier in section "Choosing configuration" both libcurl and curlpp
-    must have the same build category.
-    If you are going to use dynamic RTL in curlpp (MD[x]), use libcurl which also uses dynamic RTL (MD[x]).
-    If you are going to use static RTL in curlpp (MT[x]), use libcurl which also uses static RTL (MT[x]).
-    You can use debug build of libcurl (MDd or MTd) in the release build of curlpp (MD or MT) and
-    you can use release build of libcurl (MD or MT) in the debug build of curlpp (MDd or MTd).
-    However you shouldn't do this.
-
-	Building self-contained version of the library
-	
-	curlpp is mostly a template library. For this reason during build of it, only non template entities are placed in the
-	.lib and .dll files. Most of the library's features used in your application causes code generation during compilation
-	of _your project_ and the code is placed in your executable. This is often not desirable. If you want to build 
-	the curlpp as self-contained library (one which has all code called by clients in its .lib and .dll files) you can
-	define preprocesor symbol CURL_SELF_CONTAINED. In this case curlpp uses explicit template instantiation (all such
-	instantiantions are placed in separte .ins files) to force generating code into .lib and .dll files. You have to
-	define this preprocesor symbol during build of your application to avoid including templates' definitions as they
-	are not needed in this phase. If you get linker errors connected with curlpp features when using self-contained 
-	version of the library it's because there are some missing explicit instantiantions. Please let us know if it happens.
-
-    
-    Using curlpp in .NET applications 
-    
-    If you are going to use curlpp library in a .NET project you have to use dynamic RTL.
-    This is because all .NET applications must use dynamic RTL and if your application uses curlpp,
-    the library itself has to use dynamic RTL as well.
-
-    
-    Additional dependencies
-    
-    To build examples (and your project as well) you need the following Windows lib files to link successfully
-    WSock32.lib, Wldap32.lib
-    These files comes with WindowsSDK. Macro $(WIN_SDK_DIR) (by default $(WindowsSdkDir)) is used in the properties
-	sheet file curlpp.examples.VC9.vsprops by VC9 solution to find these libraries.
-
-    
-    Linking with OpenSSL
-    
-    If you have libcurl compiled with OpenSSL support and want to have support for OpenSSL in curlpp as well
-    you have to set value of OPENSSL_PATH user macro to your installation of OpenSSL before building curlpp.
-    This variable is used in the project file for VC9 to find include and lib files of OpenSSL.
-    Steps to set user macro. Select View/Property Manager, double-click curlpp property sheet, go to
-    Common Properties/User Macros/, double-click name of macro you want to modify, modify it and click OK.
-    You have to link with OpenSSL which uses RTL in the same way as you are going to use RTL in curlpp lib.
-    Refering to build categories defined earlier in section "Choosing configuration" both OpenSSL and curlpp
-    must have the same build category.
-    Filenames of OpenSSL lib files should be in the form libeay32X.lib and ssleay32X.lib, where X denotes
-    build category chosen for curlpp. You have to add both this filenames to
-    Project properties\Librarian\Additional Dependencies (when building static library)
-    or
-    Project properties\Linker\Input\Additional Dependencies (when building dynamic library).
-
-    If you need OpenSSL for Windows platform take a look at http://www.slproweb.com/products/Win32OpenSSL.html
-    If you installed OpenSSL downloaded from the above link you'll find .lib files of all four build categories
-    in the /lib/vc directory.
-    
-    
-    Building with support for Boost
-    
-    curlpp has ability to use some features from the Boost library. If you want to build curlpp with support for Boost
-    you have to set value of BOOST_PATH user macro to your installation of Boost before building curlpp.
-    This variable is used in the project file for VC9 to find include files of Boost.
-    You also have to define preprocessor symbol HAVE_BOOST. You can do it in
-    Project/Properties/C/C++/Preprocessor/Preprocessor Definitions.
-	
-
-    Project propery sheets
-    
-    All user macros like LIBCURL_PATH, OPENSSL_PATH, BOOST_PATH, CURLPP_INCLUDE_PATH, CURLPP_LIB_PATH, WIN_SDK_DIR,
-	CURLPP_EXAMPLES_OUT_DIR, etc. 
-	are defined in project property sheet files named 
-	curlpp.common.vsprops   - options and macros used during build of library itself and during build of examples
-	curlpp.lib.vsprops      - options and macros used during build of library itself
-	curlpp.examples.vsprops - options and macros used during build of examples
-	
-
-	Compiler warnings
-	
-	There are a few kinds of compiler warnings which we haven't managed to remove.
-	
-	warning C4251: class X needs to have dll-interface to be used by clients of class Y
-	warning C4275: non dll-interface class X used as base for dll-interface class Y
-	warning C4512: X : assignment operator could not be generated
-	warning C4661: methodX : no suitable definition provided for explicit template instantiation request
-
-	
-BUILDING CURLPP EXAMPLES
-
-Your can either build the examples from MS Visual Studio IDE or from the command line from within examples folder:
-
-    nmake -f Makefile.msvc all
-      or    
-    nmake -f Makefile.msvc exampleXY
-      to build example XY
-
-
-Giuseppe "Cowo" Corbelli, cowo at lugbs dot linux dot it
-Andrei Korostelev, andrei at korostelev dot net
-Piotr Dobrogost, pd.curlpp.org (November 2008 - March 2009)

+ 0 - 4
thirdparty/curlpp/doc/TODO

@@ -1,4 +0,0 @@
-- Need to fix the OptionList::print function.
-- Need to put WriteStream and ReadStream to be exception safe.
-- Need to put WriteStream and ReadStream to be exception safe.
-- Get rid of example 18 and 20

BIN
thirdparty/curlpp/doc/guide.pdf


+ 0 - 706
thirdparty/curlpp/doc/guide.tex

@@ -1,706 +0,0 @@
-\LoadClass[12pt,letterpaper]{article}
-\documentclass{article}
-\usepackage{verbatim}
-\author{Jean-Philippe Barrette-LaPierre}
-\title{Programming with cURLpp}
-\begin{document}
-\maketitle
-\section{About this Document}
-\newcommand{\Cpp}{C{\tt ++}}
-
-
-This document attempts to describe the general principles and some basic
-approaches to consider when programming with cURLpp. Don't forget that cURLpp
-is a \Cpp wrapper of libcurl, so cURLpp needs libcurl to be installed already.
-
-This document will refer to 'the user' as the person writing the source code
-that uses cURLpp. That would probably be you or someone in a similar position.
-What will be generally refered to as 'the program' will be the collective
-source code that you write and that is using cURLpp for transfers. The program
-is outside cURLpp and cURLpp is outside of the program.
-
-To get more details on all options and functions described herein, please
-refer to their respective man pages. You should always have in mind that this
-is a \Cpp wrapper of libcurl. It would be unproductive to duplicate libcurl's 
-documentation here, so this document will show you how to interact with cURLpp,
-but you should read the libcurl programming tutorial, which this document is 
-strongly inspired from, and the libcurl man pages.
-
-\section{Building}
-
-There are many different ways to build C++ programs. This chapter will assume a
-unix-style build process. If you use a different build system, you can still
-read this to get general information that may apply to your environment as
-well. Note that cURLpp need libcurl to be already installed.
-
-\subsection{Compiling the Program}
-
-Your compiler needs to know where cURLpp's and libcurl's headers are
-located. Therefore you must set your compiler's include path to point to
-the directory where you installed them. The 'curlpp-config'\footnote{
-The curlpp-config tool, which wraps all functions of curl-config,
-is generated at build-time (on unix-like systems) and should be installed 
-with the 'make install' or similar instruction that installs the library, 
-header files, man pages etc.} tool can be
-used to get this information:
-
-\begin{verbatim} # curlpp-config --cflags\end{verbatim}
-
-If pkg-config is installed, you can use it this way:
-
-\begin{verbatim} # pkg-config --cflags curlpp\end{verbatim}  
-
-But, if you're using \verb+autoconf+ for your project you can use 
-\verb+pkg-config+ macros. See \verb+pkg-config+ man pages for more
-details.
-
-\subsection{Linking the Program with cURLpp}
-
-When having compiled the program, you need to link your object files to
-create a single executable. For that to succeed, you need to link with
-cURLpp and possibly also with other libraries that cURLpp itself depends
-on (such as libcurl). This may include OpenSSL libraries and even some standard
-OS libraries may be needed on the command line. To figure out which flags to use,
-the 'curlpp-config' tool comes to the rescue once again:
-
-\begin{verbatim} # curlpp-config --libs\end{verbatim}
-
-Again, if pkg-config is installed, you can use it this way:
-
-\begin{verbatim} # pkg-config --libs curlpp\end{verbatim}  
-
-\subsection{SSL or Not}
-
-cURLpp, like libcurl, can be built and customized in many ways. One of the things that
-varies between different libraries and builds is the support for SSL-based
-transfers, like HTTPS and FTPS. If OpenSSL was detected properly by libcurl 
-at build-time, cURLpp will be built with SSL support. To figure out if an
-installed cURLpp has been built with SSL support enabled, use
-'curlpp-config' like this:
-
-\begin{verbatim} # curlpp-config --feature\end{verbatim}
-
-If SSL is supported, the keyword 'SSL' will be written to stdout,
-possibly together with a few other features that can be on and off on
-different cURLpps.
-
-
-\subsection{Portable Code in a Portable World}
-
-The people behind libcurl have put a considerable effort to make libcurl work
-on a large number of different operating systems and environments.
-
-You program cURLpp the same way on all platforms that cURLpp runs on. There
-are only very few minor considerations that differ. If you make sure just to
-write your code portably enough, you may very well create yourself a very
-portable program. cURLpp shouldn't stop you from that.
-
-\section{Global Preparation}
-
-The program must initialize some of the cURLpp functionality globally. That
-means it should be done exactly once, no matter how many times you intend to
-use the library. Once for your program's entire lifetime. This is done using
-
-\begin{verbatim} 
-cURLpp::initialize( long flags = cURLpp::CURL_GLOBAL_ALL ) 
-\end{verbatim}
-
-and it takes one parameter which is a bit pattern that tells cURLpp what to
-intialize. Check the man page of \verb+curl_global_init+ for more details on flags.
-
-When the program no longer uses cURLpp, it should call \verb+cURLpp::terminate()+, 
-which is the opposite of the init call. It will then do the operations needed 
-to cleanup the resources that the \verb+cURLpp::initialize()+ call initialized. 
-
-Repeated calls to \verb+cURLpp::initialize()+ and \verb+cURLpp::terminate()+ must not be made. 
-They must only be called once each. The cURLpp::Cleanup class can be used to do this. It will
-call the \verb+cURLpp::initialize()+ function in its constructor and \verb+cURLpp::terminate()+
-in its destructor.  Check example01.cpp in the examples/ directory of
-the source distribution for an example. 
-
-\section{Handle the Easy cURLpp}
-
-To use the easy interface, you must first create yourself an easy handle. You
-need one handle for each easy session you want to perform. Basically, you
-should use one handle for every thread you plan to use for transferring. You
-must never share the same handle in multiple threads.
-
-Get an easy handle with
-
-\begin{verbatim} cURLpp::Easy easyhandle;\end{verbatim}
-
-This creates an easy handle. Using that you proceed to the next step: setting
-up your preferred actions. A handle is just a logic entity for the upcoming
-transfer or series of transfers. You can use it to do HTTP or FTP 
-requests.
-
-You set properties and options for this handle using \verb+cURLpp::Options+, 
-or \verb+cURLpp::OptionList+ classes; we will discuss \verb+cURLpp::OptionList+
-later. They control how the subsequent transfer or transfers will be made. 
-Options remain set in the handle until set again to something different. 
-Alas, multiple requests using the same handle will use the same options.
-
-Many of the informationals you set in cURLpp are \Cpp standard library strings. 
-Keep in mind that when you set strings with member functions, cURLpp will copy 
-the data. It will not merely point to the data. You don't need to make sure 
-that the data remains available for cURLpp.
-
-One of the most basic properties to set in the handle is the URL. You set
-your preferred URL to transfer with a 
-\verb+void cURLpp::Options::Url(const char *link)+
-option class, in a manner similar to:
-
-\begin{verbatim} 
-easyhandle.setOpt(cURLpp::Options::Url("http://example.com/"));
-\end{verbatim}
-
-There are of course many more options you can set, and we'll get back to a
-few of them later. Let's instead continue to the actual transfer:
-
-\begin{verbatim}
-easyhandle.perform();
-\end{verbatim}
-
-The \verb+cURLpp::Easy::perform()+ will connect to the remote site, do the necessary
-commands and receive the transfer. Whenever it receives data, it calls the
-trait function we previously set. The function may get one byte at a time,
-or it may get many kilobytes at once. cURLpp delivers as much as possible as
-often as possible. Your trait function should return the number of bytes
-it "took care of". If that is not the exact same amount of bytes that was
-passed to it, cURLpp will abort the operation and throw an exception.
-
-When the transfer is complete, the function throws a 
-\verb+cURLpp::Exception+ if it 
-doesn't succeed in its mission. the \verb+const char *cURLpp::Exception::what()+ will
-return the human readable reason of failure.
-
-\section{Wrapping libcurl}
-
-As previously said, \verb+cURLpp+ is just a \Cpp libcurl wrapper. It wouldn't be a good 
-idea to reproduce here, in this project, all the libcurl documentation. This means 
-that when you will be programming with \verb+cURLpp+, you will refer more to libcurl's 
-documentation than to \verb+cURLpp+'s. We will explain here how \verb+cURLpp+ wraps libcurl, so
-you will able to use it, without constantly refering to its manual. 
-
-First, you must know that there are two main things that constitute \verb+cURLpp+: There are
-its options value setting/retrieving behavior and its utilities that helps you to use
-libcurl's options more easily. 
-
-\subsection{Option setting/retrieving}
-
-The main feature of \verb+cURLpp+ is that you can retrieve options previously set on handles.
-\verb+cURLpp+ gives you the opportunity to retrieve options values that were previously set
-on a specific handle and then use them again for other handles. But first, let's show
-you how to set an option on a handle, in comparison to libcurl's way of setting an option.
-
-libcurl sets options on handles with this function:
-
-\begin{verbatim}
-curl_easy_setopt(CURL *handle, CURLoption option, parameter)
-\end{verbatim}
-
-Here's a part of the documentation taken from the man pages:
-
-\begin{quote}
-\verb+curl_easy_setopt()+ is  used to tell libcurl how to behave. By using the appropriate options to 
-\verb+curl_easy_setopt()+, you can change libcurl's behavior.  All options are set with the option 
-followed by a parameter.  That  parameter can  be  a long, a function pointer or an object pointer, 
-all depending on what the specific option expects.
-\end{quote}
-
-Lets code a simple example:
-
-\begin{verbatim}
-CURL *handle = curl_easy_init();
-if(handle == NULL) {
-   //something went wrong.
-}
-
-CURLcode code = curl_easy_setopt(handle, 
-   CURLOPT_URL, ``http://www.example.com'');
-if(code != CURLE_OK) {
-   //something went wrong
-}
-\end{verbatim}
-The code below does the same thing but with \verb+cURLpp+:
-
-\begin{verbatim}
-cURLpp::Easy handle;
-handle.setOpt(cURLpp::Options::Url(``http://www.example.com'');
-\end{verbatim}
-
-If a problem occur, \verb+cURLpp+ will throw an exception, for more detail on this subject,
-see the next section named \textit{Exception issues}. As you see, the equivalent
-of the \verb+curl_easy_setopt+ function is the cURLpp::Easy::setOpt member function.
-
-\subsubsection{cURLpp::Options}
-
-The question that you might ask you at this moment is: ``what exactly is the 
-\verb+cURLpp::Options::Url+ class mentioned in the previous example?'' In fact, 
-this class is used to store values of options, but also to retrieve them, as shown
-below:
-
-\begin{verbatim}
-cURLpp::Easy handle;
-handle.setOpt(cURLpp::Options::Url(``http://www.example.com'');
-
-cURLpp::Options::Url myUrl;
-handle.getOpt(myUrl);
-std::cout << myUrl.getValue() << std::endl;
-\end{verbatim}
-
-This piece of code should print the URL on the standard output. Here's the
-code of the \verb+examples/example01.cpp+ file.
-
-\begin{verbatim}
-#include <string>
-#include <iostream>
-
-#include <curlpp/cURLpp.hpp>
-#include <curlpp/Options.hpp>
-
-#define MY_PORT 8080
-
-/** 
- * This example is made to show you how you can use the Options.
- */
-int main()
-{
-  try
-    {
-      cURLpp::Cleanup myCleanup;
-
-      // Creation of the URL option.
-      cURLpp::Options::Url myUrl(
-        std::string("http://example.com"));
-      
-      // Copy construct from the other URL.
-      cURLpp::Options::Url myUrl2(myUrl);
-
-      // Creation of the port option.
-      cURLpp::Options::Port myPort(MY_PORT);
-
-      // Creation of the request.
-      cURLpp::Easy myRequest;
-
-
-      // Creation of an option that contain a copy 
-      // of the URL option.
-      cURLpp::OptionBase *mytest = myUrl.clone();
-      myRequest.setOpt(*mytest);
-
-      // You can reuse the base option for other type of option
-      // and set the option to the request. but first, don't forget 
-      // to delete the previous memory. You can delete it since the 
-      // option is internally duplicated for the request.
-      delete mytest;
-      mytest = myPort.clone();
-      myRequest.setOpt(*mytest);
-      delete mytest;
-
-      // You can clone an option directly to the same type of 
-      // option.
-      cURLpp::Options::Url *myUrl3 = myUrl.clone();
-      myRequest.setOpt(myUrl3);
-      // Now myUrl3 is owned by the request we will NOT use 
-      // it anymore.
-
-
-      // You don't need to declare an option if you just want 
-      // to use it once.
-      myRequest.setOpt(cURLpp::Options::Url("example.com"));
-
-
-      // Note that the previous line wasn't really efficient
-      // because we create the option, this option is duplicated
-      // for the request and then the option destructor is called.
-      // You can use this instead:
-      myRequest.setOpt(new cURLpp::Options::Url("example.com"));
-      // Note that with this the request will use directly this
-      // instance we just created. Be aware that if you pass an
-      // Option pointer to the setOpt function, it will consider
-      // the instance has its own instance. The Option instance
-      // will be deleted when the request will be deleted, so
-      // don't use the instance further in your code.
-
-
-      // Doing the previous line is efficient as this:
-      myRequest.setOpt(myUrl.clone());
-
-      
-      // You can retrieve the value of a specific option.
-      std::cout << myUrl2.getValue() << std::endl;
-
-
-      // You can see what are the options set for a request
-      // with this function. This function will print the option
-      // to the stdout.
-      myRequest.print();
-    
-      // Perform the transaction with the options set.
-      myRequest.perform();
-    }
-  catch( cURLpp::RuntimeError &e )
-    {
-      std::cout << e.what() << std::endl;
-    }
-  catch( cURLpp::LogicError &e )
-    {
-      std::cout << e.what() << std::endl;
-    }
-    
-  return 0;
-}
-\end{verbatim}
-
-
-
-\subsection{cURLpp::Option types}
-This section will explain the use of the types that we use for 
-some options that differ from types that libcurl uses for the
-same option.
-
-\subsubsection{The bool type}
-A true value is binded to a non-zero long value, a false value
-is binded to a zero long value.
-
-\subsubsection{The std::string type}
-The \verb+std::string::c_str()+ function is passed to libcurl.
-
-\subsubsection{The std::list template of std::string type}
-This type is used when libcurl's option need a \verb+curl_slist+. Instead of
-using this homemade struct, cURLpp allow you to use a known type, the 
-\verb+std::list+. cURLpp this transform internally the \verb+std::list+
-to a \verb+curl_slist+.
-
-\subsection{cURLpp::Options}
-This section just list how each libcurl's option is binded by cURLpp.
-Some options might not be there, if it's the case and you want to use them,
-see the ``how to enhance cURLpp'' section.
-
-\subsubsection{Behavior options}
-\begin{verbatim}
-      typedef cURLpp::OptionTrait< bool, 
-        CURLOPT_VERBOSE > Verbose;
-      typedef cURLpp::OptionTrait< bool, 
-        CURLOPT_HEADER > Header;
-      typedef cURLpp::OptionTrait< bool, 
-        CURLOPT_NOSIGNAL > NoSignal;
-      typedef cURLpp::OptionTrait< bool, 
-        CURLOPT_NOPROGRESS > NoProgress;
-\end{verbatim}
-
-\subsubsection{Callback options}
-\begin{verbatim}
-      typedef cURLpp::OptionTrait< cURL::curl_write_callback,
-        CURLOPT_WRITEFUNCTION > WriteFunction;
-      typedef cURLpp::OptionTrait< void *, 
-        CURLOPT_WRITEDATA > WriteData;
-      typedef cURLpp::OptionTrait< cURL::curl_read_callback, 
-        CURLOPT_READFUNCTION > ReadFunction;
-      typedef cURLpp::OptionTrait< void *, 
-        CURLOPT_READDATA > ReadData;
-      typedef cURLpp::OptionTrait< cURL::curl_progress_callback, 
-        CURLOPT_PROGRESSFUNCTION > ProgressFunction;
-      typedef cURLpp::OptionTrait< void *, 
-        CURLOPT_PROGRESSDATA > ProgressData;
-      typedef cURLpp::OptionTrait< cURL::curl_write_callback, 
-        CURLOPT_HEADERFUNCTION > HeaderFunction;
-      typedef cURLpp::OptionTrait< void *, 
-        CURLOPT_HEADERDATA > HeaderData;
-      typedef cURLpp::OptionTrait< cURL::curl_debug_callback, 
-        CURLOPT_DEBUGFUNCTION > DebugFunction;
-      typedef cURLpp::OptionTrait< void *, 
-        CURLOPT_DEBUGDATA > DebugData;
-#ifdef CURLOPT_SSL_CTX_FUNCTION
-      typedef cURLpp::OptionTrait< cURL::curl_ssl_ctx_callback, 
-        CURLOPT_SSL_CTX_FUNCTION > SslCtxFunction;
-      typedef cURLpp::OptionTrait< void *, 
-        cURL::CURLOPT_SSL_CTX_DATA > SslCtxData;
-#endif
-\end{verbatim}
-
-\subsubsection{Error options}
-\begin{verbatim}
-      typedef cURLpp::OptionTrait< char *, 
-        cURL::CURLOPT_ERRORBUFFER > ErrorBuffer;
-      typedef cURLpp::OptionTrait< FILE *, 
-        cURL::CURLOPT_STDERR > StdErr;
-      typedef cURLpp::OptionTrait< bool, 
-        cURL::CURLOPT_FAILONERROR > FailOnError;
-\end{verbatim}
-
-\subsubsection{Network options}
-\begin{verbatim}
-      typedef cURLpp::OptionTrait< std::string, 
-        cURL::CURLOPT_URL > Url;
-      typedef cURLpp::OptionTrait< std::string, 
-        cURL::CURLOPT_PROXY > Proxy;
-      typedef cURLpp::OptionTrait< long, 
-        cURL::CURLOPT_PROXYPORT > ProxyPort;
-      typedef cURLpp::OptionTrait< curl_proxytype, 
-        cURL::CURLOPT_PROXYTYPE > ProxyType;
-      typedef cURLpp::OptionTrait< bool, 
-        cURL::CURLOPT_HTTPPROXYTUNNEL > HttpProxyTunnel;
-      typedef cURLpp::OptionTrait< std::string, 
-        cURL::CURLOPT_INTERFACE > Interface;
-      typedef cURLpp::OptionTrait< long, 
-        cURL::CURLOPT_DNS_CACHE_TIMEOUT > DnsCacheTimeout;
-      typedef cURLpp::OptionTrait< bool, 
-        cURL::CURLOPT_DNS_USE_GLOBAL_CACHE > DnsUseGlobalCache;
-      typedef cURLpp::OptionTrait< long, 
-        cURL::CURLOPT_BUFFERSIZE > BufferSize;
-      typedef cURLpp::OptionTrait< long, 
-        cURL::CURLOPT_PORT > Port;
-#ifdef cURL::CURLOPT_TCP_NODELAY
-      typedef cURLpp::OptionTrait< bool, 
-        cURL::CURLOPT_TCP_NODELAY > TcpNoDelay;
-#endif
-\end{verbatim}
-
-
-\subsubsection{Names and passwords options}
-\begin{verbatim}
-      typedef cURLpp::OptionTrait< long, 
-        cURL::CURLOPT_NETRC > Netrc;
-#ifdef cURL::CURLOPT_NETRC_FILE
-      typedef cURLpp::OptionTrait< std::string, 
-        cURL::CURLOPT_NETRC_FILE > NetrcFile;
-#endif
-      typedef cURLpp::OptionTrait< std::string, 
-        cURL::CURLOPT_USERPWD > UserPwd;
-      typedef cURLpp::OptionTrait< std::string, 
-        cURL::CURLOPT_PROXYUSERPWD > ProxyUserPwd;
-      typedef cURLpp::OptionTrait< long, 
-        cURL::CURLOPT_HTTPAUTH > HttpAuth;
-      typedef cURLpp::OptionTrait< long, 
-        cURL::CURLOPT_PROXYAUTH > ProxyAuth;
-\end{verbatim}
-
-\subsubsection{HTTP options}
-\begin{verbatim}
-      typedef cURLpp::OptionTrait< bool, 
-        cURL::CURLOPT_AUTOREFERER > AutoReferer;
-      typedef cURLpp::OptionTrait< std::string, 
-        cURL::CURLOPT_ENCODING > Encoding;
-      typedef cURLpp::OptionTrait< bool, 
-        cURL::CURLOPT_FOLLOWLOCATION > FollowLocation;
-#ifdef cURL::CURLOPT_UNRESTRICTED_AUTH
-      typedef cURLpp::OptionTrait< bool, 
-        cURL::CURLOPT_UNRESTRICTED_AUTH > UnrestrictedAuth;
-#endif
-      typedef cURLpp::OptionTrait< long, 
-        cURL::CURLOPT_MAXREDIRS > MaxRedirs;
-#ifndef cURL::CURLOPT_UPLOAD
-      typedef cURLpp::OptionTrait< bool, 
-        cURL::CURLOPT_PUT > Put;
-#else
-      typedef cURLpp::OptionTrait< bool, 
-        cURL::CURLOPT_UPLOAD > Put;
-#endif
-      typedef cURLpp::OptionTrait< bool, 
-        cURL::CURLOPT_POST > Post;
-      typedef cURLpp::OptionTrait< std::string, 
-        cURL::CURLOPT_POSTFIELDS > PostFields;
-      typedef cURLpp::OptionTrait< std::string, 
-        cURL::CURLOPT_POSTFIELDSIZE > PostFieldSize;
-#ifdef cURL::CURLOPT_POSTFIELDSIZE_LARGE
-      typedef cURLpp::OptionTrait< std::string, 
-        cURL::CURLOPT_POSTFIELDSIZE_LARGE > PostFieldSizeLarge;
-#endif
-      typedef cURLpp::OptionTrait< struct cURLpp::cURL::HttpPost *, 
-        cURL::CURLOPT_HTTPPOST > HttpPost;
-      typedef cURLpp::OptionTrait< std::string, 
-        cURL::CURLOPT_REFERER > Referer;
-      typedef cURLpp::OptionTrait< std::string, 
-        cURL::CURLOPT_USERAGENT > UserAgent;
-      typedef cURLpp::OptionTrait< std::list< std::string >, 
-        cURL::CURLOPT_HTTPHEADER > HttpHeader;
-      typedef cURLpp::OptionTrait< std::list< std::string >, 
-        cURL::CURLOPT_HTTP200ALIASES > Http200Aliases;
-      typedef cURLpp::OptionTrait< std::string, 
-        cURL::CURLOPT_COOKIE > Cookie;
-      typedef cURLpp::OptionTrait< std::string, 
-        cURL::CURLOPT_COOKIEFILE > CookieFile;
-      typedef cURLpp::OptionTrait< std::string, 
-        cURL::CURLOPT_COOKIEJAR > CookieJar;
-      typedef cURLpp::OptionTrait< std::string, 
-        cURL::CURLOPT_COOKIESESSION > CookieSession;
-      typedef cURLpp::OptionTrait< std::string, 
-        cURL::CURLOPT_HTTPGET > HttpGet;
-      typedef cURLpp::OptionTrait< long, 
-        cURL::CURLOPT_HTTP_VERSION > HttpVersion;
-\end{verbatim}
-
-\subsubsection{FTP options}
-\begin{verbatim}
-      typedef cURLpp::OptionTrait< std::string, 
-        cURL::CURLOPT_FTPPORT > FtpPort;
-      typedef cURLpp::OptionTrait< long, 
-        cURL::CURLOPT_QUOTE > Quote;
-      typedef cURLpp::OptionTrait< long, 
-        cURL::CURLOPT_POSTQUOTE > PostQuote;
-      typedef cURLpp::OptionTrait< long, 
-        cURL::CURLOPT_PREQUOTE > PreQuote;
-      typedef cURLpp::OptionTrait< bool, 
-        cURL::CURLOPT_FTPLISTONLY > FtpListOnly;
-      typedef cURLpp::OptionTrait< bool, 
-        cURL::CURLOPT_FTPAPPEND > FtpAppend;
-      typedef cURLpp::OptionTrait< bool, 
-        cURL::CURLOPT_FTP_USE_EPSV > FtpUseEpsv;
-#ifdef cURL::CURLOPT_FTP_CREATE_MISSING_DIRS
-      typedef cURLpp::OptionTrait< bool, 
-        cURL::CURLOPT_FTP_CREATE_MISSING_DIRS > FtpCreateMissingDirs;
-#endif
-#ifdef cURL::CURLOPT_FTP_RESPONSE_TIMEOUT
-      typedef cURLpp::OptionTrait< bool, 
-        cURL::CURLOPT_FTP_RESPONSE_TIMEOUT > FtpResponseTimeout;
-#endif
-#ifdef cURL::CURLOPT_FTP_SSL
-      typedef cURLpp::OptionTrait< cURLpp::curl_ftpssl, 
-        cURL::CURLOPT_FTP_SSL > FtpSsl;
-#endif
-#ifdef cURL::CURLOPT_FTP_AUTH
-      typedef cURLpp::OptionTrait< cURLpp::curl_ftpauth, 
-        cURL::CURLOPT_FTP_AUTH > FtpAuth;
-#endif
-\end{verbatim}      
-
-\subsubsection{Protocol options}
-\begin{verbatim}
-      typedef cURLpp::OptionTrait< bool, 
-        cURL::CURLOPT_TRANSFERTEXT > TransferText;
-      typedef cURLpp::OptionTrait< bool, 
-        cURL::CURLOPT_CRLF > Crlf;
-      typedef cURLpp::OptionTrait< std::string, 
-        cURL::CURLOPT_RANGE > Range;
-      typedef cURLpp::OptionTrait< long, 
-        cURL::CURLOPT_RESUME_FROM > ResumeFrom;
-#ifdef cURL::CURLOPT_RESUME_FROM_LARGE
-      typedef cURLpp::OptionTrait< curl_off_t, 
-        cURL::CURLOPT_RESUME_FROM_LARGE > ResumeFromLarge;
-#endif
-      typedef cURLpp::OptionTrait< std::string, 
-        cURL::CURLOPT_CUSTOMREQUEST > CustomRequest;
-      typedef cURLpp::OptionTrait< bool, 
-        cURL::CURLOPT_FILETIME > FileTime;
-      typedef cURLpp::OptionTrait< bool, 
-        cURL::CURLOPT_NOBODY > NoBody;
-      typedef cURLpp::OptionTrait< long, 
-        cURL::CURLOPT_INFILESIZE > InfileSize;
-#ifdef cURL::CURLOPT_INFILESIZE_LARGE
-      typedef cURLpp::OptionTrait< cURL::curl_off_t, 
-        cURL::CURLOPT_INFILESIZE_LARGE > InfileSizeLarge;
-#endif
-#ifdef cURL::CURLOPT_UPLOAD
-      typedef cURLpp::OptionTrait< bool, 
-        cURL::CURLOPT_UPLOAD > Upload;
-#else
-      typedef cURLpp::OptionTrait< bool, 
-        cURL::CURLOPT_PUT > Upload;
-#endif
-#ifdef cURL::CURLOPT_MAXFILESIZE
-      typedef cURLpp::OptionTrait< long, 
-        cURL::CURLOPT_MAXFILESIZE > MaxFileSize;
-#endif
-#ifdef cURL::CURLOPT_MAXFILESIZE_LARGE
-      typedef cURLpp::OptionTrait< cURL::curl_off_t, 
-        cURL::CURLOPT_MAXFILESIZE_LARGE > MaxFileSizeLarge;
-#endif
-      typedef cURLpp::OptionTrait< bool, 
-        cURL::CURLOPT_TIMECONDITION > TimeCondition;
-      typedef cURLpp::OptionTrait< bool, 
-        cURL::CURLOPT_TIMECONDITION > TimeValue;
-\end{verbatim}
-
-\subsubsection{Connection options}
-\begin{verbatim}       
-      typedef cURLpp::OptionTrait< long, 
-        cURL::CURLOPT_TIMEOUT > Timeout;
-      typedef cURLpp::OptionTrait< long, 
-        cURL::CURLOPT_LOW_SPEED_LIMIT > LowSpeedLimit;
-      typedef cURLpp::OptionTrait< long, 
-        cURL::CURLOPT_LOW_SPEED_TIME > LowSpeedTime;
-      typedef cURLpp::OptionTrait< long, 
-        cURL::CURLOPT_MAXCONNECTS > MaxConnects;
-      typedef cURLpp::OptionTrait< cURL::curl_closepolicy, 
-        cURL::CURLOPT_CLOSEPOLICY > ClosePolicy;
-      typedef cURLpp::OptionTrait< bool, 
-        cURL::CURLOPT_FRESH_CONNECT > FreshConnect;
-      typedef cURLpp::OptionTrait< bool, 
-        cURL::CURLOPT_FORBID_REUSE > ForbidReuse;
-      typedef cURLpp::OptionTrait< long, 
-        cURL::CURLOPT_CONNECTTIMEOUT > ConnectTimeout;
-#ifdef cURL::CURLOPT_IPRESOLVE
-      typedef cURLpp::OptionTrait< long, 
-        cURL::CURLOPT_IPRESOLVE > IpResolve;
-#endif
-\end{verbatim}
-
-\subsubsection{SSL and security options}
-\begin{verbatim}       
-      typedef cURLpp::OptionTrait< std::string, 
-        cURL::CURLOPT_SSLCERT > SslCert;
-      typedef cURLpp::OptionTrait< std::string, 
-        cURL::CURLOPT_SSLCERTTYPE > SslCertType;
-      typedef cURLpp::OptionTrait< std::string, 
-        cURL::CURLOPT_SSLCERTPASSWD > SslCertPasswd;
-      typedef cURLpp::OptionTrait< std::string, 
-        cURL::CURLOPT_SSLKEY > SslKey;
-      typedef cURLpp::OptionTrait< std::string, 
-        cURL::CURLOPT_SSLKEYTYPE > SslKeyType;
-      typedef cURLpp::OptionTrait< std::string, 
-        cURL::CURLOPT_SSLKEYPASSWD > SslKeyPasswd;
-      typedef cURLpp::OptionTrait< std::string, 
-        cURL::CURLOPT_SSLENGINE > SslEngine;
-      typedef cURLpp::OptionTrait< long, 
-        cURL::CURLOPT_SSLVERSION > SslVersion;
-      typedef cURLpp::OptionTrait< bool, 
-        cURL::CURLOPT_SSL_VERIFYPEER > SslVerifyPeer;
-      typedef cURLpp::OptionTrait< std::string, 
-        cURL::CURLOPT_CAINFO > CaInfo;
-      typedef cURLpp::OptionTrait< std::string, 
-        cURL::CURLOPT_CAPATH > CaPath;
-      typedef cURLpp::OptionTrait< std::string, 
-        cURL::CURLOPT_RANDOM_FILE > RandomFile;
-      typedef cURLpp::OptionTrait< std::string, 
-        cURL::CURLOPT_EGDSOCKET > EgdSocket;
-      typedef cURLpp::OptionTrait< long, 
-        cURL::CURLOPT_SSL_VERIFYHOST > SslVerifyHost;
-      typedef cURLpp::OptionTrait< std::string, 
-        cURL::CURLOPT_SSL_CIPHER_LIST > SslCipherList;
-      typedef cURLpp::OptionTrait< std::string, 
-        cURL::CURLOPT_KRB4LEVEL > Krb4Level;
-\end{verbatim}
-
-\subsubsection{Others options}
-\begin{verbatim}
-      typedef cURLpp::OptionTrait< std::string, 
-        cURL::CURLOPT_KRB4LEVEL > Krb4Level;
-\end{verbatim}
-
-
-\section{How the enhance cURLpp}
-Need to be written.
-
-\section{Exceptions issues}
-
-As previously said, cURLpp (libcurl in fact) offer the possibility to reimplement the data 
-writing/reading functions. Those functions called from within libcurl might 
-raise exceptions. Raising an exception in C code might cause problems. cURLpp
-protect you from doing so\footnote{This feature will be added only in the 
-0.6.0 version}. All exceptions are caught by cURLpp before they could
-cause damage to libcurl. If you want to raise an exception within traits, you need
-to do this:
-
-\begin{verbatim}
- cURLpp::raiseException(MyException(``Exception Raised'');
-\end{verbatim}
-
-Then, the \verb+cURLpp::Easy::perform()+ will raise your exception at the end of 
-the process. If an exception is raised but not by this mechanism, a 
-\verb+cURLpp::UnknownExceptionError+ will be raised.
-
-
-
-\end{document}

+ 0 - 26
thirdparty/curlpp/examples/CMakeLists.txt

@@ -1,26 +0,0 @@
-cmake_minimum_required(VERSION 3.0)
-include(FindPkgConfig)
-pkg_check_modules(CURLPP REQUIRED curlpp)
-
-set(CMAKE_CXX_STANDARD 11) # C++11...
-set(CMAKE_CXX_STANDARD_REQUIRED ON) #...is required...
-set(CMAKE_CXX_EXTENSIONS OFF) #...without compiler extensions like gnu++11
-
-
-file(GLOB ExamplesFileList "*.cpp")
-
-# Create a meta target to create examples
-add_custom_target(build_all_examples COMMENT A target that requires all the examples.)
-
-message(STATUS "Creating build rules for Examples:")
-foreach(Example ${ExamplesFileList})
-  message(STATUS "\tCreating build rule for ${Example}")
-  # Get the name without extension or directory
-  get_filename_component(ExampleName ${Example} NAME_WE)
-  # Define example executable
-  add_executable(${ExampleName} ${Example})
-  # Link example against curlpp
-  target_link_libraries(${ExampleName} ${CURLPP_LDFLAGS})
-  # make the meta target depend on this example.
-  add_dependencies(build_all_examples ${ExampleName})
-endforeach(Example ${ExamplesFileList})

+ 0 - 36
thirdparty/curlpp/examples/README

@@ -1,36 +0,0 @@
-configure.in is a good example to add curlpp to your project
-
-Note that example 22 is contains the easiest and shorter examples of cURLpp 
-usage.
-
- Example 01: This example is made to show you how you can use the Options.
- Example 02: an upload example.
- Example 03: verbose callback example.
- Example 04: GetInfo example.
- Example 05: Function functor for WriteFunction example.
- Example 06: Method functor for WriteFunction example.
- Example 07: Cookie interface example via getInfo.
-             Demonstrates usage of Infos::CookieList which example04 did not.
- Example 08: verbose callback example, with exception safe handling.
- Example 09: verbose callback example, with exception safe handling, 
-             but without raiseException function.
- Example 10: Binded function functor for WriteFunction example.
- Example 11: Plain write function example.
- Example 12: HTTP POST example.
- Example 13: Simple Multi interface example.
- Example 14: Multi interface example with info function example.
- Example 15: Simple example for demonstrating the NoValueOptionTrait. 
-             (SslEngineDefault)
- Example 16: HTTP POST example with HTTP Authentification.
- Example 17: Binded method functor for WriteFunction example.
- Example 18: No longer available. This used to be a boost usage example, but it's no longer relevant since c++11.
- Example 19: Multipart/formdata HTTP POST example.
- Example 20: std::ostream usage.
- Example 21: upload example with std::istream.
- Example 22: Real easy and quick examples.
- Example 23: Setting request options using iterators to custom container 
-             of curlpp options.
- Example 24: Binded method functor for DebugFunction example.
-
-
-

+ 0 - 43
thirdparty/curlpp/examples/example00.cpp

@@ -1,43 +0,0 @@
-/**
-* \file
-* The most simple example.
-* 
-*/
-
-#include <curlpp/cURLpp.hpp>
-#include <curlpp/Easy.hpp>
-#include <curlpp/Options.hpp>
-
-
-using namespace curlpp::options;
-
-int main(int, char **)
-{
-	try
-	{
-		// That's all that is needed to do cleanup of used resources (RAII style).
-		curlpp::Cleanup myCleanup;
-
-		// Our request to be sent.
-		curlpp::Easy myRequest;
-
-		// Set the URL.
-		myRequest.setOpt<Url>("http://example.com");
-
-		// Send request and get a result.
-		// By default the result goes to standard output.
-		myRequest.perform();
-	}
-
-	catch(curlpp::RuntimeError & e)
-	{
-		std::cout << e.what() << std::endl;
-	}
-
-	catch(curlpp::LogicError & e)
-	{
-		std::cout << e.what() << std::endl;
-	}
-    
-  return 0;
-}

+ 0 - 171
thirdparty/curlpp/examples/example01.cpp

@@ -1,171 +0,0 @@
-/*
- *    Copyright (c) <2002-2005> <Jean-Philippe Barrette-LaPierre>
- *    
- *    Permission is hereby granted, free of charge, to any person obtaining
- *    a copy of this software and associated documentation files 
- *    (curlpp), to deal in the Software without restriction, 
- *    including without limitation the rights to use, copy, modify, merge,
- *    publish, distribute, sublicense, and/or sell copies of the Software,
- *    and to permit persons to whom the Software is furnished to do so, 
- *    subject to the following conditions:
- *    
- *    The above copyright notice and this permission notice shall be included
- *    in all copies or substantial portions of the Software.
- *    
- *    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- *    OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 
- *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
- *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
- *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/**
-* \file
-* Setting and copying options.
-* 
-*/
-
-
-#include <string>
-#include <sstream>
-#include <iostream>
-
-#include <curlpp/cURLpp.hpp>
-#include <curlpp/Easy.hpp>
-#include <curlpp/Options.hpp>
-
-
-namespace
-{
-const long MyPort = 80;
-}
-
-/** 
- * This example is made to show you how you can use the Options.
- */
-int main(int, char **)
-{
-	try
-	{
-		curlpp::Cleanup myCleanup;
-
-		// First easy example.
-		{
-		  // The first easiest example is to retreive the content of
-		  // a web page and put it in a stream.
-		  std::cout << curlpp::options::Url("http://example.com");
-
-		  // You don't need to use just the standard outputs. You
-		  // can use any stream:
-		  std::ostringstream os;
-		  os << curlpp::options::Url("http://example.com");
-		}
-
-		// More elaborate example.
-		{
-		  // What the previous example done there was simply 
-		  // to create a curlpp::Easy class, which is the basic
-		  // object in cURLpp, and then set the Url option.
-		  // curlpp::options classes are the primitives that allow to specify 
-		  // values to the requests. 
-		  curlpp::options::Url myUrl(std::string("http://example.com"));
-		  curlpp::Easy myRequest;
-		  myRequest.setOpt(myUrl);
-
-		  // Now that all the options we wanted to set are there, we need to
-		  // actually do the request. the "perform" method does actually that.
-		  // With that call, the request will be done and the content of that URL
-		  // will be printed in std::cout (which is the default).
-		  myRequest.perform();
-
-		  // If we wanted to put the content of the URL within a string stream
-		  // (or any type of std::ostream, for that matter), like the first example, 
-		  // we would use the WriteStrem option like this:
-		  std::ostringstream os;
-		  curlpp::options::WriteStream ws(&os);
-		  myRequest.setOpt(ws);
-		  myRequest.perform();
-
-		  // There is some shorcut within curlpp that allow you to write shorter code
-		  // like this:
-		  os << myRequest;
-
-		  // That would do exactly what the previous code was doing.
-		}
-
-		// Creation of the URL option.
-		curlpp::options::Url myUrl(std::string("http://example.com"));
-
-		// Copy construct from the other URL.
-		curlpp::options::Url myUrl2(myUrl);
-
-		// Creation of the port option.
-		curlpp::options::Port myPort(MyPort);
-
-		// Creation of the request.
-		curlpp::Easy myRequest;
-
-		// Creation of an option that contain a copy of the URL option.
-		curlpp::OptionBase *mytest = myUrl.clone();
-		myRequest.setOpt(*mytest);
-
-		// You can reuse the base option for other type of option
-		// and set the option to the request. but first, don't forget 
-		// to delete the previous memory. You can delete it since the 
-		// option is internally duplicated for the request.
-		delete mytest;
-		mytest = myPort.clone();
-		myRequest.setOpt(*mytest);
-		delete mytest;
-
-		// You can clone an option directly to the same type of 
-		// option.
-		curlpp::options::Url *myUrl3 = myUrl.clone();
-		myRequest.setOpt(myUrl3);
-		// Now myUrl3 is owned by the request we will NOT use 
-		// it anymore.
-
-
-		// You don't need to declare an option if you just want 
-		// to use it once.
-		myRequest.setOpt(curlpp::options::Url("example.com"));
-
-
-		// Note that the previous line wasn't really efficient
-		// because we create the option, this option is duplicated
-		// for the request and then the option destructor is called.
-		// You can use this instead:
-		myRequest.setOpt(new curlpp::options::Url("example.com"));
-		// Note that with this the request will use directly this
-		// instance we just created. Be aware that if you pass an
-		// Option pointer to the setOpt function, it will consider
-		// the instance has its own instance. The Option instance
-		// will be deleted when the request will be deleted, so
-		// don't use the instance further in your code.
-
-
-		// Doing the previous line is efficient as this:
-		myRequest.setOpt(myUrl.clone());
-
-
-		// You can retreive the value of a specific option.
-		std::cout << myUrl2.getValue() << std::endl;
-
-		// Perform the transaction with the options set.
-		myRequest.perform();
-	}
-
-	catch( curlpp::RuntimeError &e )
-	{
-		std::cout << e.what() << std::endl;
-	}
-
-	catch( curlpp::LogicError &e )
-	{
-		std::cout << e.what() << std::endl;
-	}
-    
-  return 0;
-}

+ 0 - 104
thirdparty/curlpp/examples/example02.cpp

@@ -1,104 +0,0 @@
-/*
-*    Copyright (c) <2002-2005> <Jean-Philippe Barrette-LaPierre>
-*    
-*    Permission is hereby granted, free of charge, to any person obtaining
-*    a copy of this software and associated documentation files 
-*    (curlpp), to deal in the Software without restriction, 
-*    including without limitation the rights to use, copy, modify, merge,
-*    publish, distribute, sublicense, and/or sell copies of the Software,
-*    and to permit persons to whom the Software is furnished to do so, 
-*    subject to the following conditions:
-*    
-*    The above copyright notice and this permission notice shall be included
-*    in all copies or substantial portions of the Software.
-*    
-*    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-*    OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-*    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 
-*    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
-*    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
-*    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-*    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-*/
-
-/**
-* \file
-* Uploading of string.
-* ReadFunction option using functor.
-* Setting custom headers.
-*/
-
-
-#include <cstdlib>
-#include <cstdio>
-#include <cstring>
-
-#include <curlpp/cURLpp.hpp>
-#include <curlpp/Easy.hpp>
-#include <curlpp/Options.hpp>
-#include <curlpp/Exception.hpp>
- 
-/*
-   anonymous namespace to prevent name clash in case other examples using the same global entities
-   would be compiled in the same project
-*/
-namespace
-{
-
-char *data = NULL;
-
-size_t readData(char *buffer, size_t size, size_t nitems)
-{
-	strncpy(buffer, data, size * nitems);
-	return size * nitems;
-}
-
-} // namespace
-
-int main(int argc, char *argv[])
-{
-	if(argc != 3)
-	{
-		std::cerr << "Example 2: Missing argument" << std::endl 
-							<< "Example 2: Usage: example02 url string-to-send" 
-							<< std::endl;
-		return EXIT_FAILURE;
-	}
-
-	char *url = argv[1];
-	data = argv[2];
-	int size = strlen(data);
-
-	char buf[50];
-	try
-	{
-		curlpp::Cleanup cleaner;
-		curlpp::Easy request;
-
-		std::list<std::string> headers;
-		headers.push_back("Content-Type: text/*"); 
-		sprintf(buf, "Content-Length: %d", size); 
-		headers.push_back(buf);
-
-		using namespace curlpp::Options;
-		request.setOpt(new Verbose(true));
-		request.setOpt(new ReadFunction(curlpp::types::ReadFunctionFunctor(readData)));
-		request.setOpt(new InfileSize(size));
-		request.setOpt(new Upload(true));
-		request.setOpt(new HttpHeader(headers));
-		request.setOpt(new Url(url));
-
-		request.perform();
-	}
-	catch (curlpp::LogicError & e)
-	{
-		std::cout << e.what() << std::endl;
-	}
-	catch (curlpp::RuntimeError & e)
-	{
-		std::cout << e.what() << std::endl;
-	}
-
-	return 0;
-}
-

+ 0 - 88
thirdparty/curlpp/examples/example03.cpp

@@ -1,88 +0,0 @@
-/*
-*    Copyright (c) <2002-2005> <Jean-Philippe Barrette-LaPierre>
-*    
-*    Permission is hereby granted, free of charge, to any person obtaining
-*    a copy of this software and associated documentation files 
-*    (curlpp), to deal in the Software without restriction, 
-*    including without limitation the rights to use, copy, modify, merge,
-*    publish, distribute, sublicense, and/or sell copies of the Software,
-*    and to permit persons to whom the Software is furnished to do so, 
-*    subject to the following conditions:
-*    
-*    The above copyright notice and this permission notice shall be included
-*    in all copies or substantial portions of the Software.
-*    
-*    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-*    OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-*    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 
-*    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
-*    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
-*    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-*    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-*/
-
-/**
-* \file
-* DebugFunction option using functor as a callback.
-*/
-
-
-#include <cstdlib>
-
-#include <curlpp/cURLpp.hpp>
-#include <curlpp/Easy.hpp>
-#include <curlpp/Options.hpp>
-#include <curlpp/Exception.hpp>
-
-class MyWindow
-{
-public:
-	int writeDebug(curl_infotype, char *data, size_t size)
-	{
-		fprintf(stderr, "Debug: ");
-		fwrite(data, size, 1, stderr);
-		return size;
-	}
-};
-
-int main(int argc, char *argv[])
-{
-
-	if(argc != 2)
-	{
-		std::cerr	<< "Example 3: Wrong number of arguments" << std::endl 
-							<< "Example 3: Usage: example3 url" 
-							<< std::endl;
-		return EXIT_FAILURE;
-	}
-	char *url = argv[1];
-
-	MyWindow myWindow;
-
-	try 
-	{
-		curlpp::Cleanup cleaner;
-		curlpp::Easy request;
-
-		using namespace curlpp::Options;
-		request.setOpt(Verbose(true));
-		using namespace std::placeholders;
-		request.setOpt(DebugFunction(std::bind(&MyWindow::writeDebug, &myWindow, _1, _2, _3)));
-		request.setOpt(Url(url));
-
-		request.perform();
-	}
-
-	catch ( curlpp::LogicError & e ) 
-	{
-		std::cout << e.what() << std::endl;
-	}
-
-	catch ( curlpp::RuntimeError & e )
-	{
-		std::cout << e.what() << std::endl;
-	}
-
-	return 0;
-}
-

+ 0 - 89
thirdparty/curlpp/examples/example04.cpp

@@ -1,89 +0,0 @@
-/*
- *    Copyright (c) <2002-2005> <Jean-Philippe Barrette-LaPierre>
- *    
- *    Permission is hereby granted, free of charge, to any person obtaining
- *    a copy of this software and associated documentation files 
- *    (curlpp), to deal in the Software without restriction, 
- *    including without limitation the rights to use, copy, modify, merge,
- *    publish, distribute, sublicense, and/or sell copies of the Software,
- *    and to permit persons to whom the Software is furnished to do so, 
- *    subject to the following conditions:
- *    
- *    The above copyright notice and this permission notice shall be included
- *    in all copies or substantial portions of the Software.
- *    
- *    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- *    OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 
- *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
- *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
- *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/**
-* \file
-* Getting options using curlpp::infos.
-* 
-*/
-
-
-#include <cstdlib>
-
-#include <curlpp/cURLpp.hpp>
-#include <curlpp/Easy.hpp>
-#include <curlpp/Options.hpp>
-#include <curlpp/Exception.hpp>
-#include <curlpp/Infos.hpp>
- 
-
-int main(int argc, char *argv[])
-{
-	if(argc != 2)
-	{
-		std::cerr << "Example 04: Wrong number of arguments" << std::endl 
-			<< "Example 04: Usage: example04 url" 
-			<< std::endl;
-		return EXIT_FAILURE;
-	}
-	char *url = argv[1];
-
-	try 
-	{
-		curlpp::Cleanup cleaner;
-		curlpp::Easy request;
-
-		using namespace curlpp::Options;
-		request.setOpt(Verbose(true));
-		request.setOpt(Url(url));
-
-		request.perform();
-
-		std::string effURL;
-		curlpp::infos::EffectiveUrl::get(request, effURL);
-		std::cout << "Effective URL: " << effURL << std::endl;
-
-		//other way to retreive URL
-		std::cout << std::endl 
-			<< "Effective URL: " 
-			<< curlpp::infos::EffectiveUrl::get(request)
-			<< std::endl;
-
-		std::cout << "Response code: " 
-			<< curlpp::infos::ResponseCode::get(request) 
-			<< std::endl;
-
-		std::cout << "SSL engines: " 
-			<< curlpp::infos::SslEngines::get(request)
-			<< std::endl;
-	}
-	catch ( curlpp::LogicError & e ) {
-		std::cout << e.what() << std::endl;
-	}
-	catch ( curlpp::RuntimeError & e ) {
-		std::cout << e.what() << std::endl;
-	}
-
-	return 0;
-}
-

+ 0 - 120
thirdparty/curlpp/examples/example05.cpp

@@ -1,120 +0,0 @@
-/*
- *    Copyright (c) <2002-2005> <Jean-Philippe Barrette-LaPierre>
- *    
- *    Permission is hereby granted, free of charge, to any person obtaining
- *    a copy of this software and associated documentation files 
- *    (curlpp), to deal in the Software without restriction, 
- *    including without limitation the rights to use, copy, modify, merge,
- *    publish, distribute, sublicense, and/or sell copies of the Software,
- *    and to permit persons to whom the Software is furnished to do so, 
- *    subject to the following conditions:
- *    
- *    The above copyright notice and this permission notice shall be included
- *    in all copies or substantial portions of the Software.
- *    
- *    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- *    OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 
- *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
- *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
- *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/**
-* \file
-* Write function using free function as a callback.
-* 
-*/
-
-
-#include <cstdlib>
-#include <cstring>
-
-#include <curlpp/cURLpp.hpp>
-#include <curlpp/Easy.hpp>
-#include <curlpp/Options.hpp>
-#include <curlpp/Exception.hpp>
-
-#define MAX_FILE_LENGTH 20000
-
-char *m_pBuffer = NULL;
-size_t m_Size = 0;
-
-void* Realloc(void* ptr, size_t size)
-{
-  if(ptr)
-    return realloc(ptr, size);
-  else
-    return malloc(size);
-};
-
-// Callback must be declared static, otherwise it won't link...
-size_t WriteMemoryCallback(char* ptr, size_t size, size_t nmemb)
-{
-  // Calculate the real size of the incoming buffer
-  size_t realsize = size * nmemb;
-  
-  // (Re)Allocate memory for the buffer
-  m_pBuffer = (char*) Realloc(m_pBuffer, m_Size + realsize);
-  
-  // Test if Buffer is initialized correctly & copy memory
-  if (m_pBuffer == NULL) {
-    realsize = 0;
-  }
-  
-  memcpy(&(m_pBuffer[m_Size]), ptr, realsize);
-  m_Size += realsize;
-  
-  // return the real size of the buffer...
-  return realsize;
-};
-
-
-void print() 
-{
-	std::cout << "Size: " << m_Size << std::endl;
-	std::cout << "Content: " << std::endl << m_pBuffer << std::endl;
-}
-
-
-int main(int argc, char *argv[])
-{
-	m_pBuffer = (char*) malloc(MAX_FILE_LENGTH * sizeof(char));
-
-	if(argc != 2)
-	{
-		std::cerr << "Example 05: Wrong number of arguments" << std::endl 
-			<< "Example 05: Usage: example05 url" 
-			<< std::endl;
-		return EXIT_FAILURE;
-	}
-	char *url = argv[1];
-
-	try
-	{
-		curlpp::Cleanup cleaner;
-		curlpp::Easy request;
-
-		// Set the writer callback to enable cURL 
-		// to write result in a memory area
-		curlpp::types::WriteFunctionFunctor functor(WriteMemoryCallback);
-		curlpp::options::WriteFunction *test = new curlpp::options::WriteFunction(functor);
-		request.setOpt(test);
-
-		// Setting the URL to retrive.
-		request.setOpt(new curlpp::options::Url(url));
-		request.setOpt(new curlpp::options::Verbose(true));
-		request.perform();
-
-		print();
-	}
-	catch ( curlpp::LogicError & e )
-	{
-		std::cout << e.what() << std::endl;
-	}
-	catch ( curlpp::RuntimeError & e )
-	{
-		std::cout << e.what() << std::endl;
-	}
-}

+ 0 - 144
thirdparty/curlpp/examples/example06.cpp

@@ -1,144 +0,0 @@
-/*
- *    Copyright (c) <2002-2005> <Jean-Philippe Barrette-LaPierre>
- *    
- *    Permission is hereby granted, free of charge, to any person obtaining
- *    a copy of this software and associated documentation files 
- *    (curlpp), to deal in the Software without restriction, 
- *    including without limitation the rights to use, copy, modify, merge,
- *    publish, distribute, sublicense, and/or sell copies of the Software,
- *    and to permit persons to whom the Software is furnished to do so, 
- *    subject to the following conditions:
- *    
- *    The above copyright notice and this permission notice shall be included
- *    in all copies or substantial portions of the Software.
- *    
- *    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- *    OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 
- *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
- *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
- *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/**
-* \file
-* WriteFunction option using functor as a callback.
-* 
-*/
-
-
-#include <cstdlib>
-#include <cstring>
-
-#include <curlpp/cURLpp.hpp>
-#include <curlpp/Easy.hpp>
-#include <curlpp/Options.hpp>
-#include <curlpp/Exception.hpp>
-
-#define MAX_FILE_LENGTH 20000
-
-class WriterMemoryClass
-{
-public:
-	// Helper Class for reading result from remote host
-	WriterMemoryClass()
-	{
-		this->m_pBuffer = NULL;
-		this->m_pBuffer = (char*) malloc(MAX_FILE_LENGTH * sizeof(char));
-		this->m_Size = 0;
-	};
-
-	~WriterMemoryClass()
-	{
-		if (this->m_pBuffer)
-			free(this->m_pBuffer);
-	};
-
-	void* Realloc(void* ptr, size_t size)
-	{
-		if(ptr)
-			return realloc(ptr, size);
-		else
-			return malloc(size);
-	};
-
-	// Callback must be declared static, otherwise it won't link...
-	size_t WriteMemoryCallback(char* ptr, size_t size, size_t nmemb)
-	{
-		// Calculate the real size of the incoming buffer
-		size_t realsize = size * nmemb;
-
-		// (Re)Allocate memory for the buffer
-		m_pBuffer = (char*) Realloc(m_pBuffer, m_Size + realsize);
-
-		// Test if Buffer is initialized correctly & copy memory
-		if (m_pBuffer == NULL) {
-			realsize = 0;
-		}
-
-		memcpy(&(m_pBuffer[m_Size]), ptr, realsize);
-		m_Size += realsize;
-
-
-		// return the real size of the buffer...
-		return realsize;
-	};
-
-
-	void print() 
-	{
-		std::cout << "Size: " << m_Size << std::endl;
-		std::cout << "Content: " << std::endl << m_pBuffer << std::endl;
-	}
-
-	// Public member vars
-	char* m_pBuffer;
-	size_t m_Size;
-};
-
-
-int main(int argc, char *argv[])
-{
-	if(argc != 2)
-	{
-		std::cerr << "Example 06: Wrong number of arguments" << std::endl 
-			<< "Example 06: Usage: example06 url" 
-			<< std::endl;
-		return EXIT_FAILURE;
-	}
-	char *url = argv[1];
-
-	try
-	{
-		curlpp::Cleanup cleaner;
-		curlpp::Easy request;
-
-		WriterMemoryClass mWriterChunk;
-
-		// Set the writer callback to enable cURL 
-		// to write result in a memory area
-		using namespace std::placeholders;
-		curlpp::types::WriteFunctionFunctor functor = std::bind(&WriterMemoryClass::WriteMemoryCallback, &mWriterChunk, _1, _2, _3);
-
-		curlpp::options::WriteFunction *test = new curlpp::options::WriteFunction(functor);
-		request.setOpt(test);
-
-		// Setting the URL to retrive.
-		request.setOpt(new curlpp::options::Url(url));
-		request.setOpt(new curlpp::options::Verbose(true));
-		request.perform();
-
-		mWriterChunk.print();
-	}
-	
-	catch ( curlpp::LogicError & e )
-	{
-		std::cout << e.what() << std::endl;
-	}
-	
-	catch ( curlpp::RuntimeError & e )
-	{
-		std::cout << e.what() << std::endl;
-	}
-}

+ 0 - 174
thirdparty/curlpp/examples/example07.cpp

@@ -1,174 +0,0 @@
-/**
-* \file
-* Cookies.
-* 
-*/
-
-#include <string>
-#include <sstream>
-#include <vector>
-#include <iostream>
-
-#include <cstdlib>
-#include <ctime>
-
-#include <curlpp/cURLpp.hpp>
-#include <curlpp/Easy.hpp>
-
-#define CURLPP_ALLOW_NOT_AVAILABLE
-
-#include <curlpp/Infos.hpp>
-#include <curlpp/Options.hpp>
-
-
-class YesNo
-{
-public:
-    explicit YesNo(bool yn) : yesno(yn) {}
-		std::string operator()() const {
-        return yesno ? "Yes" : "No";
-    }
-		friend std::ostream &operator<<(std::ostream &strm, const YesNo &yn) {
-        strm << yn();
-        return strm;
-    }
-private:
-    bool yesno;
-};
-
-struct MyCookie
-{
-	std::string name;
-	std::string value;
-	std::string domain;
-	std::string path;
-	time_t expires;
-	bool tail;
-	bool secure;
-};
-
-std::ostream &
-operator<<(std::ostream &strm, const MyCookie &cook)
-{
-	strm << "Cookie: '" << cook.name << "' (secure: " << YesNo(cook.secure) << ", tail: "
-		<< YesNo(cook.tail) << ") for domain: '" << cook.domain << "', "
-		<< "path: '" << cook.path << "'.\n";
-	strm << "Value: '" << cook.value << "'.\n";
-	strm << "Expires: '" << ctime(&cook.expires) << "'.\n";
-
-	return strm;
-}
-
-std::vector<std::string> &
-split_cookie_str(const std::string &str, std::vector<std::string> &in)
-{
-	std::string part;
-
-	std::istringstream strm(str);
-	while (getline(strm, part, '\t'))
-		in.push_back(part);
-
-	return in;
-}
-
-std::vector<std::string>
-splitCookieStr(const std::string &str)
-{
-	std::vector<std::string> split;
-	split_cookie_str(str, split);
-	return split;
-}
-
-std::vector<std::string> &
-splitCookieStr(const std::string &str, std::vector<std::string> &in)
-{
-	return split_cookie_str(str, in);
-}
-
-int StrToInt(const std::string &str)
-{
-	std::istringstream strm(str);
-	int i = 0;
-	if (!(strm >> i)) {
-		throw curlpp::RuntimeError("Unable to convert string '" + str + "' to integer!");
-	}
-	return i;
-}
-
-MyCookie
-MakeCookie(const std::string &str_cookie)
-{
-	std::vector<std::string> vC = splitCookieStr(str_cookie);
-	MyCookie cook;
-
-	cook.domain = vC[0];
-	cook.tail = vC[1] == "TRUE";
-	cook.path = vC[2];
-	cook.secure = vC[3] == "TRUE";
-	cook.expires = StrToInt(vC[4]);
-	cook.name = vC[5];
-	cook.value = vC[6];
-
-	return cook;
-}
-
-int
-main(void)
-{
-	try
-	{
-		curlpp::Cleanup myCleanup;
-		curlpp::Easy exEasy;
-		std::vector<std::string> cookieList;
-
-		// a cookie as in HTTP header
-		cookieList.push_back("Set-Cookie: GMAIL_AT=EXPIRED;expires=Sun, 17-Jan-2038 19:14:07 GMT; path=/; domain=.google.com");
-
-		// a Netscape style cookie with \t
-		cookieList.push_back(".google.com\tTRUE\t/\tFALSE\t2147483647\tLSID\tI like you GOOGLE");
-
-		// a Netscape style cookie with tabs in string
-		cookieList.push_back(".yahoo.com	TRUE	/	FALSE	0	YAHOO_COOKIE	I like you yahoo, too");
-
-		exEasy.setOpt(new curlpp::options::Url("http://www.google.com"));
-		exEasy.setOpt(new curlpp::options::FileTime(true));
-		exEasy.setOpt(new curlpp::options::Verbose(true));
-
-		// loop throught the cookies and add one by one
-		//
-		for (std::vector<std::string>::iterator it = cookieList.begin();
-			it != cookieList.end();
-			++it)
-		{
-			exEasy.setOpt(curlpp::options::CookieList(*it));
-		}
-		exEasy.perform();
-
-		// see what cookies we got
-		//
-		std::cout << "\nCookies from cookie engine:" << std::endl;
-		std::list<std::string> cookies;
-		curlpp::infos::CookieList::get(exEasy, cookies);
-		int i = 1;
-		for (std::list<std::string>::const_iterator it = cookies.begin();
-			it != cookies.end();
-			++it, i++)
-		{
-			std::cout << "[" << i << "]: " << MakeCookie(*it) << std::endl;
-		}
-
-		exit(EXIT_SUCCESS);
-	}
-
-	catch(curlpp::RuntimeError &e)
-	{
-		std::cerr << e.what() << std::endl;
-		exit(EXIT_FAILURE);
-	}
-
-	catch(curlpp::LogicError &e)
-	{
-		std::cout << e.what() << std::endl;
-		exit(EXIT_FAILURE);
-	}
-}

+ 0 - 98
thirdparty/curlpp/examples/example08.cpp

@@ -1,98 +0,0 @@
-/*
-*    Copyright (c) <2002-2005> <Jean-Philippe Barrette-LaPierre>
-*    
-*    Permission is hereby granted, free of charge, to any person obtaining
-*    a copy of this software and associated documentation files 
-*    (curlpp), to deal in the Software without restriction, 
-*    including without limitation the rights to use, copy, modify, merge,
-*    publish, distribute, sublicense, and/or sell copies of the Software,
-*    and to permit persons to whom the Software is furnished to do so, 
-*    subject to the following conditions:
-*    
-*    The above copyright notice and this permission notice shall be included
-*    in all copies or substantial portions of the Software.
-*    
-*    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-*    OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-*    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 
-*    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
-*    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
-*    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-*    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-*/
-
-/**
-* \file
-* DebugFunction option using functor.
-* 
-*/
-
-
-#include <cstdlib>
-
-#include <curlpp/cURLpp.hpp>
-#include <curlpp/Easy.hpp>
-#include <curlpp/Options.hpp>
-#include <curlpp/Exception.hpp>
- 
-
-
-class MyWindow
-{
-
-public:
-
-	int writeDebug(curl_infotype, char *, size_t)
-	{
-		curlpp::raiseException(std::runtime_error("This is our exception."));
-		std::cout << "We never reach this line." << std::endl;
-		return 0;
-	}
-};
-
-
-int main(int argc, char *argv[])
-{
-	if(argc != 2)
-	{
-		std::cerr << "Example 8: Wrong number of arguments" << std::endl 
-			<< "Example 8: Usage: example8 url" 
-			<< std::endl;
-		return EXIT_FAILURE;
-	}
-	char *url = argv[1];
-
-	MyWindow myWindow;
-
-	try
-	{
-		curlpp::Cleanup cleaner;
-		curlpp::Easy request;
-
-		using namespace curlpp::Options;
-		request.setOpt(Verbose(true));
-		using namespace std::placeholders;
-		request.setOpt(DebugFunction(std::bind(&MyWindow::writeDebug, &myWindow, _1, _2, _3)));
-		request.setOpt(Url(url));
-
-		request.perform();
-	}
-
-	catch ( curlpp::LogicError & e )
-	{
-		std::cout << e.what() << std::endl;
-	}
-
-	catch ( curlpp::RuntimeError & e )
-	{
-		std::cout << e.what() << std::endl;
-	}
-
-	catch ( std::runtime_error &e )
-	{
-		std::cout << e.what() << std::endl;
-	}
-
-	return 0;
-}
-

+ 0 - 96
thirdparty/curlpp/examples/example09.cpp

@@ -1,96 +0,0 @@
-/*
-*    Copyright (c) <2002-2005> <Jean-Philippe Barrette-LaPierre>
-*    
-*    Permission is hereby granted, free of charge, to any person obtaining
-*    a copy of this software and associated documentation files 
-*    (curlpp), to deal in the Software without restriction, 
-*    including without limitation the rights to use, copy, modify, merge,
-*    publish, distribute, sublicense, and/or sell copies of the Software,
-*    and to permit persons to whom the Software is furnished to do so, 
-*    subject to the following conditions:
-*    
-*    The above copyright notice and this permission notice shall be included
-*    in all copies or substantial portions of the Software.
-*    
-*    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-*    OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-*    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 
-*    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
-*    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
-*    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-*    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-*/
-
-/**
-* \file
-* DebugFunction option using functor.
-* 
-*/
-
-
-#include <cstdlib>
-
-#include <curlpp/cURLpp.hpp>
-#include <curlpp/Easy.hpp>
-#include <curlpp/Options.hpp>
-#include <curlpp/Exception.hpp>
-
-
-class MyWindow
-{
-
-public:
-
-	int writeDebug(curl_infotype, char *, size_t)
-  {
-		throw std::runtime_error("This is the unknown exception.");
-    std::cout << "We never reach this line." << std::endl;
-    return 0;
-  }
-};
-
-
-int main(int argc, char *argv[])
-{
-  if(argc != 2)
-	{
-    std::cerr << "Example 9: Wrong number of arguments" << std::endl 
-	      << "Example 9: Usage: example9 url" 
-	      << std::endl;
-    return EXIT_FAILURE;
-  }
-  char *url = argv[1];
-     
-  MyWindow myWindow;
-  try
-  {
-      curlpp::Cleanup cleaner;
-      curlpp::Easy request;
-      
-      using namespace curlpp::Options;
-      request.setOpt(Verbose(true));
-      using namespace std::placeholders;
-      request.setOpt(DebugFunction(std::bind(&MyWindow::writeDebug, &myWindow, _1, _2, _3)));
-      request.setOpt(Url(url));
-      
-      request.perform();
-  }
-
-	catch ( curlpp::LogicError & e )
-	{
-    std::cout << e.what() << std::endl;
-  }
-
-	catch ( curlpp::RuntimeError & e )
-	{
-    std::cout << e.what() << std::endl;
-  }
-
-	catch ( std::runtime_error &e )
-	{
-    std::cout << e.what() << std::endl;
-  }
-  
-  return 0;
-}
-

+ 0 - 99
thirdparty/curlpp/examples/example10.cpp

@@ -1,99 +0,0 @@
-/*
- *    Copyright (c) <2002-2005> <Jean-Philippe Barrette-LaPierre>
- *    
- *    Permission is hereby granted, free of charge, to any person obtaining
- *    a copy of this software and associated documentation files 
- *    (curlpp), to deal in the Software without restriction, 
- *    including without limitation the rights to use, copy, modify, merge,
- *    publish, distribute, sublicense, and/or sell copies of the Software,
- *    and to permit persons to whom the Software is furnished to do so, 
- *    subject to the following conditions:
- *    
- *    The above copyright notice and this permission notice shall be included
- *    in all copies or substantial portions of the Software.
- *    
- *    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- *    OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 
- *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
- *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
- *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/**
-* \file
-* WriteFunction option using functor.
-* Writing to FILE*
-* 
-*/
-
-
-#include <cstdlib>
-#include <cstdio>
-#include <cstring>
-
-#include <curlpp/cURLpp.hpp>
-#include <curlpp/Easy.hpp>
-#include <curlpp/Options.hpp>
-#include <curlpp/Exception.hpp>
-
-#define MAX_FILE_LENGTH 20000
-
-size_t 
-FileCallback(FILE *f, char* ptr, size_t size, size_t nmemb)
-{
-	return fwrite(ptr, size, nmemb, f);
-};
-
-
-int main(int argc, char *argv[])
-{
-	if(argc != 3)
-	{
-		std::cerr << argv[0] << ": Wrong number of arguments" << std::endl 
-			<< argv[0] << ": Usage: " << " url file" 
-			<< std::endl;
-
-		return EXIT_FAILURE;
-	}
-
-	char *url = argv[1];
-	char *filename = argv[2];
-	FILE * file = fopen(filename, "w");
-	if (!file)
-	{
-		std::cerr << "Error opening " << filename << std::endl;
-		return EXIT_FAILURE;
-	}
-
-	try
-	{
-		curlpp::Cleanup cleaner;
-		curlpp::Easy request;
-
-		// Set the writer callback to enable cURL to write result in a memory area
-		using namespace std::placeholders;
-		curlpp::options::WriteFunction *test = new curlpp::options::WriteFunction(std::bind(&FileCallback, file, _1, _2, _3));
-		request.setOpt(test);
-
-		// Setting the URL to retrive.
-		request.setOpt(new curlpp::options::Url(url));
-		request.setOpt(new curlpp::options::Verbose(true));
-		request.perform();
-
-		return EXIT_SUCCESS;
-	}
-
-	catch ( curlpp::LogicError & e )
-	{
-		std::cout << e.what() << std::endl;
-	}
-
-	catch ( curlpp::RuntimeError & e )
-	{
-		std::cout << e.what() << std::endl;
-	}
-
-	return EXIT_FAILURE;
-}

+ 0 - 107
thirdparty/curlpp/examples/example11.cpp

@@ -1,107 +0,0 @@
-/*
- *    Copyright (c) <2002-2005> <Jean-Philippe Barrette-LaPierre>
- *    
- *    Permission is hereby granted, free of charge, to any person obtaining
- *    a copy of this software and associated documentation files 
- *    (curlpp), to deal in the Software without restriction, 
- *    including without limitation the rights to use, copy, modify, merge,
- *    publish, distribute, sublicense, and/or sell copies of the Software,
- *    and to permit persons to whom the Software is furnished to do so, 
- *    subject to the following conditions:
- *    
- *    The above copyright notice and this permission notice shall be included
- *    in all copies or substantial portions of the Software.
- *    
- *    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- *    OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 
- *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
- *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
- *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/**
-* \file
-* WriteFunction option using free function.
-* Writing to FILE*
-* 
-*/
-
-#include <curlpp/cURLpp.hpp>
-#include <curlpp/Easy.hpp>
-#include <curlpp/Options.hpp>
-#include <curlpp/Exception.hpp>
-
-#include <cstdlib>
-#include <cstdio>
-#include <cstring>
-#include <cerrno>
-
-
-/// Callback must be declared static, otherwise it won't link...
-size_t WriteCallback(char* ptr, size_t size, size_t nmemb, void *f)
-{
-	FILE *file = (FILE *)f;
-	return fwrite(ptr, size, nmemb, file);
-};
-
-
-int main(int argc, char *argv[])
-{
-	if(argc < 2)
-	{
-		std::cerr << "Example 11: Wrong number of arguments" << std::endl 
-			<< "Example 11: Usage: example11 url [file]" 
-			<< std::endl;
-		return EXIT_FAILURE;
-	}
-	char *url = argv[1];
-	char *filename = NULL;
-	if(argc >= 3)
-	{
-		filename = argv[2];
-	}
-
-	try
-	{
-		curlpp::Cleanup cleaner;
-		curlpp::Easy request;
-
-		/// Set the writer callback to enable cURL to write result in a memory area
-		curlpp::options::WriteFunctionCurlFunction
-			myFunction(WriteCallback);
-
-		FILE *file = stdout;
-		if(filename != NULL)
-		{
-			file = fopen(filename, "wb");
-			if(file == NULL)
-			{
-			  fprintf(stderr, "%s/n", strerror(errno));
-			  return EXIT_FAILURE;
-			}
-		} 
-
-		curlpp::OptionTrait<void *, CURLOPT_WRITEDATA> 
-			myData(file);
-
-		request.setOpt(myFunction);
-		request.setOpt(myData);
-
-		/// Setting the URL to retrive.
-		request.setOpt(new curlpp::options::Url(url));
-		request.setOpt(new curlpp::options::Verbose(true));
-		request.perform();
-	}
-
-	catch (curlpp::LogicError & e)
-	{
-		std::cout << e.what() << std::endl;
-	}
-
-	catch (curlpp::RuntimeError & e)
-	{
-		std::cout << e.what() << std::endl;
-	}
-}

+ 0 - 75
thirdparty/curlpp/examples/example12.cpp

@@ -1,75 +0,0 @@
-/*
- *    Copyright (c) <2002-2005> <Jean-Philippe Barrette-LaPierre>
- *    
- *    Permission is hereby granted, free of charge, to any person obtaining
- *    a copy of this software and associated documentation files 
- *    (curlpp), to deal in the Software without restriction, 
- *    including without limitation the rights to use, copy, modify, merge,
- *    publish, distribute, sublicense, and/or sell copies of the Software,
- *    and to permit persons to whom the Software is furnished to do so, 
- *    subject to the following conditions:
- *    
- *    The above copyright notice and this permission notice shall be included
- *    in all copies or substantial portions of the Software.
- *    
- *    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- *    OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 
- *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
- *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
- *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/**
-* \file
-* Simple POST demo.
-* 
-*/
-
-
-#include <cstdlib>
-#include <cerrno>
-
-#include <curlpp/cURLpp.hpp>
-#include <curlpp/Easy.hpp>
-#include <curlpp/Options.hpp>
-#include <curlpp/Exception.hpp>
-
-int main(int argc, char *argv[])
-{
-  if(argc < 2) {
-    std::cerr << "Example 11: Wrong number of arguments" << std::endl 
-	      << "Example 11: Usage: example12 url" 
-	      << std::endl;
-    return EXIT_FAILURE;
-  }
-  
-  char *url = argv[1];
-  
-  try {
-    curlpp::Cleanup cleaner;
-    curlpp::Easy request;
-    
-    request.setOpt(new curlpp::options::Url(url)); 
-    request.setOpt(new curlpp::options::Verbose(true)); 
-    
-    std::list<std::string> header; 
-    header.push_back("Content-Type: application/octet-stream"); 
-    
-    request.setOpt(new curlpp::options::HttpHeader(header)); 
-    
-    request.setOpt(new curlpp::options::PostFields("abcd"));
-    request.setOpt(new curlpp::options::PostFieldSize(5));
-    
-    request.perform(); 
-  }
-  catch ( curlpp::LogicError & e ) {
-    std::cout << e.what() << std::endl;
-  }
-  catch ( curlpp::RuntimeError & e ) {
-    std::cout << e.what() << std::endl;
-  }
-
-  return EXIT_SUCCESS;
-}

+ 0 - 125
thirdparty/curlpp/examples/example13.cpp

@@ -1,125 +0,0 @@
-/*
- *    Copyright (c) <2002-2006> <Jean-Philippe Barrette-LaPierre>
- *    
- *    Permission is hereby granted, free of charge, to any person obtaining
- *    a copy of this software and associated documentation files 
- *    (curlpp), to deal in the Software without restriction, 
- *    including without limitation the rights to use, copy, modify, merge,
- *    publish, distribute, sublicense, and/or sell copies of the Software,
- *    and to permit persons to whom the Software is furnished to do so, 
- *    subject to the following conditions:
- *    
- *    The above copyright notice and this permission notice shall be included
- *    in all copies or substantial portions of the Software.
- *    
- *    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- *    OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 
- *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
- *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
- *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/**
-* \file
-* Simple Multi demo.
-* 
-*/
-
-
-#include <iostream>
-
-#include <cstdlib>
-
-#include <curlpp/cURLpp.hpp>
-#include <curlpp/Easy.hpp>
-#include <curlpp/Multi.hpp>
-#include <curlpp/Options.hpp>
-#include <curlpp/Exception.hpp>
-
-#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
-#pragma comment(lib, "Ws2_32.lib")
-#endif // WIN32
-
-int main(int argc, char *argv[])
-{
-  if(argc < 3) {
-    std::cerr << "Example 13: Wrong number of arguments" << std::endl 
-	      << "Example 13: Usage: example13 url1 url2" 
-	      << std::endl;
-    return EXIT_FAILURE;
-  }
-  
-  char *url1 = argv[1];
-  char *url2 = argv[2];
-  
-  try {
-    curlpp::Cleanup cleaner;
-    
-    curlpp::Easy request1;
-    curlpp::Easy request2;
-    
-    request1.setOpt(new curlpp::options::Url(url1)); 
-    request1.setOpt(new curlpp::options::Verbose(true)); 
-    
-    request2.setOpt(new curlpp::options::Url(url2)); 
-    request2.setOpt(new curlpp::options::Verbose(true)); 
-    
-    int nbLeft;
-    curlpp::Multi requests;
-    requests.add(&request1);
-    requests.add(&request2);
-    
-    /* we start some action by calling perform right away */
-    while(!requests.perform(&nbLeft)) {};
-    
-    while(nbLeft) {
-      struct timeval timeout;
-      int rc; /* select() return code */
-      
-      fd_set fdread;
-      fd_set fdwrite;
-      fd_set fdexcep;
-      int maxfd;
-      
-      FD_ZERO(&fdread);
-      FD_ZERO(&fdwrite);
-      FD_ZERO(&fdexcep);
-      
-      /* set a suitable timeout to play around with */
-      timeout.tv_sec = 1;
-      timeout.tv_usec = 0;
-      
-      /* get file descriptors from the transfers */
-      requests.fdset(&fdread, &fdwrite, &fdexcep, &maxfd);
-      
-      rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
-      
-      switch(rc) {
-      case -1:
-	/* select error */
-	nbLeft = 0;
-	printf("select() returns error, this is badness\n");
-	break;
-      case 0:
-      default:
-	/* timeout or readable/writable sockets */
-	while(!requests.perform(&nbLeft)) {};
-	break;
-      }
-    }
-    
-    std::cout << "NB lefts: " << nbLeft << std::endl;
-  }
-  catch ( curlpp::LogicError & e ) {
-    std::cout << e.what() << std::endl;
-  }
-  catch ( curlpp::RuntimeError & e ) {
-    std::cout << e.what() << std::endl;
-  }
-
-  return EXIT_SUCCESS;
-}
-
-  

+ 0 - 147
thirdparty/curlpp/examples/example14.cpp

@@ -1,147 +0,0 @@
-/*
- *    Copyright (c) <2002-2006> <Jean-Philippe Barrette-LaPierre>
- *    
- *    Permission is hereby granted, free of charge, to any person obtaining
- *    a copy of this software and associated documentation files 
- *    (curlpp), to deal in the Software without restriction, 
- *    including without limitation the rights to use, copy, modify, merge,
- *    publish, distribute, sublicense, and/or sell copies of the Software,
- *    and to permit persons to whom the Software is furnished to do so, 
- *    subject to the following conditions:
- *    
- *    The above copyright notice and this permission notice shall be included
- *    in all copies or substantial portions of the Software.
- *    
- *    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- *    OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 
- *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
- *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
- *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/**
-* \file
-* Multi demo.
-* 
-*/
-
-#include <iostream>
-
-#include <cstdlib>
-
-#include <curlpp/cURLpp.hpp>
-#include <curlpp/Easy.hpp>
-#include <curlpp/Multi.hpp>
-#include <curlpp/Options.hpp>
-#include <curlpp/Exception.hpp>
-
-#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
-#pragma comment(lib, "Ws2_32.lib")
-#endif // WIN32
-
-int main(int argc, char *argv[])
-{
-  if(argc < 3) {
-    std::cerr << "Example 13: Wrong number of arguments" << std::endl 
-	      << "Example 13: Usage: example13 url1 url2" 
-	      << std::endl;
-    return EXIT_FAILURE;
-  }
-  
-  char *url1 = argv[1];
-  char *url2 = argv[2];
-  
-  try {
-    curlpp::Cleanup cleaner;
-    
-    curlpp::Easy request1;
-    curlpp::Easy request2;
-    
-    request1.setOpt(new curlpp::options::Url(url1)); 
-    request1.setOpt(new curlpp::options::Verbose(true)); 
-    
-    request2.setOpt(new curlpp::options::Url(url2)); 
-    request2.setOpt(new curlpp::options::Verbose(true)); 
-    
-    int nbLeft;
-    curlpp::Multi requests;
-    requests.add(&request1);
-    requests.add(&request2);
-    
-    /* we start some action by calling perform right away */
-    while(!requests.perform(&nbLeft)) {};
-    
-    while(nbLeft) {
-      struct timeval timeout;
-      int rc; /* select() return code */
-      
-      fd_set fdread;
-      fd_set fdwrite;
-      fd_set fdexcep;
-      int maxfd;
-      
-      FD_ZERO(&fdread);
-      FD_ZERO(&fdwrite);
-      FD_ZERO(&fdexcep);
-      
-      /* set a suitable timeout to play around with */
-      timeout.tv_sec = 1;
-      timeout.tv_usec = 0;
-      
-      /* get file descriptors from the transfers */
-      requests.fdset(&fdread, &fdwrite, &fdexcep, &maxfd);
-      
-      rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
-      switch(rc) {
-      case -1:
-	/* select error */
-	nbLeft = 0;
-	printf("select() returns error, this is badness\n");
-	break;
-      case 0:
-	/* timeout, do something else */
-	break;
-      default:
-	/* one or more of curl's file descriptors say there's data to read
-	   or write */
-	while(!requests.perform(&nbLeft)) {};
-	break;
-      }
-    }
-    
-    std::cout << "NB lefts: " << nbLeft << std::endl;
-
-    /* See how the transfers went */
-    /* 
-       Multi::info returns a list of:
-       std::pair< curlpp::Easy, curlpp::Multi::Info >
-    */
-    curlpp::Multi::Msgs msgs = requests.info();
-    for(curlpp::Multi::Msgs::iterator pos = msgs.begin();
-	pos != msgs.end();
-	pos++) {
-      if(pos->second.msg == CURLMSG_DONE) {
-
-	/* Find out which handle this message is about */
-	if(pos->first == &request1) {
-	  printf("First request completed with status %d\n", pos->second.code);
-	}
-	else if(pos->first == &request2) {
-	  printf("Second request completed with status %d\n", pos->second.code);
-	}
-      }
-    }
-  }
-  catch ( curlpp::LogicError & e ) {
-    std::cout << e.what() << std::endl;
-  }
-  catch ( curlpp::RuntimeError & e ) {
-    std::cout << e.what() << std::endl;
-  }
-
-  return EXIT_SUCCESS;
-}
-
-  

+ 0 - 61
thirdparty/curlpp/examples/example15.cpp

@@ -1,61 +0,0 @@
-/*
- *    Copyright (c) <2002-2005> <Jean-Philippe Barrette-LaPierre>
- *    
- *    Permission is hereby granted, free of charge, to any person obtaining
- *    a copy of this software and associated documentation files 
- *    (curlpp), to deal in the Software without restriction, 
- *    including without limitation the rights to use, copy, modify, merge,
- *    publish, distribute, sublicense, and/or sell copies of the Software,
- *    and to permit persons to whom the Software is furnished to do so, 
- *    subject to the following conditions:
- *    
- *    The above copyright notice and this permission notice shall be included
- *    in all copies or substantial portions of the Software.
- *    
- *    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- *    OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 
- *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
- *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
- *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/**
-* \file
-* Using options.
-* 
-*/
-
-
-#include <string>
-#include <iostream>
-
-#include <curlpp/cURLpp.hpp>
-#include <curlpp/Easy.hpp>
-#include <curlpp/Options.hpp>
-
-
-int main(int, char **)
-{
-  try
-  {
-      curlpp::Cleanup myCleanup;
-      
-      // Creation of the URL option.
-      curlpp::Easy myRequest;
-      myRequest.setOpt(new curlpp::options::Url(std::string("https://example.com")));
-      myRequest.setOpt(new curlpp::options::SslEngineDefault());
-      myRequest.perform();
-    }
-  catch( curlpp::RuntimeError &e )
-    {
-      std::cout << e.what() << std::endl;
-    }
-  catch( curlpp::LogicError &e )
-    {
-      std::cout << e.what() << std::endl;
-    }
-    
-  return 0;
-}

+ 0 - 78
thirdparty/curlpp/examples/example16.cpp

@@ -1,78 +0,0 @@
-/*
- *    Copyright (c) <2002-2005> <Jean-Philippe Barrette-LaPierre>
- *    
- *    Permission is hereby granted, free of charge, to any person obtaining
- *    a copy of this software and associated documentation files 
- *    (curlpp), to deal in the Software without restriction, 
- *    including without limitation the rights to use, copy, modify, merge,
- *    publish, distribute, sublicense, and/or sell copies of the Software,
- *    and to permit persons to whom the Software is furnished to do so, 
- *    subject to the following conditions:
- *    
- *    The above copyright notice and this permission notice shall be included
- *    in all copies or substantial portions of the Software.
- *    
- *    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- *    OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 
- *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
- *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
- *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/**
-* \file
-* Simple POST demo.
-* 
-*/
-
-
-#include <cstdlib>
-#include <cerrno>
-
-#include <curlpp/cURLpp.hpp>
-#include <curlpp/Easy.hpp>
-#include <curlpp/Options.hpp>
-#include <curlpp/Exception.hpp>
-
-
-int main(int argc, char *argv[])
-{
-  if(argc < 2) {
-    std::cerr << argv[0] << ": Wrong number of arguments" << std::endl 
-	      << "Usage: " << argv[0] << " url"
-	      << std::endl;
-    return EXIT_FAILURE;
-  }
-  
-  char *url = argv[1];
-  
-  try {
-    curlpp::Cleanup cleaner;
-    curlpp::Easy request;
-    
-    request.setOpt(new curlpp::options::Url(url)); 
-    request.setOpt(new curlpp::options::Verbose(true)); 
-    
-    std::list<std::string> header; 
-    header.push_back("Content-Type: application/octet-stream"); 
-    
-    request.setOpt(new curlpp::options::HttpHeader(header)); 
-    
-    request.setOpt(new curlpp::options::PostFields("abcd"));
-    request.setOpt(new curlpp::options::PostFieldSize(5));
-
-    request.setOpt(new curlpp::options::UserPwd("user:password"));
-    
-    request.perform(); 
-  }
-  catch ( curlpp::LogicError & e ) {
-    std::cout << e.what() << std::endl;
-  }
-  catch ( curlpp::RuntimeError & e ) {
-    std::cout << e.what() << std::endl;
-  }
-
-  return EXIT_SUCCESS;
-}

+ 0 - 103
thirdparty/curlpp/examples/example17.cpp

@@ -1,103 +0,0 @@
-/*
- *    Copyright (c) <2002-2005> <Jean-Philippe Barrette-LaPierre>
- *    
- *    Permission is hereby granted, free of charge, to any person obtaining
- *    a copy of this software and associated documentation files 
- *    (curlpp), to deal in the Software without restriction, 
- *    including without limitation the rights to use, copy, modify, merge,
- *    publish, distribute, sublicense, and/or sell copies of the Software,
- *    and to permit persons to whom the Software is furnished to do so, 
- *    subject to the following conditions:
- *    
- *    The above copyright notice and this permission notice shall be included
- *    in all copies or substantial portions of the Software.
- *    
- *    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- *    OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 
- *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
- *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
- *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include <curlpp/cURLpp.hpp>
-#include <curlpp/Easy.hpp>
-#include <curlpp/Options.hpp>
-#include <curlpp/Exception.hpp>
-#include <curlpp/Infos.hpp>
-
-#include <cstdlib>
-
-
-struct MethodClass
-{
-private:
-  MethodClass();
-
-public:
-  MethodClass(std::ostream * stream)
-    : mStream(stream)
-    , writeRound(0)
-  {}
-
-  // Helper Class for reading result from remote host
-  size_t write(curlpp::Easy *handle, char* ptr, size_t size, size_t nmemb)
-  {
-    ++writeRound;
-
-		curlpp::options::Url url;
-    handle->getOpt(url);
-
-    // Calculate the real size of the incoming buffer
-    size_t realsize = size * nmemb;
-    std::cerr << "write round: " << writeRound << ", url: " << url.getValue() << std::endl;
-    mStream->write(ptr, realsize);
-    // return the real size of the buffer...
-    return realsize;
-  };
-
-  // Public member vars
-  std::ostream * mStream;
-  unsigned writeRound;
-};
-
-
-int main(int argc, char *argv[])
-{
-  if(argc != 2) {
-    std::cerr << argv[0] << ": Wrong number of arguments" << std::endl 
-	      << argv[0] << ": Usage: " << " url " 
-	      << std::endl;
-    return EXIT_FAILURE;
-  }
-
-  char *url = argv[1];
-  
-  try {
-    curlpp::Cleanup cleaner;
-    curlpp::Easy request;
-
-    MethodClass mObject(&std::cout);
-    
-    // Set the writer callback to enable cURL 
-    // to write result in a memory area
-    using namespace std::placeholders;
-    curlpp::options::WriteFunction *test = new curlpp::options::WriteFunction(std::bind(&MethodClass::write, &mObject, &request, _1, _2, _3));
-    request.setOpt(test);
-    
-    // Setting the URL to retrive.
-    request.setOpt(new curlpp::options::Url(url));
-    request.perform();
-
-    return EXIT_SUCCESS;
-  }
-  catch ( curlpp::LogicError & e ) {
-    std::cout << e.what() << std::endl;
-  }
-  catch ( curlpp::RuntimeError & e ) {
-    std::cout << e.what() << std::endl;
-  }
-
-  return EXIT_FAILURE;
-}

+ 0 - 115
thirdparty/curlpp/examples/example18.cpp

@@ -1,115 +0,0 @@
-/*
- *    Copyright (c) <2002-2005> <Jean-Philippe Barrette-LaPierre>
- *    
- *    Permission is hereby granted, free of charge, to any person obtaining
- *    a copy of this software and associated documentation files 
- *    (curlpp), to deal in the Software without restriction, 
- *    including without limitation the rights to use, copy, modify, merge,
- *    publish, distribute, sublicense, and/or sell copies of the Software,
- *    and to permit persons to whom the Software is furnished to do so, 
- *    subject to the following conditions:
- *    
- *    The above copyright notice and this permission notice shall be included
- *    in all copies or substantial portions of the Software.
- *    
- *    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- *    OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 
- *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
- *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
- *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/**
-* \file
-* WriteFunction using streams.
-* 
-*/
-
-
-#include <sstream>
-#include <cstdlib>
-
-#include <curlpp/cURLpp.hpp>
-#include <curlpp/Easy.hpp>
-#include <curlpp/Options.hpp>
-#include <curlpp/Exception.hpp>
-#include <curlpp/Infos.hpp>
-
-		
-struct MethodClass
-{
-private:
-  MethodClass();
-
-public:
-  MethodClass(std::ostream * stream)
-    : mStream(stream)
-    , writeRound(0)
-  {}
-
-  // Helper Class for reading result from remote host
-  size_t write(curlpp::Easy *handle, char* ptr, size_t size, size_t nmemb)
-  {
-    ++writeRound;
-
-		curlpp::options::Url url;
-    handle->getOpt(url);
-
-    // Calculate the real size of the incoming buffer
-    size_t realsize = size * nmemb;
-    std::cerr << "write round: " << writeRound << ", url: " << url.getValue() << std::endl;
-    mStream->write(ptr, realsize);
-    // return the real size of the buffer...
-    return realsize;
-  };
-
-  // Public member vars
-  std::ostream * mStream;
-  unsigned writeRound;
-};
-
-
-int main(int argc, char *argv[])
-{
-  if(argc != 2) {
-    std::cerr << argv[0] << ": Wrong number of arguments" << std::endl 
-	      << argv[0] << ": Usage: " << " url " 
-	      << std::endl;
-    return EXIT_FAILURE;
-  }
-
-  char *url = argv[1];
-  
-  try {
-    curlpp::Cleanup cleaner;
-    curlpp::Easy request;
-
-    std::ostringstream myStream;
-    MethodClass mObject(&myStream);
-    
-
-    // Set the writer callback to enable cURL 
-    // to write result in a memory area
-#ifdef HAVE_BOOST
-    curlpp::options::BoostWriteFunction *test = new curlpp::options::BoostWriteFunction(boost::bind(&MethodClass::write, &mObject, &request, _1, _2, _3));
-    request.setOpt(test);
-#endif /* HAVE_BOOST */
-    
-    // Setting the URL to retrive.
-    request.setOpt(new curlpp::options::Url(url));
-
-    request.perform();
-
-    return EXIT_SUCCESS;
-  }
-  catch ( curlpp::LogicError & e ) {
-    std::cout << e.what() << std::endl;
-  }
-  catch ( curlpp::RuntimeError & e ) {
-    std::cout << e.what() << std::endl;
-  }
-
-  return EXIT_FAILURE;
-}

+ 0 - 81
thirdparty/curlpp/examples/example19.cpp

@@ -1,81 +0,0 @@
-/*
- *    Copyright (c) <2002-2005> <Gazihan Alankus>
- *    
- *    Permission is hereby granted, free of charge, to any person obtaining
- *    a copy of this software and associated documentation files 
- *    (curlpp), to deal in the Software without restriction, 
- *    including without limitation the rights to use, copy, modify, merge,
- *    publish, distribute, sublicense, and/or sell copies of the Software,
- *    and to permit persons to whom the Software is furnished to do so, 
- *    subject to the following conditions:
- *    
- *    The above copyright notice and this permission notice shall be included
- *    in all copies or substantial portions of the Software.
- *    
- *    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- *    OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 
- *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
- *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
- *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/**
-* \file
-* Forms demo.
-* 
-*/
-
-
-#include <fstream>
-
-#include <cstdlib>
-#include <cerrno>
-
-#include <curlpp/cURLpp.hpp>
-#include <curlpp/Easy.hpp>
-#include <curlpp/Options.hpp>
-#include <curlpp/Exception.hpp>
-
-int main(int argc, char *argv[])
-{
-  if(argc < 2) {
-    std::cerr << argv[0] << ": Wrong number of arguments" << std::endl 
-	      << "Usage: " << argv[0] << " url"
-	      << std::endl;
-    return EXIT_FAILURE;
-  }
-  
-  char *url = argv[1];
-  
-  try {
-    curlpp::Cleanup cleaner;
-    curlpp::Easy request;
-    
-    request.setOpt(new curlpp::options::Url(url)); 
-    //request.setOpt(new curlpp::options::Verbose(true)); 
-    
-    {
-      // Forms takes ownership of pointers!
-      curlpp::Forms formParts;
-      formParts.push_back(new curlpp::FormParts::Content("name1", "value1"));
-      formParts.push_back(new curlpp::FormParts::Content("name2", "value2"));
-      
-      request.setOpt(new curlpp::options::HttpPost(formParts)); 
-    }
-
-    // The forms have been cloned and are valid for the request, even
-    // if the original forms are out of scope.
-    std::ofstream myfile("/dev/null");
-    myfile << request << std::endl << request << std::endl;
-  }
-  catch ( curlpp::LogicError & e ) {
-    std::cout << e.what() << std::endl;
-  }
-  catch ( curlpp::RuntimeError & e ) {
-    std::cout << e.what() << std::endl;
-  }
-
-  return EXIT_SUCCESS;
-}

+ 0 - 74
thirdparty/curlpp/examples/example20.cpp

@@ -1,74 +0,0 @@
-/*
- *    Copyright (c) <2002-2005> <Jean-Philippe Barrette-LaPierre>
- *    
- *    Permission is hereby granted, free of charge, to any person obtaining
- *    a copy of this software and associated documentation files 
- *    (curlpp), to deal in the Software without restriction, 
- *    including without limitation the rights to use, copy, modify, merge,
- *    publish, distribute, sublicense, and/or sell copies of the Software,
- *    and to permit persons to whom the Software is furnished to do so, 
- *    subject to the following conditions:
- *    
- *    The above copyright notice and this permission notice shall be included
- *    in all copies or substantial portions of the Software.
- *    
- *    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- *    OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 
- *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
- *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
- *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/**
-* \file
-* Using WriteStream option.
-* 
-*/
-
-
-#include <sstream>
-
-#include <cstdlib>
-
-#include <curlpp/cURLpp.hpp>
-#include <curlpp/Easy.hpp>
-#include <curlpp/Options.hpp>
-#include <curlpp/Exception.hpp>
-
-int main(int argc, char *argv[])
-{
-  if(argc != 2) {
-    std::cerr << argv[0] << ": Wrong number of arguments" << std::endl 
-	      << argv[0] << ": Usage: " << " url " 
-	      << std::endl;
-    return EXIT_FAILURE;
-  }
-
-  char *url = argv[1];
-  
-  try {
-    curlpp::Cleanup cleaner;
-    curlpp::Easy request;
-
-    // Set the writer callback to enable cURL 
-    // to write result in a memory area
-    request.setOpt(new curlpp::options::WriteStream(&std::cout));
-    
-    // Setting the URL to retrive.
-    request.setOpt(new curlpp::options::Url(url));
-
-    request.perform();
-
-    return EXIT_SUCCESS;
-  }
-  catch ( curlpp::LogicError & e ) {
-    std::cout << e.what() << std::endl;
-  }
-  catch ( curlpp::RuntimeError & e ) {
-    std::cout << e.what() << std::endl;
-  }
-
-  return EXIT_FAILURE;
-}

+ 0 - 87
thirdparty/curlpp/examples/example21.cpp

@@ -1,87 +0,0 @@
-/*
-*    Copyright (c) <2002-2005> <Jean-Philippe Barrette-LaPierre>
-*    
-*    Permission is hereby granted, free of charge, to any person obtaining
-*    a copy of this software and associated documentation files 
-*    (curlpp), to deal in the Software without restriction, 
-*    including without limitation the rights to use, copy, modify, merge,
-*    publish, distribute, sublicense, and/or sell copies of the Software,
-*    and to permit persons to whom the Software is furnished to do so, 
-*    subject to the following conditions:
-*    
-*    The above copyright notice and this permission notice shall be included
-*    in all copies or substantial portions of the Software.
-*    
-*    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-*    OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-*    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 
-*    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
-*    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
-*    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-*    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-*/
-
-/**
-* \file
-* Using ReadStream option.
-* 
-*/
-
-
-#include <sstream>
-
-#include <cstdlib>
-#include <cstdio>
-#include <cstring>
-
-#include <curlpp/cURLpp.hpp>
-#include <curlpp/Easy.hpp>
-#include <curlpp/Options.hpp>
-#include <curlpp/Exception.hpp>
- 
-int main(int argc, char *argv[])
-{
-  if(argc != 3) {
-    std::cerr << "Example 2: Missing argument" << std::endl 
-	      << "Example 2: Usage: example02 url string-to-send" 
-	      << std::endl;
-    return EXIT_FAILURE;
-  }
-  char *url = argv[1];
-
-  std::istringstream myStream(argv[2]);
-  int size = myStream.str().size();
-     
-  char buf[50];
-   try
-   {
-      curlpp::Cleanup cleaner;
-      curlpp::Easy request;
-
-      std::list< std::string > headers;
-      headers.push_back("Content-Type: text/*"); 
-      sprintf(buf, "Content-Length: %d", size); 
-      headers.push_back(buf);
-      
-      using namespace curlpp::Options;
-      request.setOpt(new Verbose(true));
-      request.setOpt(new ReadStream(&myStream));
-      request.setOpt(new InfileSize(size));
-      request.setOpt(new Upload(true));
-      request.setOpt(new HttpHeader(headers));
-      request.setOpt(new Url(url));
-       
-      request.perform();
-   }
-   catch ( curlpp::LogicError & e )
-     {
-       std::cout << e.what() << std::endl;
-     }
-   catch ( curlpp::RuntimeError & e )
-     {
-       std::cout << e.what() << std::endl;
-     }
-   
-   return 0;
-}
-

+ 0 - 75
thirdparty/curlpp/examples/example22.cpp

@@ -1,75 +0,0 @@
-/*
- *    Copyright (c) <2002-2005> <Jean-Philippe Barrette-LaPierre>
- *    
- *    Permission is hereby granted, free of charge, to any person obtaining
- *    a copy of this software and associated documentation files 
- *    (curlpp), to deal in the Software without restriction, 
- *    including without limitation the rights to use, copy, modify, merge,
- *    publish, distribute, sublicense, and/or sell copies of the Software,
- *    and to permit persons to whom the Software is furnished to do so, 
- *    subject to the following conditions:
- *    
- *    The above copyright notice and this permission notice shall be included
- *    in all copies or substantial portions of the Software.
- *    
- *    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- *    OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 
- *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
- *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
- *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/**
-* \file
-* Using options::Url as stream input.
-* 
-*/
-
-
-#include <sstream>
-
-#include <cstdlib>
-
-#include <curlpp/cURLpp.hpp>
-#include <curlpp/Easy.hpp>
-#include <curlpp/Options.hpp>
-#include <curlpp/Exception.hpp>
-
-int main(int argc, char *argv[])
-{
-  if(argc != 2) {
-    std::cerr << argv[0] << ": Wrong number of arguments" << std::endl 
-	      << argv[0] << ": Usage: " << " url " 
-	      << std::endl;
-    return EXIT_FAILURE;
-  }
-
-  char *url = argv[1];
-  
-  try {
-    curlpp::Cleanup cleaner;
-    curlpp::Easy request;
-
-    // Setting the URL to retrive.
-    request.setOpt(new curlpp::options::Url(url));
-
-    std::cout << request << std::endl;
-
-    // Even easier version. It does the same thing 
-    // but if you need to download only an url,
-    // this is the easiest way to do it.
-    std::cout << curlpp::options::Url(url) << std::endl;
-
-    return EXIT_SUCCESS;
-  }
-  catch ( curlpp::LogicError & e ) {
-    std::cout << e.what() << std::endl;
-  }
-  catch ( curlpp::RuntimeError & e ) {
-    std::cout << e.what() << std::endl;
-  }
-
-  return EXIT_FAILURE;
-}

+ 0 - 55
thirdparty/curlpp/examples/example23.cpp

@@ -1,55 +0,0 @@
-/**
-* \file
-* Setting request options using iterators to custom container of curlpp options.
-* 
-*/
-
-#include <vector>
-
-#include <curlpp/cURLpp.hpp>
-#include <curlpp/Easy.hpp>
-#include <curlpp/Options.hpp>
-
-
-using namespace curlpp::options;
-
-int main(int, char **)
-{
-
-	try
-	{
-
-		// That's all that is needed to do cleanup of used resources (RAII style).
-		curlpp::Cleanup myCleanup;
-
-		// Our request to be sent.
-		curlpp::Easy myRequest;
-
-		// Container of our choice with pointers to curlpp options.
-		std::vector<curlpp::OptionBase *> options;
-
-		options.push_back(new Url("http://example.com"));
-		options.push_back(new Port(80));
-
-		// Set all options in range to the Easy handle.
-		myRequest.setOpt(options.begin(), options.end());
-
-		// Send request and get a result.
-		// By default the result goes to standard output.
-		myRequest.perform();
-
-	}
-
-
-	catch(curlpp::RuntimeError & e)
-	{
-		std::cout << e.what() << std::endl;
-	}
-
-	catch(curlpp::LogicError & e)
-	{
-		std::cout << e.what() << std::endl;
-	}
-    
-  return 0;
-}

+ 0 - 104
thirdparty/curlpp/examples/example24.cpp

@@ -1,104 +0,0 @@
-/*
- *    Copyright (c) <2002-2005> <Jean-Philippe Barrette-LaPierre>
- *    
- *    Permission is hereby granted, free of charge, to any person obtaining
- *    a copy of this software and associated documentation files 
- *    (curlpp), to deal in the Software without restriction, 
- *    including without limitation the rights to use, copy, modify, merge,
- *    publish, distribute, sublicense, and/or sell copies of the Software,
- *    and to permit persons to whom the Software is furnished to do so, 
- *    subject to the following conditions:
- *    
- *    The above copyright notice and this permission notice shall be included
- *    in all copies or substantial portions of the Software.
- *    
- *    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- *    OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 
- *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
- *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
- *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include <curlpp/cURLpp.hpp>
-#include <curlpp/Easy.hpp>
-#include <curlpp/Options.hpp>
-#include <curlpp/Exception.hpp>
-#include <curlpp/Infos.hpp>
-
-#include <cstdlib>
-
-
-struct MethodClass
-{
-private:
-  MethodClass();
-
-public:
-  MethodClass(std::ostream * stream)
-    : mStream(stream)
-    , writeRound(0)
-  {}
-
-  // Helper Class for reading result from remote host
-  size_t debug(curlpp::Easy *handle, curl_infotype type, char* ptr, size_t size)
-  {
-    ++writeRound;
-
-    curlpp::options::Url url;
-    handle->getOpt(url);
-
-    // Calculate the real size of the incoming buffer
-    std::cerr << "write round: " << writeRound << ", url: " << url.getValue() << ", type: " << type << std::endl;
-    mStream->write(ptr, size);
-
-    // return the real size of the buffer...
-    return size;
-  };
-
-  // Public member vars
-  std::ostream * mStream;
-  unsigned writeRound;
-};
-
-
-int main(int argc, char *argv[])
-{
-  if(argc != 2) {
-    std::cerr << argv[0] << ": Wrong number of arguments" << std::endl 
-	      << argv[0] << ": Usage: " << " url " 
-	      << std::endl;
-    return EXIT_FAILURE;
-  }
-
-  char *url = argv[1];
-  
-  try {
-    curlpp::Cleanup cleaner;
-    curlpp::Easy request;
-
-    MethodClass mObject(&std::cerr);
-    
-    // Set the debug callback to enable cURL 
-    // to write result in a stream
-    using namespace std::placeholders;
-    curlpp::options::DebugFunction * test = new curlpp::options::DebugFunction(std::bind(&MethodClass::debug, &mObject, &request, _1, _2, _3));
-    request.setOpt(test);
-    
-    // Setting the URL to retrive.
-    request.setOpt(new curlpp::options::Url(url));
-    request.setOpt(new curlpp::options::Verbose(true));
-    request.perform();
-
-    return EXIT_SUCCESS;
-  }
-  catch ( curlpp::LogicError & e ) {
-    std::cout << e.what() << std::endl;
-  }
-  catch ( curlpp::RuntimeError & e ) {
-    std::cout << e.what() << std::endl;
-  }
-
-  return EXIT_FAILURE;
-}

+ 0 - 40
thirdparty/curlpp/extras/CMakeLists.txt

@@ -1,40 +0,0 @@
-# extracting curlpp version text + version num
-file (READ ${CMAKE_CURRENT_SOURCE_DIR}/../include/curlpp/cURLpp.hpp CURLPP_VERSION_H_CONTENTS)
-
-string (REGEX MATCH "#define LIBCURLPP_VERSION \"[^\"]*"
-  CURLPP_VERSION ${CURLPP_VERSION_H_CONTENTS})
-string (REGEX REPLACE "[^\"]+\"" "" CURLPP_VERSION ${CURLPP_VERSION})
-string (REGEX MATCH "#define LIBCURLPP_VERSION_NUM 0x[0-9a-fA-F]+"
-  CURLPP_VERSION_NUM ${CURLPP_VERSION_H_CONTENTS})
-string (REGEX REPLACE "[^0]+0x" "" CURLPP_VERSION_NUM ${CURLPP_VERSION_NUM})
-
-message(STATUS "curlpp version=[${CURLPP_VERSION}]")
-message(STATUS "curlpp version num=[${CURLPP_VERSION_NUM}]")
-
-
-# curlpp-config needs the following options to be set.
-string(REPLACE "." "" libext "${CMAKE_STATIC_LIBRARY_SUFFIX}")
-set(CC "${CMAKE_C_COMPILER}")
-set(libdir "${CMAKE_INSTALL_LIBDIR}")
-set(libdir_static "${CMAKE_INSTALL_LIBDIR}")
-set(includedir "${CMAKE_INSTALL_INCLUDEDIR}")
-set(prefix "${CMAKE_INSTALL_PREFIX}")
-
-set(LDFLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
-
-# Finally generate a "curl-config" matching this config
-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/curlpp-config.in"
-               "${CMAKE_CURRENT_BINARY_DIR}/curlpp-config" @ONLY)
-install(FILES "${CMAKE_CURRENT_BINARY_DIR}/curlpp-config"
-        DESTINATION ${CMAKE_INSTALL_BINDIR}
-        PERMISSIONS
-          OWNER_READ OWNER_WRITE OWNER_EXECUTE
-          GROUP_READ GROUP_EXECUTE
-          WORLD_READ WORLD_EXECUTE)
-
-
-# Finally generate a pkg-config file matching this config
-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/curlpp.pc.in"
-               "${CMAKE_CURRENT_BINARY_DIR}/curlpp.pc" @ONLY)
-install(FILES "${CMAKE_CURRENT_BINARY_DIR}/curlpp.pc"
-        DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)

+ 0 - 91
thirdparty/curlpp/extras/curlpp-config.in

@@ -1,91 +0,0 @@
-#! /bin/sh
-#
-# The idea to this kind of setup info script was stolen from numerous
-# other packages, such as neon, libxml and gnome.
-#
-# $Id: curlpp-config.in,v 1.4 2004/10/05 01:48:40 jpbl Exp $
-#
-prefix=@prefix@
-includedir=@includedir@
-
-usage()
-{
-    cat <<EOF
-Usage: curlpp-config [OPTION]
-
-Available values for OPTION include:
-
-  --cc        compiler
-  --cflags    pre-processor and compiler flags
-  --feature   newline separated list of enabled features
-  --help      display this help and exit
-  --libs      library linking information
-  --prefix    curl install prefix
-  --version   output version information
-  --vernum    output the version information as a number (hexadecimal)
-EOF
-
-    exit $1
-}
-
-if test $# -eq 0; then
-    usage 1
-fi
-
-while test $# -gt 0; do
-    case "$1" in
-    # this deals with options in the style
-    # --option=value and extracts the value part
-    # [not currently used]
-    -*=*) value=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
-    *) value= ;;
-    esac
-
-    case "$1" in
-    --cc)
-	echo @CC@
-	;;
-
-    --prefix)
-	echo $prefix
-	;;
-
-    --feature)
-	curl-config --feature
-        ;;
-
-    --version)
-	echo libcurlpp @CURLPP_VERSION@
-	exit 0
-	;;
-
-    --vernum)
-	echo @CURLPP_VERSION_NUM@
-	exit 0
-	;;
-
-    --help)
-	usage 0
-	;;
-
-    --cflags)
-       	echo -I@includedir@ @CURLPP_CXXFLAGS@ `curl-config --cflags`
-       	;;
-
-    --libs)
-       	echo -L@libdir@ @LDFLAGS@ @LIBS@ `curl-config --libs` -lcurlpp
-       	;;
-    --static-libs)
-       	echo @libdir_static@/libcurlpp.@libext@ @LDFLAGS@ @LIBS@ `curl-config --static-libs`
-        ;;
-
-    *)
-        echo "unknown option: $1"
-	usage
-	exit 1
-	;;
-    esac
-    shift
-done
-
-exit 0

+ 0 - 0
thirdparty/curlpp/extras/curlpp.m4


Деякі файли не було показано, через те що забагато файлів було змінено