httpp 0.7.0__tar.gz → 0.8.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (385) hide show
  1. httpp-0.8.1/.github/workflows/autobahn.yml +52 -0
  2. {httpp-0.7.0 → httpp-0.8.1}/.github/workflows/cmake.yml +2 -2
  3. {httpp-0.7.0 → httpp-0.8.1}/.github/workflows/orchestrator.yml +7 -0
  4. {httpp-0.7.0 → httpp-0.8.1}/.gitignore +1 -1
  5. httpp-0.8.1/CHANGELOG.md +475 -0
  6. {httpp-0.7.0 → httpp-0.8.1}/CMakeLists.txt +88 -33
  7. httpp-0.8.1/HANDOFF.md +170 -0
  8. {httpp-0.7.0 → httpp-0.8.1}/PKG-INFO +227 -26
  9. {httpp-0.7.0 → httpp-0.8.1}/README.md +225 -25
  10. httpp-0.8.1/benchmarks/.gitignore +1 -0
  11. httpp-0.8.1/benchmarks/CMakeLists.txt +162 -0
  12. httpp-0.8.1/benchmarks/README.md +42 -0
  13. {httpp-0.7.0 → httpp-0.8.1}/benchmarks/bench.py +4 -4
  14. httpp-0.8.1/benchmarks/bench_setup.py +113 -0
  15. httpp-0.8.1/benchmarks/cpp/cpp_bench.cpp +49 -0
  16. httpp-0.8.1/benchmarks/cpp/drogon_bench.cpp +53 -0
  17. httpp-0.8.1/benchmarks/cpp/ws_load.cpp +279 -0
  18. httpp-0.8.1/benchmarks/cpu_app.py +16 -0
  19. httpp-0.8.1/benchmarks/cpu_bench.py +24 -0
  20. httpp-0.8.1/benchmarks/diag_io.sh +100 -0
  21. httpp-0.8.1/benchmarks/fastapi_app.py +27 -0
  22. httpp-0.8.1/benchmarks/io_app.py +27 -0
  23. httpp-0.8.1/benchmarks/io_bench.py +61 -0
  24. httpp-0.8.1/benchmarks/stress.py +151 -0
  25. httpp-0.8.1/benchmarks/suite.py +528 -0
  26. httpp-0.8.1/benchmarks/suite_app.py +61 -0
  27. httpp-0.8.1/benchmarks/suite_asgi.py +28 -0
  28. httpp-0.8.1/benchmarks/ws_websockets.py +25 -0
  29. httpp-0.8.1/checklist.md +101 -0
  30. {httpp-0.7.0 → httpp-0.8.1}/cmake/EmbedFile.cmake +51 -6
  31. httpp-0.8.1/docs/Architecture.md +410 -0
  32. httpp-0.8.1/docs/adr/0001-own-both-layers.md +33 -0
  33. httpp-0.8.1/docs/adr/0002-standard-asyncio-loop.md +33 -0
  34. httpp-0.8.1/docs/adr/0003-engine-and-third-party.md +38 -0
  35. httpp-0.8.1/docs/adr/0004-zero-system-dependencies.md +22 -0
  36. httpp-0.8.1/docs/adr/0005-multiprocess-workers.md +31 -0
  37. httpp-0.8.1/docs/adr/0006-own-model-layer.md +32 -0
  38. httpp-0.8.1/docs/adr/0007-openapi-from-one-plan.md +28 -0
  39. httpp-0.8.1/docs/adr/0008-swagger-ui-compiled-in.md +35 -0
  40. httpp-0.8.1/docs/adr/0009-hot-path.md +29 -0
  41. httpp-0.8.1/docs/adr/0010-mbedtls-threading.md +30 -0
  42. httpp-0.8.1/docs/adr/0011-logging.md +37 -0
  43. httpp-0.8.1/docs/adr/0012-run-wins-over-listen.md +35 -0
  44. httpp-0.8.1/docs/adr/0013-packaging.md +25 -0
  45. httpp-0.8.1/docs/adr/0014-coding-conventions.md +22 -0
  46. httpp-0.8.1/docs/adr/0015-testing-and-ci.md +52 -0
  47. httpp-0.8.1/docs/adr/0016-hybrid-api-parity.md +49 -0
  48. httpp-0.8.1/docs/adr/0017-python-binding-policy.md +44 -0
  49. httpp-0.8.1/docs/adr/0018-python-logging-bridge.md +50 -0
  50. httpp-0.8.1/docs/adr/0019-vendored-deflate-inflate.md +46 -0
  51. httpp-0.8.1/docs/adr/0020-http-exception-and-response-classes.md +33 -0
  52. httpp-0.8.1/docs/adr/0021-pool-thread-state-and-two-core-numbers.md +153 -0
  53. httpp-0.8.1/docs/adr/0022-dual-api-rule-and-delegated-decisions.md +109 -0
  54. httpp-0.8.1/docs/adr/0023-inline-async-handlers.md +79 -0
  55. httpp-0.8.1/docs/adr/0024-io-threads-and-lanes.md +50 -0
  56. httpp-0.8.1/docs/adr/0025-measured-defaults-on-16-threads.md +155 -0
  57. httpp-0.8.1/docs/adr/0026-websocket.md +111 -0
  58. httpp-0.8.1/docs/adr/0027-websocket-python-and-async-handshake.md +79 -0
  59. httpp-0.8.1/docs/adr/0028-autobahn-called-by-the-orchestrator.md +27 -0
  60. httpp-0.8.1/docs/adr/0029-incremental-utf8-validation.md +30 -0
  61. httpp-0.8.1/docs/adr/0030-benchmarks-built-by-cmake.md +36 -0
  62. httpp-0.8.1/docs/adr/0031-compressed-embedded-files.md +50 -0
  63. httpp-0.8.1/docs/adr/0032-read-only-file-browser.md +54 -0
  64. httpp-0.8.1/docs/adr/0033-engine-per-request-cost.md +109 -0
  65. httpp-0.8.1/docs/adr/0034-balanced-connections-between-io-threads.md +49 -0
  66. httpp-0.8.1/docs/adr/0035-hook-path-needs-no-server-pointer.md +38 -0
  67. httpp-0.8.1/docs/adr/0036-connection-read-buffer-not-zero-filled.md +28 -0
  68. httpp-0.8.1/docs/adr/0037-middleware-through-use.md +34 -0
  69. httpp-0.8.1/docs/adr/0038-graceful-shutdown.md +38 -0
  70. httpp-0.8.1/docs/adr/0039-reload-supervisor.md +34 -0
  71. httpp-0.8.1/docs/adr/0040-server-tls.md +45 -0
  72. httpp-0.8.1/docs/adr/0041-native-cli-and-py.md +59 -0
  73. httpp-0.8.1/docs/adr/0042-test-client.md +46 -0
  74. httpp-0.8.1/docs/adr/0043-websocket-close-1001-on-drain.md +45 -0
  75. httpp-0.8.1/docs/adr/0044-worker-respawn.md +43 -0
  76. httpp-0.8.1/docs/adr/0045-conditional-static-files.md +42 -0
  77. httpp-0.8.1/docs/adr/0046-testclient-websocket-and-files.md +43 -0
  78. httpp-0.8.1/docs/adr/0047-one-mime-table-and-exchange-leak.md +43 -0
  79. httpp-0.8.1/docs/adr/0048-websocket-on-routers-and-dependencies.md +26 -0
  80. httpp-0.8.1/docs/adr/0049-split-the-cython-module-into-pxi-files.md +21 -0
  81. httpp-0.8.1/docs/adr/0050-own-logging-module-replaces-aixlog.md +28 -0
  82. httpp-0.8.1/docs/adr/0051-sync-client-on-the-async-engine.md +44 -0
  83. httpp-0.8.1/docs/adr/0052-downloads-stream-through-a-body-sink.md +42 -0
  84. httpp-0.8.1/docs/adr/0053-cpp-httplib-removed.md +26 -0
  85. httpp-0.8.1/docs/adr/0054-own-file-system-module.md +37 -0
  86. httpp-0.8.1/docs/adr/0055-httpp-path-class.md +27 -0
  87. httpp-0.8.1/docs/adr/0056-operating-system-log-handlers.md +27 -0
  88. httpp-0.8.1/docs/adr/0057-public-logging-module.md +28 -0
  89. httpp-0.8.1/docs/adr/0058-fs-merged-into-path.md +25 -0
  90. httpp-0.8.1/docs/adr/README.md +77 -0
  91. httpp-0.8.1/docs/agent.md +385 -0
  92. httpp-0.8.1/docs/index.rst +13 -0
  93. {httpp-0.7.0 → httpp-0.8.1}/examples/find_httpp_via_python/CMakeLists.txt +1 -1
  94. {httpp-0.7.0 → httpp-0.8.1}/examples/python/01_hello_server.py +2 -1
  95. {httpp-0.7.0 → httpp-0.8.1}/examples/python/02_path_params.py +2 -1
  96. {httpp-0.7.0 → httpp-0.8.1}/examples/python/03_request_object.py +2 -1
  97. {httpp-0.7.0 → httpp-0.8.1}/examples/python/04_responses.py +2 -1
  98. {httpp-0.7.0 → httpp-0.8.1}/examples/python/05_http_methods.py +2 -1
  99. {httpp-0.7.0 → httpp-0.8.1}/examples/python/06_async_handlers.py +2 -1
  100. {httpp-0.7.0 → httpp-0.8.1}/examples/python/14_async_client.py +2 -1
  101. {httpp-0.7.0 → httpp-0.8.1}/include/httpp/client.hpp +25 -19
  102. {httpp-0.7.0 → httpp-0.8.1}/include/httpp/curl.hpp +4 -5
  103. {httpp-0.7.0 → httpp-0.8.1}/include/httpp/curl_compat.h +4 -4
  104. {httpp-0.7.0 → httpp-0.8.1}/include/httpp/download.hpp +7 -6
  105. {httpp-0.7.0 → httpp-0.8.1}/include/httpp/export.hpp +5 -1
  106. httpp-0.8.1/include/httpp/file_browser.hpp +34 -0
  107. httpp-0.8.1/include/httpp/log.hpp +51 -0
  108. httpp-0.8.1/include/httpp/logging.hpp +334 -0
  109. httpp-0.8.1/include/httpp/middleware.hpp +54 -0
  110. httpp-0.8.1/include/httpp/path.hpp +152 -0
  111. {httpp-0.7.0 → httpp-0.8.1}/include/httpp/progress.hpp +3 -3
  112. httpp-0.8.1/include/httpp/router.hpp +77 -0
  113. {httpp-0.7.0 → httpp-0.8.1}/include/httpp/server.hpp +98 -3
  114. {httpp-0.7.0 → httpp-0.8.1}/include/httpp/sha256.hpp +2 -1
  115. {httpp-0.7.0 → httpp-0.8.1}/include/httpp/swagger_ui.hpp +9 -1
  116. {httpp-0.7.0 → httpp-0.8.1}/include/httpp/url.hpp +1 -1
  117. httpp-0.8.1/include/httpp/websocket.hpp +107 -0
  118. {httpp-0.7.0 → httpp-0.8.1}/include/httpp.h +4 -3
  119. {httpp-0.7.0 → httpp-0.8.1}/pyproject.toml +7 -5
  120. httpp-0.8.1/src/assets/file_browser.html +185 -0
  121. {httpp-0.7.0 → httpp-0.8.1}/src/bindings/python/CMakeLists.txt +26 -19
  122. httpp-0.8.1/src/bindings/python/cy/async_routes.pxi +509 -0
  123. httpp-0.8.1/src/bindings/python/cy/client.pxi +306 -0
  124. httpp-0.8.1/src/bindings/python/cy/declarations.pxi +342 -0
  125. httpp-0.8.1/src/bindings/python/cy/request.pxi +276 -0
  126. httpp-0.8.1/src/bindings/python/cy/server.pxi +281 -0
  127. httpp-0.8.1/src/bindings/python/cy/support.pxi +184 -0
  128. httpp-0.8.1/src/bindings/python/cy/transfer.pxi +498 -0
  129. httpp-0.8.1/src/bindings/python/httpp/__init__.py +78 -0
  130. httpp-0.8.1/src/bindings/python/httpp/__main__.py +131 -0
  131. httpp-0.8.1/src/bindings/python/httpp/_background.py +56 -0
  132. httpp-0.8.1/src/bindings/python/httpp/_forms.py +58 -0
  133. httpp-0.8.1/src/bindings/python/httpp/_log.py +86 -0
  134. {httpp-0.7.0 → httpp-0.8.1}/src/bindings/python/httpp/_params.py +104 -10
  135. httpp-0.8.1/src/bindings/python/httpp/_reload.py +118 -0
  136. httpp-0.8.1/src/bindings/python/httpp/_router.py +130 -0
  137. httpp-0.8.1/src/bindings/python/httpp/_run.py +321 -0
  138. {httpp-0.7.0 → httpp-0.8.1}/src/bindings/python/httpp/_schema.py +23 -3
  139. httpp-0.8.1/src/bindings/python/httpp/_websocket.py +187 -0
  140. httpp-0.8.1/src/bindings/python/httpp/middleware.py +97 -0
  141. httpp-0.8.1/src/bindings/python/httpp/responses.py +107 -0
  142. httpp-0.8.1/src/bindings/python/httpp/server.py +1422 -0
  143. httpp-0.8.1/src/bindings/python/httpp/status.py +9 -0
  144. httpp-0.8.1/src/bindings/python/httpp/testclient.py +656 -0
  145. httpp-0.8.1/src/bindings/python/httpp/utils.py +14 -0
  146. httpp-0.8.1/src/bindings/python/httpp_cli.py +79 -0
  147. httpp-0.8.1/src/bindings/python/httpp_cy.pyx +31 -0
  148. httpp-0.8.1/src/cli/httpp_cli.cpp +391 -0
  149. {httpp-0.7.0 → httpp-0.8.1}/src/core/async_http.cpp +38 -1
  150. httpp-0.8.1/src/core/async_server.cpp +1261 -0
  151. httpp-0.8.1/src/core/client.cpp +362 -0
  152. httpp-0.8.1/src/core/content_decode.cpp +78 -0
  153. httpp-0.8.1/src/core/curl.cpp +51 -0
  154. {httpp-0.7.0 → httpp-0.8.1}/src/core/curl_compat.cpp +2 -2
  155. httpp-0.8.1/src/core/deflate.cpp +96 -0
  156. httpp-0.8.1/src/core/download.cpp +520 -0
  157. httpp-0.8.1/src/core/file_browser.cpp +269 -0
  158. httpp-0.8.1/src/core/form.cpp +205 -0
  159. httpp-0.8.1/src/core/http_exchange.cpp +291 -0
  160. httpp-0.8.1/src/core/inflate.cpp +118 -0
  161. {httpp-0.7.0 → httpp-0.8.1}/src/core/internal/async_http.hpp +28 -1
  162. httpp-0.8.1/src/core/internal/async_server.hpp +156 -0
  163. httpp-0.8.1/src/core/internal/checksums.hpp +45 -0
  164. httpp-0.8.1/src/core/internal/content_decode.hpp +23 -0
  165. httpp-0.8.1/src/core/internal/deflate.hpp +19 -0
  166. httpp-0.8.1/src/core/internal/http_exchange.hpp +133 -0
  167. httpp-0.8.1/src/core/internal/inflate.hpp +37 -0
  168. {httpp-0.7.0 → httpp-0.8.1}/src/core/internal/log.hpp +2 -2
  169. httpp-0.8.1/src/core/internal/logging_os.hpp +196 -0
  170. httpp-0.8.1/src/core/internal/response_compression.hpp +31 -0
  171. {httpp-0.7.0 → httpp-0.8.1}/src/core/internal/tls_session.hpp +11 -3
  172. httpp-0.8.1/src/core/internal/urlencoded.hpp +17 -0
  173. httpp-0.8.1/src/core/internal/websocket.hpp +135 -0
  174. httpp-0.8.1/src/core/internal/worker_pool.hpp +179 -0
  175. httpp-0.8.1/src/core/log.cpp +151 -0
  176. httpp-0.8.1/src/core/logging.cpp +569 -0
  177. httpp-0.8.1/src/core/logging_os.cpp +244 -0
  178. httpp-0.8.1/src/core/middleware.cpp +247 -0
  179. httpp-0.8.1/src/core/path.cpp +247 -0
  180. httpp-0.8.1/src/core/response_compression.cpp +106 -0
  181. httpp-0.8.1/src/core/router.cpp +100 -0
  182. httpp-0.8.1/src/core/server.cpp +1422 -0
  183. {httpp-0.7.0 → httpp-0.8.1}/src/core/sha256.cpp +4 -4
  184. {httpp-0.7.0 → httpp-0.8.1}/src/core/swagger_ui.cpp +56 -7
  185. {httpp-0.7.0 → httpp-0.8.1}/src/core/tls_session.cpp +76 -3
  186. {httpp-0.7.0 → httpp-0.8.1}/src/core/url.cpp +2 -2
  187. httpp-0.8.1/src/core/websocket.cpp +437 -0
  188. httpp-0.8.1/src/core/websocket_api.cpp +45 -0
  189. httpp-0.8.1/src/third_party/CLI11/CLI11.hpp +11527 -0
  190. httpp-0.8.1/src/third_party/README.md +92 -0
  191. httpp-0.8.1/src/third_party/stb_deflate/LICENSE +39 -0
  192. httpp-0.8.1/src/third_party/stb_deflate/VENDORED.md +9 -0
  193. httpp-0.8.1/src/third_party/stb_deflate/stb_deflate.h +534 -0
  194. httpp-0.8.1/src/third_party/stb_inflate/LICENSE +38 -0
  195. httpp-0.8.1/src/third_party/stb_inflate/VENDORED.md +8 -0
  196. httpp-0.8.1/src/third_party/stb_inflate/stb_inflate.h +622 -0
  197. httpp-0.8.1/tests/CMakeLists.txt +22 -0
  198. {httpp-0.7.0 → httpp-0.8.1}/tests/cmake/consumer_project/CMakeLists.txt +1 -1
  199. {httpp-0.7.0 → httpp-0.8.1}/tests/cmake/consumer_project/main.cpp +1 -1
  200. httpp-0.8.1/tests/cmake/embed_compress/CMakeLists.txt +26 -0
  201. httpp-0.8.1/tests/cmake/embed_compress/main.cpp +61 -0
  202. {httpp-0.7.0 → httpp-0.8.1}/tests/cpp/CMakeLists.txt +8 -4
  203. httpp-0.8.1/tests/cpp/inflate_fixtures.hpp +14 -0
  204. httpp-0.8.1/tests/cpp/swagger_original.hpp +16 -0
  205. {httpp-0.7.0 → httpp-0.8.1}/tests/cpp/test_async_server.cpp +87 -0
  206. httpp-0.8.1/tests/cpp/test_async_stream.cpp +155 -0
  207. {httpp-0.7.0 → httpp-0.8.1}/tests/cpp/test_client.cpp +1 -1
  208. httpp-0.8.1/tests/cpp/test_client_blocking_engine.cpp +123 -0
  209. httpp-0.8.1/tests/cpp/test_client_encoding.cpp +160 -0
  210. {httpp-0.7.0 → httpp-0.8.1}/tests/cpp/test_client_request.cpp +4 -4
  211. {httpp-0.7.0 → httpp-0.8.1}/tests/cpp/test_curl.cpp +4 -4
  212. httpp-0.8.1/tests/cpp/test_deflate.cpp +73 -0
  213. {httpp-0.7.0 → httpp-0.8.1}/tests/cpp/test_download.cpp +18 -0
  214. httpp-0.8.1/tests/cpp/test_download_transfer.cpp +182 -0
  215. httpp-0.8.1/tests/cpp/test_file_browser.cpp +409 -0
  216. httpp-0.8.1/tests/cpp/test_form.cpp +127 -0
  217. httpp-0.8.1/tests/cpp/test_inflate.cpp +91 -0
  218. {httpp-0.7.0 → httpp-0.8.1}/tests/cpp/test_log.cpp +62 -1
  219. httpp-0.8.1/tests/cpp/test_logging_module.cpp +445 -0
  220. httpp-0.8.1/tests/cpp/test_logging_os.cpp +176 -0
  221. httpp-0.8.1/tests/cpp/test_mime.cpp +27 -0
  222. httpp-0.8.1/tests/cpp/test_path.cpp +266 -0
  223. httpp-0.8.1/tests/cpp/test_router.cpp +123 -0
  224. {httpp-0.7.0 → httpp-0.8.1}/tests/cpp/test_server.cpp +66 -0
  225. httpp-0.8.1/tests/cpp/test_server_after_send.cpp +96 -0
  226. httpp-0.8.1/tests/cpp/test_server_compression.cpp +93 -0
  227. httpp-0.8.1/tests/cpp/test_server_conditional.cpp +172 -0
  228. {httpp-0.7.0 → httpp-0.8.1}/tests/cpp/test_server_features.cpp +168 -0
  229. {httpp-0.7.0 → httpp-0.8.1}/tests/cpp/test_server_io_routes.cpp +89 -1
  230. httpp-0.8.1/tests/cpp/test_server_io_threads.cpp +191 -0
  231. httpp-0.8.1/tests/cpp/test_server_middleware.cpp +283 -0
  232. {httpp-0.7.0 → httpp-0.8.1}/tests/cpp/test_server_routing.cpp +4 -3
  233. httpp-0.8.1/tests/cpp/test_server_shutdown.cpp +222 -0
  234. httpp-0.8.1/tests/cpp/test_server_tls.cpp +270 -0
  235. httpp-0.8.1/tests/cpp/test_server_websocket.cpp +712 -0
  236. {httpp-0.7.0 → httpp-0.8.1}/tests/cpp/test_swagger_ui.cpp +22 -3
  237. httpp-0.8.1/tests/cpp/test_swagger_ui_route.cpp +123 -0
  238. httpp-0.8.1/tests/cpp/test_websocket_session.cpp +663 -0
  239. httpp-0.8.1/tests/cpp/test_worker_pool.cpp +153 -0
  240. httpp-0.8.1/tests/cpp/ws_test_client.hpp +173 -0
  241. {httpp-0.7.0 → httpp-0.8.1}/tests/python/CMakeLists.txt +4 -1
  242. httpp-0.8.1/tests/python/conftest.py +91 -0
  243. httpp-0.8.1/tests/python/test_abi3_safe.py +17 -0
  244. httpp-0.8.1/tests/python/test_cli.py +442 -0
  245. httpp-0.8.1/tests/python/test_cli_path.py +29 -0
  246. httpp-0.8.1/tests/python/test_client_encoding.py +105 -0
  247. httpp-0.8.1/tests/python/test_client_keep_alive.py +45 -0
  248. httpp-0.8.1/tests/python/test_cpp_python_parity.py +215 -0
  249. httpp-0.8.1/tests/python/test_download_sha256.py +150 -0
  250. {httpp-0.7.0 → httpp-0.8.1}/tests/python/test_embed_file.py +3 -0
  251. httpp-0.8.1/tests/python/test_file_browser.py +124 -0
  252. httpp-0.8.1/tests/python/test_forms.py +143 -0
  253. {httpp-0.7.0 → httpp-0.8.1}/tests/python/test_httpp_basic.py +28 -0
  254. {httpp-0.7.0 → httpp-0.8.1}/tests/python/test_httpp_routes.py +81 -1
  255. httpp-0.8.1/tests/python/test_inline_async.py +232 -0
  256. httpp-0.8.1/tests/python/test_io_threads.py +165 -0
  257. {httpp-0.7.0 → httpp-0.8.1}/tests/python/test_log.py +23 -0
  258. httpp-0.8.1/tests/python/test_log_bridge.py +133 -0
  259. httpp-0.8.1/tests/python/test_middleware.py +165 -0
  260. httpp-0.8.1/tests/python/test_path_templates.py +35 -0
  261. httpp-0.8.1/tests/python/test_pathlib.py +84 -0
  262. httpp-0.8.1/tests/python/test_pool_thread_state.py +37 -0
  263. httpp-0.8.1/tests/python/test_portability_sources.py +21 -0
  264. httpp-0.8.1/tests/python/test_query_encoding.py +48 -0
  265. httpp-0.8.1/tests/python/test_reload.py +149 -0
  266. httpp-0.8.1/tests/python/test_response_injection.py +173 -0
  267. httpp-0.8.1/tests/python/test_responses.py +262 -0
  268. httpp-0.8.1/tests/python/test_router.py +128 -0
  269. httpp-0.8.1/tests/python/test_run.py +478 -0
  270. {httpp-0.7.0 → httpp-0.8.1}/tests/python/test_server_features.py +205 -2
  271. {httpp-0.7.0 → httpp-0.8.1}/tests/python/test_server_raw_request.py +14 -0
  272. httpp-0.8.1/tests/python/test_shutdown.py +226 -0
  273. httpp-0.8.1/tests/python/test_testclient.py +476 -0
  274. httpp-0.8.1/tests/python/test_tls.py +183 -0
  275. httpp-0.8.1/tests/python/test_websocket.py +540 -0
  276. httpp-0.8.1/tests/python/test_websocket_router.py +320 -0
  277. httpp-0.8.1/tools/autobahn/README.md +5 -0
  278. httpp-0.8.1/tools/autobahn/check_report.py +50 -0
  279. httpp-0.8.1/tools/autobahn/echo_server.py +22 -0
  280. httpp-0.8.1/tools/autobahn/fuzzingclient.json +7 -0
  281. httpp-0.7.0/CHANGELOG.md +0 -198
  282. httpp-0.7.0/docs/Architecture.md +0 -404
  283. httpp-0.7.0/docs/agent.md +0 -381
  284. httpp-0.7.0/docs/checklist.md +0 -290
  285. httpp-0.7.0/docs/index.rst +0 -19
  286. httpp-0.7.0/handoff.md +0 -479
  287. httpp-0.7.0/include/httpp/log.hpp +0 -31
  288. httpp-0.7.0/src/bindings/python/httpp/__init__.py +0 -61
  289. httpp-0.7.0/src/bindings/python/httpp/__main__.py +0 -257
  290. httpp-0.7.0/src/bindings/python/httpp/_run.py +0 -167
  291. httpp-0.7.0/src/bindings/python/httpp/server.py +0 -900
  292. httpp-0.7.0/src/bindings/python/httpp_cy.pyx +0 -1562
  293. httpp-0.7.0/src/core/async_server.cpp +0 -654
  294. httpp-0.7.0/src/core/client.cpp +0 -799
  295. httpp-0.7.0/src/core/curl.cpp +0 -115
  296. httpp-0.7.0/src/core/download.cpp +0 -608
  297. httpp-0.7.0/src/core/internal/async_server.hpp +0 -95
  298. httpp-0.7.0/src/core/internal/httplib_common.hpp +0 -36
  299. httpp-0.7.0/src/core/internal/worker_pool.hpp +0 -107
  300. httpp-0.7.0/src/core/log.cpp +0 -107
  301. httpp-0.7.0/src/core/server.cpp +0 -853
  302. httpp-0.7.0/src/third_party/README.md +0 -68
  303. httpp-0.7.0/src/third_party/aixlog/LICENSE +0 -21
  304. httpp-0.7.0/src/third_party/aixlog/aixlog.hpp +0 -1254
  305. httpp-0.7.0/src/third_party/cpp-httplib/httplib.h +0 -22669
  306. httpp-0.7.0/tests/CMakeLists.txt +0 -13
  307. httpp-0.7.0/tests/cpp/test_swagger_ui_route.cpp +0 -62
  308. httpp-0.7.0/tests/python/test_run.py +0 -253
  309. {httpp-0.7.0 → httpp-0.8.1}/.github/workflows/release_template.md +0 -0
  310. {httpp-0.7.0 → httpp-0.8.1}/.github/workflows/wheels.yml +0 -0
  311. {httpp-0.7.0 → httpp-0.8.1}/.gitmodules +0 -0
  312. {httpp-0.7.0 → httpp-0.8.1}/LICENSE.txt +0 -0
  313. {httpp-0.7.0 → httpp-0.8.1}/benchmarks/asgi_app.py +0 -0
  314. {httpp-0.7.0 → httpp-0.8.1}/benchmarks/bench_validate.py +0 -0
  315. {httpp-0.7.0 → httpp-0.8.1}/benchmarks/httpp_app.py +0 -0
  316. {httpp-0.7.0 → httpp-0.8.1}/cmake/DynamicVersion.cmake +0 -0
  317. {httpp-0.7.0 → httpp-0.8.1}/cmake/FindCython.cmake +0 -0
  318. {httpp-0.7.0 → httpp-0.8.1}/cmake/Optimize.cmake +0 -0
  319. {httpp-0.7.0 → httpp-0.8.1}/cmake/Startup.cmake +0 -0
  320. {httpp-0.7.0 → httpp-0.8.1}/cmake/UseCython.cmake +0 -0
  321. {httpp-0.7.0 → httpp-0.8.1}/cmake/httppConfig.cmake.in +0 -0
  322. {httpp-0.7.0 → httpp-0.8.1}/cmake/httpp_mbedtls_config.h +0 -0
  323. {httpp-0.7.0 → httpp-0.8.1}/cmake/utils/embedded_files.in.hpp +0 -0
  324. {httpp-0.7.0 → httpp-0.8.1}/examples/find_httpp_via_python/main.cpp +0 -0
  325. {httpp-0.7.0 → httpp-0.8.1}/examples/python/07_serve_directory.py +0 -0
  326. {httpp-0.7.0 → httpp-0.8.1}/examples/python/08_error_handling.py +0 -0
  327. {httpp-0.7.0 → httpp-0.8.1}/examples/python/09_client.py +0 -0
  328. {httpp-0.7.0 → httpp-0.8.1}/examples/python/10_request_builder.py +0 -0
  329. {httpp-0.7.0 → httpp-0.8.1}/examples/python/11_download.py +0 -0
  330. {httpp-0.7.0 → httpp-0.8.1}/examples/python/12_hooks_and_settings.py +0 -0
  331. {httpp-0.7.0 → httpp-0.8.1}/examples/python/13_streaming_and_files.py +0 -0
  332. {httpp-0.7.0 → httpp-0.8.1}/examples/python/15_progress_and_url.py +0 -0
  333. {httpp-0.7.0 → httpp-0.8.1}/requirements-dev.txt +0 -0
  334. {httpp-0.7.0 → httpp-0.8.1}/src/bindings/python/_validate_cy.pyx +0 -0
  335. {httpp-0.7.0 → httpp-0.8.1}/src/bindings/python/httpp/_http.py +0 -0
  336. {httpp-0.7.0 → httpp-0.8.1}/src/bindings/python/httpp/_validate.py +0 -0
  337. {httpp-0.7.0 → httpp-0.8.1}/src/bindings/python/httpp/errors.py +0 -0
  338. {httpp-0.7.0 → httpp-0.8.1}/src/bindings/python/httpp/models.py +0 -0
  339. {httpp-0.7.0 → httpp-0.8.1}/src/bindings/python/httpp/progress.py +0 -0
  340. {httpp-0.7.0 → httpp-0.8.1}/src/core/internal/blocking_pool.hpp +0 -0
  341. {httpp-0.7.0 → httpp-0.8.1}/src/core/mbedtls_alt/threading_alt.h +0 -0
  342. {httpp-0.7.0 → httpp-0.8.1}/src/core/mbedtls_threading.cpp +0 -0
  343. {httpp-0.7.0 → httpp-0.8.1}/src/core/progress.cpp +0 -0
  344. {httpp-0.7.0 → httpp-0.8.1}/src/third_party/indicators/indicators.hpp +0 -0
  345. {httpp-0.7.0/src → httpp-0.8.1/src/third_party}/llhttp/LICENSE +0 -0
  346. {httpp-0.7.0/src → httpp-0.8.1/src/third_party}/llhttp/VENDORED.md +0 -0
  347. {httpp-0.7.0/src → httpp-0.8.1/src/third_party}/llhttp/include/llhttp.h +0 -0
  348. {httpp-0.7.0/src → httpp-0.8.1/src/third_party}/llhttp/src/api.c +0 -0
  349. {httpp-0.7.0/src → httpp-0.8.1/src/third_party}/llhttp/src/http.c +0 -0
  350. {httpp-0.7.0/src → httpp-0.8.1/src/third_party}/llhttp/src/llhttp.c +0 -0
  351. {httpp-0.7.0 → httpp-0.8.1}/src/third_party/swagger-ui/LICENSE +0 -0
  352. {httpp-0.7.0 → httpp-0.8.1}/src/third_party/swagger-ui/NOTICE +0 -0
  353. {httpp-0.7.0 → httpp-0.8.1}/src/third_party/swagger-ui/VENDORED.md +0 -0
  354. {httpp-0.7.0 → httpp-0.8.1}/src/third_party/swagger-ui/swagger-api-icon.svg +0 -0
  355. {httpp-0.7.0 → httpp-0.8.1}/src/third_party/swagger-ui/swagger-ui-bundle.js +0 -0
  356. {httpp-0.7.0 → httpp-0.8.1}/src/third_party/swagger-ui/swagger-ui-bundle.js.LICENSE.txt +0 -0
  357. {httpp-0.7.0 → httpp-0.8.1}/src/third_party/swagger-ui/swagger-ui.css +0 -0
  358. {httpp-0.7.0 → httpp-0.8.1}/tests/cmake/CMakeLists.txt +0 -0
  359. {httpp-0.7.0 → httpp-0.8.1}/tests/cmake/run_consumer_test.cmake +0 -0
  360. {httpp-0.7.0 → httpp-0.8.1}/tests/cpp/local_server.hpp +0 -0
  361. {httpp-0.7.0 → httpp-0.8.1}/tests/cpp/test_async_http.cpp +0 -0
  362. {httpp-0.7.0 → httpp-0.8.1}/tests/cpp/test_async_https.cpp +0 -0
  363. {httpp-0.7.0 → httpp-0.8.1}/tests/cpp/test_async_pool_proxy.cpp +0 -0
  364. {httpp-0.7.0 → httpp-0.8.1}/tests/cpp/test_certs.hpp +0 -0
  365. {httpp-0.7.0 → httpp-0.8.1}/tests/cpp/test_client_async_engine.cpp +0 -0
  366. {httpp-0.7.0 → httpp-0.8.1}/tests/cpp/test_client_session.cpp +0 -0
  367. {httpp-0.7.0 → httpp-0.8.1}/tests/cpp/test_curl_compat.cpp +0 -0
  368. {httpp-0.7.0 → httpp-0.8.1}/tests/cpp/test_progress.cpp +0 -0
  369. {httpp-0.7.0 → httpp-0.8.1}/tests/cpp/test_sha256.cpp +0 -0
  370. {httpp-0.7.0 → httpp-0.8.1}/tests/cpp/test_url.cpp +0 -0
  371. {httpp-0.7.0 → httpp-0.8.1}/tests/cpp/tls_test_server.hpp +0 -0
  372. {httpp-0.7.0 → httpp-0.8.1}/tests/python/test_async_engine.py +0 -0
  373. {httpp-0.7.0 → httpp-0.8.1}/tests/python/test_client.py +0 -0
  374. {httpp-0.7.0 → httpp-0.8.1}/tests/python/test_download_progress_url.py +0 -0
  375. {httpp-0.7.0 → httpp-0.8.1}/tests/python/test_examples.py +0 -0
  376. {httpp-0.7.0 → httpp-0.8.1}/tests/python/test_models_vs_pydantic.py +0 -0
  377. {httpp-0.7.0 → httpp-0.8.1}/tests/python/test_openapi.py +0 -0
  378. {httpp-0.7.0 → httpp-0.8.1}/tests/python/test_params_depends.py +0 -0
  379. {httpp-0.7.0 → httpp-0.8.1}/tests/python/test_validate_vs_pydantic.py +0 -0
  380. {httpp-0.7.0 → httpp-0.8.1}/tests/utest/utest.h +0 -0
  381. {httpp-0.7.0 → httpp-0.8.1}/tests/utest/utest_main.cxx +0 -0
  382. {httpp-0.7.0 → httpp-0.8.1}/tools/fastapi_probes/probe_fastapi_deps_responses.py +0 -0
  383. {httpp-0.7.0 → httpp-0.8.1}/tools/fastapi_probes/probe_fastapi_params.py +0 -0
  384. {httpp-0.7.0 → httpp-0.8.1}/tools/fastapi_probes/probe_pydantic_types.py +0 -0
  385. {httpp-0.7.0 → httpp-0.8.1}/version.py +0 -0
@@ -0,0 +1,52 @@
1
+ name: autobahn
2
+
3
+ # Called by the orchestrator after its `init` job (which clears the __beta__ assets), so the summary is uploaded after the clean-up
4
+ # and never deleted by it. It can also be run by hand. ADR-0028.
5
+ # WebSocket conformance (RFC 6455) with the Autobahn test suite against the Python echo server. Cases 12.* and 13.* (permessage-deflate) are excluded.
6
+ on:
7
+ workflow_dispatch:
8
+ workflow_call:
9
+
10
+ permissions:
11
+ contents: write
12
+
13
+ jobs:
14
+ autobahn:
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ - uses: actions/checkout@v6
18
+ with:
19
+ submodules: recursive
20
+ - uses: actions/setup-python@v6
21
+ with:
22
+ python-version: "3.12"
23
+ - name: Build and install httpp
24
+ run: pip install .
25
+ - name: Start the echo server
26
+ run: |
27
+ python tools/autobahn/echo_server.py 9001 &
28
+ sleep 2
29
+ - name: Run the Autobahn fuzzing client
30
+ working-directory: tools/autobahn
31
+ run: |
32
+ mkdir -p reports
33
+ docker run --rm --net=host -v "$PWD:/config" -v "$PWD/reports:/reports" crossbario/autobahn-testsuite wstest -m fuzzingclient -s /config/fuzzingclient.json
34
+ - name: Summarise the report
35
+ id: summary
36
+ run: python tools/autobahn/check_report.py tools/autobahn/reports/index.json autobahn-report.md
37
+ continue-on-error: true
38
+ - name: Publish the summary to the __beta__ release
39
+ if: always()
40
+ env:
41
+ GH_TOKEN: ${{ github.token }}
42
+ run: |
43
+ gh release view __beta__ >/dev/null 2>&1 || gh release create __beta__ --prerelease --title __beta__ --notes "pre-release builds"
44
+ gh release upload __beta__ autobahn-report.md --clobber
45
+ - uses: actions/upload-artifact@v4
46
+ if: always()
47
+ with:
48
+ name: autobahn-report
49
+ path: tools/autobahn/reports
50
+ - name: Fail if a case FAILED
51
+ if: steps.summary.outcome == 'failure'
52
+ run: exit 1
@@ -44,7 +44,7 @@ jobs:
44
44
 
45
45
  - name: Run tests (Linux/macOS)
46
46
  if: runner.os != 'Windows'
47
- run: ctest --test-dir build --output-on-failure --extra-verbose
47
+ run: ctest --test-dir build --output-on-failure --extra-verbose --timeout 900
48
48
 
49
49
  build-coverage:
50
50
  runs-on: ubuntu-latest
@@ -85,7 +85,7 @@ jobs:
85
85
  - name: Build and run C++ tests
86
86
  run: |
87
87
  cmake --build build --target test_httpp_cpp -j4
88
- ctest --test-dir build -R test_httpp_cpp --output-on-failure
88
+ ctest --test-dir build -R test_httpp_cpp --output-on-failure --timeout 900
89
89
 
90
90
  - name: Capture coverage
91
91
  run: |
@@ -56,6 +56,13 @@ jobs:
56
56
  uses: ./.github/workflows/wheels.yml
57
57
  needs: [init]
58
58
 
59
+ # Informational: release-wheels does not wait for it, a FAILED case must not block publishing the wheels (ADR-0028).
60
+ autobahn:
61
+ uses: ./.github/workflows/autobahn.yml
62
+ needs: [init]
63
+ permissions:
64
+ contents: write
65
+
59
66
  release-wheels:
60
67
  needs: [wheel, init]
61
68
  runs-on: ubuntu-latest
@@ -134,4 +134,4 @@ ehthumbs.db
134
134
  Thumbs.db
135
135
 
136
136
  # Build directory
137
- build/
137
+ *build*/
@@ -0,0 +1,475 @@
1
+ # Changelog
2
+
3
+ All notable changes to httpp are documented here. The format follows
4
+ [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the project follows
5
+ [Semantic Versioning](https://semver.org/) (while the major version is 0, a minor release may still change an API;
6
+ such changes are listed under **Changed**).
7
+
8
+ ## [Unreleased]
9
+
10
+ ## [0.8.1] - 2026-11-11
11
+
12
+ ### Added
13
+
14
+ - The file system module is part of `httpp::path` (ADR-0058): `stat`, `lstat`, `resolve`, `is_relative_to`, `iterdir`, `rmdir`, `is_executable` are members next to `exists`, `mkdir`, `unlink`, `rename`; there is no separate `httpp::fs` any more. `mkdir()` is now true only when this call created the directory.
15
+ - **`httpp/logging.hpp` is public** (ADR-0057): the Python-shaped logging module httpp logs through (`get_logger`, `logger`, `formatter`, `stream/file/callback/null_handler`, your own `handler` subclass) is installed and exported. The "httpp" logger can take extra handlers. Python keeps using its standard `logging`.
16
+ - **`set_log_system`** (ADR-0056, C++ and Python): send the library log to the operating system's log: syslog, logcat, Apple unified logging, Windows debugger output or the Event Log (`"native"` picks the platform's usual one). Ported from libstb.
17
+ - **`httpp::path`** (ADR-0055, `httpp/path.hpp`): a pathlib-shaped path type for C++ (`/`, `name`, `stem`, `suffix`, `parent`, `exists`, `open`, `read_text`, `path::cwd()`, `as_uri`, ...). The public API that names a file takes it (strings still convert): `download`, `sha256_file`, `set_log_file`, `set_ca_file`, `set_tls`, `mount_file_browser`, `response::file`. In Python every path argument now also takes a `pathlib.Path`.
18
+
19
+ ### Fixed
20
+
21
+ - **No more `std::filesystem` anywhere in the library or the CLI** (ADR-0054): an internal `httpp::fs` module (merged into `httpp::path` by ADR-0058) (POSIX calls, the wide Win32 API on Windows, UTF-8 paths) is used by downloads, the file browser, static files, the logging module, TLS certificate loading, `sha256_file` and the CLI. This removes the macOS 10.13 build break and five private copies of the same operations. On Windows, non-ASCII file names now work in all of them.
22
+ - **macOS wheel build:** the internal logging module's `file_handler` took a `std::filesystem::path`, which the macOS 10.13 target does not have (CI failed in `log.cpp`). It takes a UTF-8 `std::string` now (converted to UTF-16 on Windows, so a non-ASCII log path works there too), and `tests/python/test_portability_sources.py` fails on any `std::filesystem` outside an `_WIN32` block.
23
+ - **Python log bridge at interpreter exit:** the C++ trampoline checks `Py_IsInitialized()` before taking the GIL and an `atexit` hook hands the log back to stderr, so a library thread that logs late cannot reach a dying interpreter (the same fix libstb made for its bridge).
24
+
25
+ ### Changed
26
+
27
+ - **cpp-httplib is removed** (ADR-0052, ADR-0053). Downloads now stream through a body sink on a dedicated engine (the destination file is created only for an accepted status; a Range reply of 200 restarts the file), `httpp.curl` is a thin face on `client.request`, and the vendored `httplib.h` is deleted. No public API change.
28
+ - **The blocking client runs on the async engine** (ADR-0051): `client`, `client::request::run` and `client::fetch` share one policy layer with `async_client` (redirects, auth, cookies, proxy, TLS). A `client` can now be shared between threads without taking turns, connections are pooled across clients, a blocking call from an async callback returns an error instead of deadlocking, and `async_client::set_header` replaces a same-name default. cpp-httplib now serves only downloads and the `curl` helper.
29
+ - **Logging no longer uses the vendored AixLog** (ADR-0050): the library logs through a small internal module ported from libstb (Python-shaped loggers, handlers and formatter, no dependency, no patch). `set_log_level`, `set_log_file`, `set_log_callback` are unchanged in C++ and Python; the default line is now `time [LEVEL] httpp (function): message`.
30
+ - The Cython module `httpp_cy.pyx` is split into `cy/*.pxi` files (textual includes, still one module and one extension; ADR-0049). No behaviour change.
31
+
32
+ ### Added
33
+
34
+ - **WebSocket routes on routers and `Depends` on WebSocket routes** (ADR-0048): `router::route_ws` and `@router.websocket(...)` join prefixes like HTTP routes; a Python WebSocket handler may use `Depends` (sync, async, `yield` cleanup, sub-dependencies). A failing dependency refuses the upgrade (`HTTPException` status, or 422); a dependency may take `websocket`.
35
+ - **WebSocket close 1001 on shutdown** (ADR-0043): `server.shutdown()` and SIGTERM now send each open WebSocket a close frame with code 1001 and wait for the peer's answer (up to the grace period) instead of dropping the connection; a handler sees a clean close.
36
+ - **Dead `--workers` are restarted** (ADR-0044): the supervisor starts a new worker at once the first time and with a growing wait after that (0.5, 1, 2, 4 seconds); a worker that keeps dying right after it starts stops the group with exit code 1. Workers also end when the supervisor is killed, even with SIGKILL (Linux).
37
+ - **`ETag`, `Last-Modified` and conditional requests for mounted files** (ADR-0045): `If-None-Match` and `If-Modified-Since` give 304, `If-Match` and `If-Unmodified-Since` give 412, `If-Range` decides whether a `Range` is honoured. This covers `serve_directory` and the file browser's raw route.
38
+ - **`httpp.testclient.TestClient`** (ADR-0042): a Starlette-shaped client for testing your app. It serves the app on a free loopback port of its own and goes through httpp's client, so tests meet the real routing, middleware and error paths. Cookies, redirects, `base_url`/`Host`, `raise_server_exceptions`, startup and shutdown hooks (`with TestClient(app)`). Also `files=` (multipart) and `websocket_connect` (ADR-0046). Not yet: an in-memory mode.
39
+
40
+ ### Fixed
41
+
42
+ - A 304 answer no longer carries `Content-Length: 0`.
43
+ - Python's `file()`, `FileResponse` and `TestClient(files=)` choose the Content-Type with the same table as mounted directories (ADR-0047), so `ico`, `gz`, `wav` and `yaml` no longer differ and nothing depends on the operating system's MIME registry. `yaml` and `yml` are now `application/yaml`.
44
+ - The async client no longer leaks the exchanges that were still waiting when the client was destroyed (a reference cycle, ADR-0047).
45
+
46
+ ### Changed (breaking)
47
+
48
+ - The command line is a native executable now (ADR-0041): `httpp server`, `httpp browse`, `httpp download`, `httpp curl` and `httpp --version` run without Python and without the GIL (new `--shutdown-timeout` on
49
+ `server` and `browse`). The Python commands moved behind `py`: **`httpp run ...` is now `httpp py run ...`, and `httpp path ...` is now `httpp py path ...`** (`python -m httpp ...` is the same program as `httpp ...`, so it is `python -m httpp py run ...` too). The old spelling
50
+ fails with exit 2 and says what to type. Everything after `py` goes to Python untouched.
51
+ - **The wheel keeps its C++ parts in `httpp/sdk/`** (`sdk/bin/httpp`, `sdk/include/`, `sdk/lib/`, CMake config in `sdk/lib/cmake/httpp/`; on Windows the DLL is in `sdk/bin`, next to `httpp.exe`): the shape of an SDK install prefix. `httpp.get_include_dir()`, `get_lib_dir()` and `get_cmake_dir()` return the new places, so code that uses them is unaffected; anything that hard-coded `httpp/lib` or `httpp/include` must change. `find_package(httpp)` also works with `CMAKE_PREFIX_PATH` set to that `sdk` folder.
52
+ - The native executable is inside the package (`httpp/sdk/bin/httpp`, `httpp.exe` on Windows); the `httpp` console script is `httpp_cli.py` (a module next to the package, so a native command does not import it: 25 ms to start, not 80), which finds it (restoring its execute bit if an installer dropped it) and runs it. `python -m httpp ARGS` is the same program as `httpp ARGS`
53
+ (it calls the launcher). C++: CMake target `httpp_cli` (`-DHTTPP_BUILD_CLI=OFF` to skip), installed to `bin/` with the SDK. `HTTPP_PYTHON` names the interpreter the executable starts for `py` when it is run on its own.
54
+
55
+ ### Removed
56
+
57
+ - `httpp install` and `httpp uninstall` are gone (they were never released); `httpp path` (`--include-dir`, `--lib-dir`, `--cmake-dir`) is the only SDK helper.
58
+
59
+ ### Added
60
+
61
+ - C++: `server::use(before, after)` for middleware next to the application's own hooks, `httpp::add_cors` and `httpp::add_trusted_host` (`httpp/middleware.hpp`) (ADR-0037).
62
+ - Python: `Server.add_middleware(CORSMiddleware | TrustedHostMiddleware | GZipMiddleware, **options)`, shaped like Starlette's; the work runs in C++ without the GIL.
63
+ - C++: `httpp::mount_file_browser(server&, base, root, file_browser_options)`, a read-only file browser (list, navigate, preview, download; theme, accent, filter, hidden files, entry limit) with its own
64
+ embedded page and no dependencies (ADR-0032).
65
+ - Python: `Server.mount_file_browser(base, root, **options)` (same options as C++) and the `httpp browse [DIRECTORY]` command.
66
+ - C++: `server::directory_options` and `serve_directory(mount, dir, options)`: `index`, `hidden` and `download_active` (nosniff, attachment for active types). The defaults keep the old behaviour.
67
+
68
+ - TLS for the server (ADR-0040): C++ `server::set_tls(cert, key, password)`, `request::secure` / `scheme()`, `add_https_redirect`; Python `Server.set_tls`, `request.secure` / `request.scheme`, `HTTPSRedirectMiddleware`,
69
+ `run(ssl_certfile=, ssl_keyfile=, ssl_keyfile_password=)` and `httpp py run --ssl-certfile --ssl-keyfile --ssl-keyfile-password` (also with `--workers` and `--reload`). https and wss; TLS 1.2/1.3; no client certificates.
70
+ - Python: `httpp py run --reload` (`--reload-dir`, `--reload-pattern`, `run(reload=True, ...)`): restarts the app when a source file changes, development only (ADR-0039).
71
+ - C++: `server::shutdown(grace)`; Python: `Server.shutdown(grace)`, `Server.shutdown_timeout`, `run(shutdown_timeout=...)` and `httpp py run --shutdown-timeout` (ADR-0038).
72
+
73
+ ### Fixed
74
+
75
+ - Server: a NUL byte in a path under a mounted directory is refused.
76
+ - Server: a late answer through the `after` hook, error handler or compression no longer reads the server object after the server is destroyed, and a refused job runs on the current thread
77
+ instead of using a moved-from response (ADR-0035). No API change.
78
+
79
+ ### Changed
80
+
81
+ - Ctrl+C and SIGTERM in `httpp py run` / `Server.listen` now drain: requests in progress finish (answered with `Connection: close`) within `shutdown_timeout` (default 10 s) instead of being cut; a second Ctrl+C cuts at once (ADR-0038).
82
+ - Server: the method and target are compared with string literals through `std::string_view` (no `strlen`; about 0.8 percent fewer instructions per request, ADR-0033 addendum). No API change.
83
+ - Server: the 16 KiB read buffer of a connection is no longer zero-filled when the connection is made (ADR-0036). No API change.
84
+ - Server: with several I/O threads (`set_io_threads`), new connections go to the I/O thread with the fewest connections instead of wherever the kernel's `SO_REUSEPORT` hash put them (ADR-0034). No API change.
85
+ - Server: about 23 percent fewer instructions per `route_io` request (ADR-0033, items 9 to 12): no shared reference count per answer when no hook or compression is set, the response head
86
+ is written without `strlen`, responses are moved once instead of once per layer, a request answered on the spot is not entered in the 504 list. One visible detail: the 504 deadline of
87
+ an unanswered asynchronous request starts when its handler returns, not at arrival. No API change.
88
+
89
+ ## [0.8.0] - 2026-11-01
90
+
91
+ WebSocket in the C++ core and in Python, checked with the Autobahn conformance suite, and a benchmark suite built by CMake that
92
+ now sets httpp next to Drogon. One public C++ type changed: `swagger_ui_asset` (see the first entry).
93
+
94
+ - **Autobahn result** (second run, after [ADR-0029](docs/adr/0029-incremental-utf8-validation.md)): no FAILED case, 589 OK, 7 NON-STRICT and 6 INFORMATIONAL.
95
+ The `permessage-deflate` cases (12 and 13) are left out on purpose. The NON-STRICT cases (3.2, 3.3, 4.1.3, 4.1.4, 4.2.3, 4.2.4, 5.15) are behaviour the RFC leaves open.
96
+ - **Build**: `embed_files(... COMPRESS)` embeds gzip-compressed bytes (same bytes on every build), with `<name>_raw_size` and `<name>_is_gzip`; `-DHTTPP_EMBED_COMPRESS=OFF` turns it off. Swagger UI uses it: `libhttpp_core.so` is about 1.3 MB smaller, and `/docs` files are sent as stored (`Content-Encoding: gzip`, `Vary: Accept-Encoding`) to clients that accept gzip and inflated for the others. **Changed:** `httpp::swagger_ui_asset::data` holds the stored bytes (gzip unless built with `HTTPP_EMBED_COMPRESS=OFF`); new fields `raw_size` and `gzip`. See [ADR-0031](docs/adr/0031-compressed-embedded-files.md).
97
+ - **WebSocket (RFC 6455) in the C++ core**: `server::route_ws(path, ws_handler)` with a `websocket` handle (`send_text`, `send_binary`, `ping`, `close`,
98
+ `pause_reading`, `buffered_amount`). Callbacks run on the I/O thread; sends are thread-safe and the send queue is bounded (`max_buffered`, `status::full`,
99
+ `on_drain`). Text, binary, fragmentation, ping/pong, close handshake, UTF-8 and size limits, optional keep-alive pings; no extensions (no `permessage-deflate`).
100
+ The engine got a generic upgrade "tunnel". See [ADR-0026](docs/adr/0026-websocket.md).
101
+ - **WebSocket in Python**: `@app.websocket("/ws/{room}")` with an `async def` handler taking `websocket` (`accept`, `receive*`, `async for`, `send_*`, `ping`, `close`,
102
+ `WebSocketDisconnect`). One task per connection on the lane's loop; the I/O thread fills a per-connection mailbox without the GIL. Receiving is bounded (`max_queued`, the socket
103
+ is not read past it) and `await send_*` waits when the send queue is full. Browsers' `Origin` must match the host unless `origins=` says otherwise. The C++ handshake is now
104
+ asynchronous (`ws_acceptor`, `websocket::user()`, `on_close` exactly once per accepted upgrade). See [ADR-0027](docs/adr/0027-websocket-python-and-async-handshake.md).
105
+ - WebSocket text messages are checked for UTF-8 as the bytes arrive: a bad byte closes with 1007 at once (also in the middle of a frame or a fragment), instead of at the end of the message. First Autobahn run: no FAILED case; this was the only real finding ([ADR-0029](docs/adr/0029-incremental-utf8-validation.md)).
106
+ - **Benchmarks are a CMake project** (`cmake -S benchmarks -B build-bench`, targets `bench`, `bench_quick`, `bench_check`; the Makefile is gone). New: a WebSocket echo benchmark with its own load generator (`ws_load`), a memory table for many idle WebSocket connections, and Drogon (fetched and built by CMake) next to the httpp C++ API ([ADR-0030](docs/adr/0030-benchmarks-built-by-cmake.md)).
107
+ - Autobahn runs as a job of the orchestrator, after its clean-up of the `__beta__` release ([ADR-0028](docs/adr/0028-autobahn-called-by-the-orchestrator.md)).
108
+ - Fixed a data race with several I/O threads (`set_io_threads`, Python `io_threads`): the cached `Date` header text was shared by all of them, so two threads could
109
+ write and read it together. ThreadSanitizer reported it, and in the benchmarks two runs out of about 150 lost the server (a round with zero answers). The cache is now per thread.
110
+ - Answers from other threads are batched into one Asio post per burst, which cuts the cost of the thread hop.
111
+ - An `async def` handler that cannot suspend (no `await`, `async with` or `async for`, no `Depends`; Python 3.12+) runs on the I/O thread when the
112
+ loop thread is asleep and no `def` handler is running, so it skips the hop to the asyncio loop: 54.7k to 71.5k req/s on the `hello` benchmark
113
+ (2 cores, one box, interleaved). Handlers that await are unchanged. See [ADR-0023](docs/adr/0023-inline-async-handlers.md).
114
+ - `async def` and `route_async` / `route_io` requests allocate about 8 fewer objects (30 to 22 per request): `responder` keeps its state in plain members, and that state is released on the I/O thread with the answer. About 4 percent more req/s and 8 percent less CPU for an awaiting `async def`.
115
+
116
+ ### Fixed
117
+ - **A failing timing assertion could hang CI for ever.** The `worker_pool` gate tests returned early when an assertion failed, the gate stayed closed and the
118
+ pool's destructor joined blocked threads without end (a 14 minute macOS step). The tests now open the gate from an RAII guard, wait in bounded loops, and the
119
+ CMake workflow runs `ctest --timeout 900`. The growth test no longer depends on a tight wall-clock bound (`help_after` 10 ms, limit 250 ms).
120
+ - WebSocket tests poll with a timeout instead of sleeping for a fixed time.
121
+
122
+ ### Changed
123
+ - **Less work per request in the engine ([ADR-0033](docs/adr/0033-engine-per-request-cost.md))**: the Asio reactor runs without locking (sockets and timers were already
124
+ used on the loop thread only); an answer made on the loop thread (`route_io`, an inline handler) is sent at once instead of going through the poster; connection timers
125
+ are armed lazily (one deadline per connection, no timer work per keep-alive request); the response head is built without temporaries. About 27 percent fewer
126
+ instructions per `route_io` request (counted with callgrind: 25.5k to 18.3k; wall-clock gain not measured on a many-core machine). ThreadSanitizer is clean on the whole C++ suite.
127
+ - The 504 backstop for async requests keeps one list per I/O thread instead of one shared list under one mutex, so I/O threads no longer contend on it (`route_io` and Python `async def` with several I/O threads).
128
+ - **`keep_alive_max` (C++ `set_keep_alive_max`, `Server(keep_alive_max=...)`) now defaults to 1000 and `0` means no limit.** It defaulted to 100, and `0` meant 1.
129
+ - **Defaults from the first 16-thread measurement ([ADR-0025](docs/adr/0025-measured-defaults-on-16-threads.md))**: `Server(io_threads=None)` now
130
+ means `min(4, CPUs // 4)` with a GIL (1 on a free-threaded Python and on Windows); the inline `async def` path of ADR-0023 is on by default only
131
+ with 2 CPUs or fewer (`Server(inline_async=True/False)` forces it): on a machine with cores to spare it was 20 percent slower at saturation.
132
+ - **`set_thread_pool(base, max, grow_after)`** (Python: `grow_after_ms`): how long a job waits for a free worker before the pool grows. A step adds one thread per 500 us of that wait
133
+ (so one thread with the default wait, as before).
134
+ - With a GIL the worker pool starts with one thread and grows after a 10 ms wait (the maximum is unchanged): on 16 threads one worker gave 16.7k req/s on
135
+ a CPU-bound `def` handler, sixteen 10.6k (ADR-0025).
136
+
137
+ ### Added
138
+ - Benchmark suite: JSON and FastAPI rows, `io_threads` 1, 2, 4, 8 for Python too, library versions and compiler in the header, standard deviation, a fixed-rate
139
+ latency phase (p99.9 at half of each maximum), efficiency cores for the load generator.
140
+ - **`server::set_io_threads(n)`, `Server(io_threads=N)` and `httpp run --io-threads N`**: several I/O threads share the port (one engine and
141
+ one acceptor each, `SO_REUSEPORT`; not on Windows, which keeps one). On a free-threaded Python every I/O thread also gets its own asyncio
142
+ loop thread, so `async def` handlers use several cores; with a GIL there is still one loop. Default 1. See
143
+ [ADR-0024](docs/adr/0024-io-threads-and-lanes.md). Not yet measured on a many-core machine: `benchmarks/Makefile`.
144
+ - **`benchmarks/Makefile`** (`make bench`): builds venvs for 3.13, 3.14 and 3.14t, the C++ benchmark server and `oha`, then compares
145
+ uvicorn, httpp `def` / `async def` / `await` and the C++ API at several I/O thread counts into one text file.
146
+ - **`server::set_body_timeout(seconds)` and `Server(body_timeout=...)`**: the whole request body must arrive within this time after
147
+ its head (default 120 s, `0` = no limit). Before, a body dripped one byte at a time was held only by the per-read `read_timeout`.
148
+ - **`server::set_compression(min_size, level = 1)` and `Server(compression=..., compression_level=...)`**: gzip for text answers
149
+ (`text/*`, JSON, XML, JavaScript, SVG) when the client sends `Accept-Encoding: gzip`. Off by default. It runs after the hooks, adds
150
+ `Vary: Accept-Encoding`, and leaves files, streams, partial answers, already encoded bodies and bodies it cannot shrink alone. On a
151
+ `route_io` answer the work moves to a worker, never the I/O thread. Uses the vendored deflate: no new dependency.
152
+ - **Routers**: `httpp::router` and `server::include(router, prefix)` in C++, `APIRouter` and `Server.include` (alias `include_router`) in
153
+ Python. Same rules in both: outer prefix, the router's own prefix, then the path; `/` under a prefix is the prefix. Nesting works.
154
+ No request-time cost: prefixes are joined when the router is included.
155
+ - **`response::after_send`** (C++) and, in Python, the injected **`response`** argument and **`BackgroundTasks`**: a job that runs on a
156
+ worker thread after the answer was written, for work the client should not wait for. The injected `response` adds a status,
157
+ headers and cookies to a handler's answer. A throwing job is logged and ignored.
158
+ - **Forms and uploads**: `request::form()` in C++ (`form_data`, `upload_file`) parses urlencoded and `multipart/form-data` bodies, only when a
159
+ handler asks. Python: `request.form()` (a malformed body answers 400), and FastAPI-style `Form()`, `File()` and `UploadFile` parameters
160
+ with 422 errors and OpenAPI request bodies. `percent_decode` and `parse_query` moved to one internal header.
161
+ - `ServerRequest.header()`, `.query_param()`, `.path_param()` and `.cookie()`: the lookups the C++ `request` already had, same names,
162
+ `""` when absent (a second argument sets another default).
163
+ - ADR-0022: the dual C++/Python rule and the decisions the owner delegated.
164
+
165
+ ### Changed
166
+ - A failing `done()` of an `async def` route (for example a bad header) now answers a 500 at once instead of leaving the client to the 504.
167
+ - **The worker pool wakes threads last-in first-out, and does not wake a second thread until a job has waited 500 us** (a scout
168
+ thread watches the queue), so light `def` handlers run on one hot thread instead of passing the Python lock around. On two cores,
169
+ `def` `hello` went from 16k to 36k req/s (3.13) and from 19k to 33k (3.14t); `item` from 12k to 25k and from 17k to 30k. A
170
+ blocked handler delays queued requests by about 500 us. New `tests/cpp/test_worker_pool.cpp` (also run under ThreadSanitizer).
171
+
172
+ ### Changed (async)
173
+ - **`async def` routes are about 30 percent faster:** one shared timer for `handler_timeout` instead of a timer per request, and a prebuilt JSON
174
+ encoder (same output as `json.dumps`; CPython only, a circular structure now ends in a RecursionError, still a 500).
175
+ - **`async def` handlers start eagerly on Python 3.12+:** a handler that never waits finishes inside `dispatch` without a trip through the
176
+ loop's ready queue (2 to 8 percent on `hello` / `item`).
177
+ - **The `async def` inbox is drained in batches:** one lock per batch of queued requests instead of one per request (about 12 percent on
178
+ `hello`, 17 percent on `item`, 2 cores).
179
+ - **Faster answers for `str`, `dict` and `list` results,** and no `handler_timeout` bookkeeping for a handler that finishes at once
180
+ (together with the eager start about 20 percent on `hello` / `item`, 2 cores).
181
+
182
+ ### Fixed
183
+ - **`Server.listen()` could hang for ever after Ctrl+C on free-threaded Python (seen on the macOS 3.15t wheel test):** it waited on a
184
+ `threading.Event`, and an interrupt that lands inside `Event.wait()` can leave that Event's internal lock taken (or released twice), after which
185
+ `listen()` and the serving thread both block on it. It now polls a plain flag every 50 ms (`time.sleep` holds no lock). Two tests: Ctrl+C at
186
+ many different moments, and a deterministic one that `listen()` never creates an `Event` or `Condition`.
187
+ - **The macOS wheel build works again:** `serve_directory` checked symlinks with `std::filesystem`, which needs macOS 10.15 while the
188
+ wheels target 10.13. It now uses `realpath` on Linux and macOS (`std::filesystem` stays on Windows only). The tests also cover a sibling
189
+ directory whose name starts like the mounted one, and a mounted directory given with a trailing slash.
190
+ - **`def` handlers were slow: a Python thread state was created and destroyed for every request.** Each pool thread now keeps
191
+ its state (`httpp_py_pin_thread`). Measured on 2 cores, `oha`, 32 connections, plain `hello` route: CPython 3.13 9.4k -> 17.9k
192
+ req/s, free-threaded 3.14.6t 1.9k -> 24.6k req/s. A CPU-bound `def` handler on 3.14t now scales with the cores
193
+ (conc 1: 382, conc 8: 734 req/s) while 3.13 stays at about 330. A client that hangs up now closes a sync streaming generator
194
+ at once (its `finally` runs), because on free-threaded CPython an object released from another thread is freed only when
195
+ the thread that created it next runs Python.
196
+ - **A dependency without parameters failed on a route with path parameters** (`TypeError: dep() got an unexpected keyword argument 'n'`):
197
+ every dependency was handed all the path parameters of the route, not only the ones it declares. Found by a stress test; it
198
+ happened on every Python version.
199
+ - **405 instead of 404 for a wrong method.** A path that has a route for another method answers 405 with an `Allow` header
200
+ (a GET route also allows HEAD). A path with no route at all is still 404. (Changed: code that checked for 404 on a wrong method.)
201
+ - **Static files no longer follow a symlink out of the mounted directory.** Such a link answers 404; a link that stays inside is served.
202
+ - **A path parameter that does not parse** (`n: int`, `x: float`) answers 422 with the FastAPI body
203
+ `{"detail": [{"type": "int_parsing", "loc": ["path", "n"], ...}]}` instead of the old hand-made `{"error": ...}`.
204
+ - **abi3 wheel build.** `sha256_hex` took a typed memoryview, which needs `Py_buffer`; the stable ABI has it only from Python 3.11,
205
+ and the cp39-abi3 wheel failed to compile (CI only). It now takes any bytes-like object without one (`bytes` in place, others copied
206
+ once). `tests/python/test_abi3_safe.py` guards against typed memoryviews coming back.
207
+
208
+ ### Added
209
+ - **Slowloris guard and a connection limit.** The whole request head (request line and headers) must now arrive within
210
+ `header_timeout` seconds (default 10, `0` = no limit); before, a client sending one byte every few seconds kept the connection
211
+ forever because only each single read had a timeout. `set_max_connections(n)` (C++) and `Server(max_connections=n)` refuse
212
+ the connection over the limit with a 503 and close it (default: no limit). A slowly dripped request **body** is still only
213
+ covered by `read_timeout` per read.
214
+ - **`HTTPException`, response classes, `httpp.status`.** `raise httpp.HTTPException(404)` (or `(status, detail, headers)`) in a
215
+ handler or a dependency answers `{"detail": ...}` with that status; override it with `@app.exception_handler(HTTPException)`.
216
+ `JSONResponse`, `PlainTextResponse`, `HTMLResponse`, `RedirectResponse` (307 by default), `StreamingResponse` and `FileResponse`
217
+ can be returned from a handler and skip `response_model`. `httpp.status.HTTP_404_NOT_FOUND` and the rest. See ADR-0020.
218
+ - **gzip / deflate in the client, no system zlib.** Both the blocking and the async client send `Accept-Encoding: gzip, deflate`
219
+ (unless you set the header yourself) and undo `Content-Encoding: gzip`, `x-gzip`, `deflate` (zlib, or raw as some servers send it)
220
+ and chains of them, so `response.body` is always the real body. Headers are left as received, like requests and httpx. A
221
+ coding we do not advertise (`br`, `zstd`) leaves the body untouched. `max_response_size` limits the **decoded** size
222
+ (a zip bomb ends as `too_large`, status 413); corrupt data ends as `error_kind::other`, never as garbage. Set
223
+ `Accept-Encoding: identity` to ask the server not to compress. `download()` is unchanged in what it sends but now saves a compressed response exactly as received, instead of failing with 415. Built on two vendored decoders/encoders, extracted unmodified:
224
+ `src/third_party/stb_inflate` (the decoder of stb_image.h) and `src/third_party/stb_deflate` (the compressor of libstb), wrapped
225
+ by the internal `httpp::detail::inflate` / `deflate` (zlib, gzip and raw; levels 0 to 9; Adler-32 and CRC-32 checked), and tested
226
+ against Python's zlib and gzip in both directions. The compressor is ready for the server side (a GZip middleware) and for
227
+ compressing request bodies; neither is wired yet.
228
+ - **Access log.** At the `info` log level the server writes one line per answered request (`GET /items/1 200`),
229
+ including the answers the server makes itself (404, 413, ...). It goes through the library's own logging
230
+ (AixLog), so `set_log_level`, `set_log_file` and `set_log_callback` apply to it. Nothing is built or written
231
+ while the level is higher.
232
+ - **"Listening" line.** After a successful bind the server logs `listening on http://host:port` at `info`
233
+ (also for `bind_to_any_port`, with the real port). A port that is already taken only produces the existing
234
+ `cannot listen` error.
235
+
236
+ - **Python parity for downloads and hashing.** `Download.sha256()`, `Download.sha256_url()`, `Download.set_timeout()`,
237
+ `Download.set_max_wait(seconds)` and `DownloadResult.sha256`; `httpp.utils.sha256_hex()`, `httpp.utils.sha256_file()` and
238
+ `httpp.utils.parse_sha256_checksum()` (they raise `RuntimeError` where the C++ functions throw). `Client(keep_alive=False)`
239
+ mirrors `httpp::client::set_keep_alive`.
240
+ - **Parity test.** `tests/python/test_cpp_python_parity.py` fails when a public C++ name has no Python counterpart and no documented reason.
241
+
242
+ ### Changed
243
+ - **The C++ log goes through Python's `logging` automatically.** Lines arrive in `logging.getLogger("httpp")`, and that logger's level
244
+ decides what C++ produces: `logging.getLogger("httpp").setLevel(logging.INFO)` (or `logging.config.dictConfig`) now also turns on the access
245
+ log and the `listening on ...` line. `httpp.set_log_level(...)` sets the same logger level. `httpp run` still prints to stderr when the
246
+ application configured no logging. An explicit `set_log_callback`/`set_log_file` replaces the bridge. See ADR-0018.
247
+ - `Client`/`AsyncClient` encode query strings and forms with the C++ `url::build_query` instead of `urllib` (identical output, about 4x
248
+ faster for that step). One path-template parser in Python instead of two; one shared option block for `Client` and `AsyncClient`.
249
+ - **`httpp.run`, `app.run()` and `httpp run` log at `info` by default** (startup line and one line per request on
250
+ stderr, like uvicorn). Use `log_level="warning"` or `--log-level warning` to keep only problems, `off` for
251
+ nothing. `app.listen()` and the C++ API keep the default `warning`, so an embedded server stays quiet until you
252
+ call `set_log_level`. Benchmarks should run at `warning`.
253
+ - **llhttp moved to `src/third_party/llhttp`** (it was `src/llhttp`). The files are unmodified: they match the checksums in
254
+ `VENDORED.md` and the upstream `release/v9.4.3` tag byte for byte. Only the path changed.
255
+ - The `starting on ...` line printed by `run` before binding is gone; the `listening on ...` line replaces it and
256
+ only appears once the port is really bound.
257
+ - **`httpp run` wins over a `listen` in the file.** While `httpp run module:app` imports the module, `app.listen()`
258
+ and `app.run()` calls at import time (without an `if __name__ == "__main__":` guard) are skipped with a warning
259
+ (`httpp: ignoring app.listen('127.0.0.1', 8001): ...`), so `--host`, `--port` and `--workers` apply. Before, the
260
+ file's `listen` blocked the import, the CLI options were silently ignored, and `--workers` failed with a bind
261
+ error. Running the file with `python file.py` is unchanged. Only a string target (`"module:app"`) is affected.
262
+
263
+ ### Measured
264
+ First WebSocket and Drogon numbers, from the full `bench` target on a 16 thread machine (medians of 3 rounds of 5 s, 64 connections, `powersave` governor, one box,
265
+ so compare rows of this run only):
266
+ - WebSocket echo, 64 byte messages: Python 3.14 httpp 287k msg/s (1 I/O thread) against 122k for uvicorn and 111k for the `websockets` library; 3.14t with
267
+ 4 I/O threads 715k msg/s. C++: httpp 339k, 648k, 1.05M and 973k msg/s with 1, 2, 4 and 8 I/O threads against 373k, 755k, 1.06M and 974k for Drogon.
268
+ - `hello` on Python 3.14: `def` 241k req/s with 1 I/O thread and 521k with 4, against 78k for uvicorn and 22k for FastAPI with uvicorn (run after the engine changes).
269
+ - 0 errors in every row (3 rounds each), which is the first full run without a lost server since the `Date` cache fix.
270
+
271
+ ### Known limitations
272
+ - WebSocket: no `permessage-deflate`, and no TLS of its own (`wss` needs a TLS proxy in front; not tried). On WebSocket routes there are no dependencies,
273
+ no injected `response`, no background tasks, no OpenAPI entry and no `APIRouter.websocket` yet. The engine closes with a lingering close (up to 2 s), so the final
274
+ close code can arrive after the close frames.
275
+ - Memory per idle WebSocket connection is higher than in Drogon and in the `websockets` library: about 20 KiB (C++) and 24 KiB (Python) against 8.5 KiB and
276
+ 12 KiB (10,000 connections, one run).
277
+ - Plain HTTP in C++ is still slower than Drogon at the same number of I/O threads, by 7 to 17 percent after the changes above (`hello`, `route_io`: 256k, 460k and 630k
278
+ req/s with 1, 2 and 4 threads against 281k, 496k and 760k; a later run than the one in "Measured", same machine). WebSocket echo is about 9 to 14 percent behind with 1 or 2 threads and level with 4 or more.
279
+ - A free-threaded Python still defaults to one I/O thread (`io_threads`), which is about 2.4 times slower than 4 on the `hello` benchmark; set it by hand.
280
+ - The WebSocket code was run on Linux; Windows and macOS were covered by CI only. ThreadSanitizer is clean on the whole C++ suite (384 test cases); the Python layer was not run under it.
281
+
282
+ ## [0.7.0] - 2026-10-17
283
+
284
+ The biggest release so far: a native async client and server, a FastAPI-style Python layer with OpenAPI and Swagger
285
+ UI, and a download that verifies, locks and times out.
286
+
287
+ ### Added
288
+
289
+ #### Client
290
+ - **Async client** (`Client.run_async()`, `AsyncClient`) running on the library's own non-blocking network thread
291
+ (Asio) with the vendored `llhttp` parser, instead of a shared thread pool. Keep-alive connection pooling and reuse
292
+ across requests, redirect handling, TLS and proxy support.
293
+ - **Streaming responses** and **structured errors** (`httpp.errors`, with an error kind such as `timeout`) for both
294
+ the blocking and the async client; extra URL helpers in `httpp/url.hpp`.
295
+
296
+ #### Server (C++ and Python)
297
+ - **Async HTTP server** (`async_server`, with a worker pool). It speaks plain HTTP: the server has no TLS yet. TLS (Mbed TLS)
298
+ is in the async client, with session caching: TLS contexts for identical (verify, CA file) settings are built once and reused.
299
+ - **Python handlers:** route handlers with path parameters, `async def` handlers, and `listen()` that blocks and
300
+ returns a status (0.6.1); new in this release: `ResponseHead`, `file()`, `redirect()`, `set_cookie()`,
301
+ `ServerRequest.cookies`, streaming responses from generators and async generators, `@app.before_request`,
302
+ `@app.after_request`, error and exception handlers, startup and shutdown hooks, and `handler_timeout` (60 s by
303
+ default) that cancels a hanging async route and answers 504. Header values are checked against injection.
304
+ - **OpenAPI 3.1 and Swagger UI for Python.** Schema generation with Pydantic v2 models, per-route options (`summary`,
305
+ `tags`, `response_model`, ...), and `Query`, `Path`, `Header`, `Cookie`, `Body` and `Depends` (dependencies with their
306
+ own scopes and caching) that drive both the request handling and the generated document, so the docs cannot drift
307
+ from the behaviour.
308
+ - **`httpp::mount_swagger_ui(server, docs_path = "/docs", openapi_url = "/openapi.json", title = "API")`** in C++:
309
+ serves the page and the Swagger UI files (`swagger-ui-bundle.js`, `swagger-ui.css`, `swagger-api-icon.svg`) from
310
+ bytes compiled into the library, with `Cache-Control: public, max-age=86400`. Title and URL are escaped; an invalid
311
+ path throws `std::invalid_argument`. The Python server's `/docs` is now served from C++, without the GIL, and there
312
+ is no CDN or data directory involved.
313
+ - **`cmake/EmbedFile.cmake`** (`embed_files()`): compiles data files into a header at configure time (`constexpr`
314
+ data in `.rodata`, binary-safe, 32 bytes per source line).
315
+
316
+ #### Downloads
317
+ - **`download::sha256(hex)` and `download::sha256_url(url = "")`**: verify the finished file against a SHA-256 digest
318
+ (any letter case) or against a checksum file in `sha256sum` format (default `<url>.sha256`). The checksum file is
319
+ fetched first, so a missing or malformed one (an HTML error page, a name for another file, several lines) fails the
320
+ call before any download. A mismatch deletes the file, returns `ok = false` and says what the digest actually was.
321
+ With `resume()`, a complete-looking but corrupt file is downloaded again once from byte 0. `download_result` has a
322
+ new `sha256` field.
323
+ - **`httpp/sha256.hpp`**: `sha256_hex()`, `sha256_file()` (chunked) and `parse_sha256_checksum()`, on top of the
324
+ Mbed TLS already linked for HTTPS. About 165 MB/s on the machine it was measured on (130 MB file in 0.8 s).
325
+ - **`download::set_timeout(seconds)`**: connect, read and write timeouts of the transfer (like
326
+ `Client::set_timeout`), and also how long to wait for another process that holds the same file's lock.
327
+ - **`download::set_max_wait(milliseconds)`**: how long a lock that is *not being updated* is waited for before its
328
+ owner is taken for dead (default 2 s; the wait is `min(max_wait, timeout)`).
329
+ - **Cross-process lock, always on.** A download takes the directory `<dest>.lock` and its owner rewrites
330
+ `<dest>.lock/alive` every 200 ms at most; a lock that keeps being updated is waited for as long as it lives, one that
331
+ stops is taken over after `min(max_wait, timeout)`. A waiter that finds the file finished and matching `sha256()` /
332
+ `sha256_url()` uses it without a request (`skipped = true`). If the lock directory cannot be created the download
333
+ goes ahead unlocked. Written with `mkdir`/`rmdir` and plain files, no `<filesystem>`.
334
+
335
+ #### Library and tooling
336
+ - **Logging** through the vendored AixLog, with a `set_log_*` API in C, C++ and Python.
337
+ - **Python wheels:** one `cp39-abi3` wheel per platform for every GIL-enabled Python from 3.9 up, plus version-specific
338
+ free-threaded wheels (`cp313t`, `cp314t`, `cp315t`), because free-threaded builds cannot load abi3 wheels.
339
+ - **Documentation:** `docs/Architecture.md` (design, goals and test strategy), `docs/agent.md`, Python micro-benchmark
340
+ for the validators, and README sections for streaming, files, hooks, error handling and the client's new
341
+ capabilities.
342
+
343
+ ### Changed
344
+ - **Mbed TLS 4.2.0** (release tag), with threading support switched on (`MBEDTLS_THREADING_C`, via
345
+ `cmake/httpp_mbedtls_config.h`): pthread on POSIX, a small `SRWLOCK`/`CONDITION_VARIABLE` layer on Windows, or on
346
+ every platform with `-DHTTPP_MBEDTLS_THREADING_ALT=ON`. `MBEDTLS_SELF_TEST` is off.
347
+ - **`HTTPP_EMBED_AS_ARRAY` is `ON` on every platform** (it was MSVC only). One code path everywhere and no
348
+ `-Woverlength-strings` warning for the 1.5 MB Swagger UI bundle. Cost: compiling that translation unit takes about
349
+ 4.6 s instead of 0.9 s with GCC, once per build. `-DHTTPP_EMBED_AS_ARRAY=OFF` gives string literals again.
350
+ - The Swagger UI tab icon is a real SVG file served at `/docs/swagger-api-icon.svg`; the PNG favicon is gone.
351
+ - `<filesystem>` is not used any more (macOS 10.13 compatibility); `download.cpp` and the lock use `std::ifstream`,
352
+ `std::remove` and platform calls.
353
+ - Asio now drives both server loops and the async client (documentation and build comments updated).
354
+ - Build requirement: `scikit-build-core[pyproject]>=1.1`; the version is read through the standard
355
+ `[[tool.dynamic-metadata]]` table instead of the deprecated `tool.scikit-build.metadata`.
356
+ - A download creates (and removes again) `<dest>.lock` next to the destination file; the destination's directory must
357
+ be writable for the lock to work (otherwise the download is not locked).
358
+
359
+ ### Fixed
360
+ - Concurrent TLS handshakes shared Mbed TLS's global random generator without a lock; two handshakes could draw the
361
+ same random bytes. Found with ThreadSanitizer, fixed by the threading support above.
362
+ - Async `after`/`error` hooks, or a slow client, could block the event loop and deadlock concurrent requests; the
363
+ Python adapter now dispatches synchronous work directly when no async hook is registered.
364
+ - **Windows:** a finished download did not replace an existing file (`std::rename` fails when the target exists); it is
365
+ now an atomic `MoveFileExA(MOVEFILE_REPLACE_EXISTING)`. `ws2_32` is linked for `send()`/`WSAGetLastError()`, and the
366
+ `EmbedFile` generator no longer emits a zero-size array for an empty file (MSVC `C2466`).
367
+ - **macOS:** link the Keychain frameworks for the C++ tests; a URL-encoding test relied on `std::isalnum` being false
368
+ for non-ASCII bytes.
369
+ - Coverage builds use atomic profile counters (the server is multi-threaded, lcov saw negative counts); free-threaded
370
+ wheel builds prefer binary wheels so `rpds-py` is not built from source.
371
+ - Tests for concurrent async downloads measure event-loop ticks and overlapping streams instead of wall-clock time.
372
+ - **Release pipeline:** wheels are uploaded as one flat artifact, so `dist/` holds only `.whl` and `.tar.gz` files and
373
+ the PyPI upload no longer fails on a `wheelhouse` sub-directory. Windows wheels are not run through `delvewheel`
374
+ (`httpp_core.dll` is loaded from `httpp/lib/` at import time), and the PyPI step uses `skip-existing`.
375
+
376
+ ### Known limitations
377
+ - The async client has no timeout yet, and async hooks hold a thread while they run.
378
+ - `download::set_timeout`, `set_max_wait`, `sha256` and `sha256_url` are not exposed in the Python binding yet.
379
+ - A lock whose owner stops updating it for more than `max_wait` (heavy load, a suspended process) is taken over, and two
380
+ downloads can then run at once. Two waiters taking over the same dead lock in the same instant, or writing the same
381
+ destination, can write it together; use `sha256()` so a damaged result is caught and deleted. Keep `max_wait`
382
+ at 1 s or more.
383
+ - The Windows and macOS changes of this release were checked by CI only; the lock was not run under ThreadSanitizer.
384
+ - `/docs` has been looked at in Chromium only.
385
+
386
+ ## [0.6.1] - 2026-10-03
387
+
388
+ ### Added
389
+ - Python route handlers with path parameters and `async def` handlers; native async support for Python and C++
390
+ handlers.
391
+ - `listen()` blocks and returns a status in the C++ and Python bindings.
392
+ - Runnable standalone Python examples: server basics, routing, request and response handling, async handlers, static
393
+ files, error handling.
394
+
395
+ ### Changed
396
+ - Asio 1.34.2 is a git submodule (no system dependency, better scalability).
397
+ - README rewritten with a clearer description and structure; the Asio documentation was consolidated.
398
+
399
+ ### Fixed
400
+ - Windows: winsock type redefinition and missing socket headers in the tests; a Ctrl+C listener test that cannot run
401
+ there (Popen) is skipped and the SIGINT test was replaced with an `interrupt_main` variant.
402
+
403
+ ## [0.6.0] - 2026-09-16
404
+
405
+ ### Added
406
+ - Resumable downloads with skip-if-complete.
407
+
408
+ ### Changed
409
+ - **Breaking:** `download_file` was renamed to `download` and folded into one fluent builder.
410
+
411
+ ## [0.5.1] - 2026-09-16
412
+
413
+ ### Added
414
+ - `max_response_size` for the client and `follow_redirects` for downloads.
415
+ - `abi3` wheels in CI.
416
+
417
+ ### Changed
418
+ - `std::filesystem::remove` replaced by `std::remove` in downloads.
419
+
420
+ ## [0.5.0] - 2026-09-15
421
+
422
+ ### Added
423
+ - HTTPS support through Mbed TLS (documented in the API docs).
424
+
425
+ ### Changed
426
+ - Mbed TLS sources are generated before CMake configures; `jinja2` is a build dependency; submodules are no longer
427
+ fetched recursively by default.
428
+ - macOS: the Keychain frameworks are linked into `httpp_core`.
429
+ - Vendored-code warnings are suppressed and class-level exports avoided.
430
+ - Linux wheels are repaired with `auditwheel`.
431
+
432
+ ## [0.4.0] - 2026-09-14
433
+
434
+ ### Fixed
435
+ - Linux wheels are repaired with `auditwheel` in cibuildwheel builds.
436
+
437
+ ## [0.3.0] - 2026-09-14
438
+
439
+ Release only; no functional change recorded in the history.
440
+
441
+ ## [0.2.0] - 2026-09-13
442
+
443
+ ### Added
444
+ - curl-compatible API and CLI commands.
445
+
446
+ ## [0.1.1] - 2026-09-13
447
+
448
+ ### Fixed
449
+ - Linux wheels are repaired with `auditwheel` instead of copying libraries.
450
+
451
+ ## [0.1.0] - 2026-09-12
452
+
453
+ First release.
454
+
455
+ ### Added
456
+ - C++17 core: client, server and URL parsing (`liburlparser`, IPv4, IPv6 and Public Suffix List aware).
457
+ - Downloads with a progress bar (vendored `indicators`).
458
+ - Python package with `httpp_core` as a shared library bundled in the wheel; macOS rpath handling.
459
+ - CMake package: consumers find httpp through `httpp.get_cmake_dir()`; `HTTPP_BUILDING_DLL` for the shared core.
460
+ - Single umbrella header `include/httpp.h` that carries the version, and `version.py` for tagging and releases.
461
+ - CMake and wheels workflows in CI.
462
+
463
+ [Unreleased]: https://github.com/MohammadRaziei/httpp/compare/v0.8.1...HEAD
464
+ [0.8.1]: https://github.com/MohammadRaziei/httpp/compare/v0.8.0...v0.8.1
465
+ [0.8.0]: https://github.com/MohammadRaziei/httpp/compare/v0.7.0...v0.8.0
466
+ [0.7.0]: https://github.com/MohammadRaziei/httpp/compare/v0.6.1...v0.7.0
467
+ [0.6.1]: https://github.com/MohammadRaziei/httpp/compare/v0.6.0...v0.6.1
468
+ [0.6.0]: https://github.com/MohammadRaziei/httpp/compare/v0.5.1...v0.6.0
469
+ [0.5.1]: https://github.com/MohammadRaziei/httpp/compare/v0.5.0...v0.5.1
470
+ [0.5.0]: https://github.com/MohammadRaziei/httpp/compare/v0.4.0...v0.5.0
471
+ [0.4.0]: https://github.com/MohammadRaziei/httpp/compare/v0.3.0...v0.4.0
472
+ [0.3.0]: https://github.com/MohammadRaziei/httpp/compare/v0.2.0...v0.3.0
473
+ [0.2.0]: https://github.com/MohammadRaziei/httpp/compare/v0.1.1...v0.2.0
474
+ [0.1.1]: https://github.com/MohammadRaziei/httpp/compare/v0.1.0...v0.1.1
475
+ [0.1.0]: https://github.com/MohammadRaziei/httpp/releases/tag/v0.1.0