httpp 0.8.1__tar.gz → 0.9.0__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 (451) hide show
  1. httpp-0.9.0/.github/workflows/docs.yml +47 -0
  2. {httpp-0.8.1 → httpp-0.9.0}/.github/workflows/orchestrator.yml +6 -0
  3. httpp-0.9.0/.github/workflows/pages.yml +61 -0
  4. {httpp-0.8.1 → httpp-0.9.0}/.gitignore +3 -1
  5. {httpp-0.8.1 → httpp-0.9.0}/CHANGELOG.md +27 -1
  6. {httpp-0.8.1 → httpp-0.9.0}/HANDOFF.md +12 -2
  7. {httpp-0.8.1 → httpp-0.9.0}/PKG-INFO +19 -5
  8. {httpp-0.8.1 → httpp-0.9.0}/README.md +18 -4
  9. {httpp-0.8.1 → httpp-0.9.0}/benchmarks/CMakeLists.txt +7 -3
  10. {httpp-0.8.1 → httpp-0.9.0}/benchmarks/README.md +17 -1
  11. {httpp-0.8.1 → httpp-0.9.0}/benchmarks/bench.py +1 -1
  12. {httpp-0.8.1 → httpp-0.9.0}/benchmarks/bench_setup.py +5 -0
  13. httpp-0.9.0/benchmarks/client_worker.py +144 -0
  14. {httpp-0.8.1 → httpp-0.9.0}/benchmarks/cpp/cpp_bench.cpp +3 -3
  15. {httpp-0.8.1 → httpp-0.9.0}/benchmarks/cpu_bench.py +1 -1
  16. httpp-0.9.0/benchmarks/diag_async_client.py +104 -0
  17. httpp-0.9.0/benchmarks/diag_sync_client.py +111 -0
  18. httpp-0.9.0/benchmarks/gzip_app.py +18 -0
  19. httpp-0.9.0/benchmarks/gzip_bench.py +39 -0
  20. {httpp-0.8.1 → httpp-0.9.0}/benchmarks/io_bench.py +1 -1
  21. httpp-0.9.0/benchmarks/results/.gitignore +4 -0
  22. httpp-0.9.0/benchmarks/results/full/cpp.json +1312 -0
  23. httpp-0.9.0/benchmarks/results/full/py314.json +2864 -0
  24. httpp-0.9.0/benchmarks/results/full/py314t.json +2644 -0
  25. httpp-0.9.0/benchmarks/results/full/system.json +73 -0
  26. httpp-0.9.0/benchmarks/run.sh +43 -0
  27. {httpp-0.8.1 → httpp-0.9.0}/benchmarks/suite.py +215 -14
  28. httpp-0.9.0/benchmarks/suite_aiohttp.py +50 -0
  29. {httpp-0.8.1 → httpp-0.9.0}/benchmarks/suite_app.py +3 -0
  30. {httpp-0.8.1 → httpp-0.9.0}/checklist.md +5 -4
  31. {httpp-0.8.1 → httpp-0.9.0}/docs/adr/0011-logging.md +4 -0
  32. {httpp-0.8.1 → httpp-0.9.0}/docs/adr/0032-read-only-file-browser.md +12 -1
  33. {httpp-0.8.1 → httpp-0.9.0}/docs/adr/0037-middleware-through-use.md +2 -0
  34. httpp-0.9.0/docs/adr/0059-free-threaded-pool-starts-at-two.md +48 -0
  35. httpp-0.9.0/docs/adr/0060-docs-site.md +32 -0
  36. httpp-0.9.0/docs/adr/0061-server-gzip-defaults.md +35 -0
  37. httpp-0.9.0/docs/adr/0062-request-names-match-python.md +28 -0
  38. httpp-0.9.0/docs/adr/0063-benchmark-json-and-docs-page.md +36 -0
  39. httpp-0.9.0/docs/adr/0064-docs-site-on-github-pages.md +29 -0
  40. httpp-0.9.0/docs/adr/0065-file-browser-builder.md +29 -0
  41. httpp-0.9.0/docs/adr/0066-option-structs-become-builders.md +28 -0
  42. httpp-0.9.0/docs/adr/0067-urls-are-httpp-url-and-proxy-is-a-url.md +28 -0
  43. httpp-0.9.0/docs/adr/0068-socks5-proxy.md +19 -0
  44. httpp-0.9.0/docs/adr/0069-forwarded-headers.md +28 -0
  45. httpp-0.9.0/docs/adr/0070-file-browser-safe-mode.md +42 -0
  46. httpp-0.9.0/docs/adr/0071-client-pool-keeps-every-connection-of-a-burst.md +42 -0
  47. {httpp-0.8.1 → httpp-0.9.0}/docs/adr/README.md +11 -0
  48. httpp-0.9.0/docs/site/.gitignore +4 -0
  49. httpp-0.9.0/docs/site/README.md +47 -0
  50. httpp-0.9.0/docs/site/docs/benchmarks.mdx +48 -0
  51. httpp-0.9.0/docs/site/docs/client/download.mdx +87 -0
  52. httpp-0.9.0/docs/site/docs/client/get-request.mdx +38 -0
  53. httpp-0.9.0/docs/site/docs/client/post-request.mdx +47 -0
  54. httpp-0.9.0/docs/site/docs/install.mdx +58 -0
  55. httpp-0.9.0/docs/site/docs/intro.mdx +23 -0
  56. httpp-0.9.0/docs/site/docs/server/file-browser.mdx +76 -0
  57. httpp-0.9.0/docs/site/docs/server/get-route.mdx +46 -0
  58. httpp-0.9.0/docs/site/docs/server/hooks.mdx +46 -0
  59. httpp-0.9.0/docs/site/docs/server/request-data.mdx +47 -0
  60. httpp-0.9.0/docs/site/docs/server/responses.mdx +55 -0
  61. httpp-0.9.0/docs/site/docs/server/send-file.mdx +46 -0
  62. httpp-0.9.0/docs/site/docs/server/serve-directory.mdx +60 -0
  63. httpp-0.9.0/docs/site/docusaurus.config.ts +42 -0
  64. httpp-0.9.0/docs/site/languages.json +4 -0
  65. httpp-0.9.0/docs/site/package-lock.json +16200 -0
  66. httpp-0.9.0/docs/site/package.json +33 -0
  67. httpp-0.9.0/docs/site/scripts/prepare.py +123 -0
  68. httpp-0.9.0/docs/site/scripts/test_snippets.py +322 -0
  69. httpp-0.9.0/docs/site/sidebars.ts +21 -0
  70. httpp-0.9.0/docs/site/snippets/cpp/client_get.cpp +12 -0
  71. httpp-0.9.0/docs/site/snippets/cpp/client_post.cpp +13 -0
  72. httpp-0.9.0/docs/site/snippets/cpp/download_async.cpp +13 -0
  73. httpp-0.9.0/docs/site/snippets/cpp/download_file.cpp +8 -0
  74. httpp-0.9.0/docs/site/snippets/cpp/download_verified.cpp +15 -0
  75. httpp-0.9.0/docs/site/snippets/cpp/file_browser.cpp +10 -0
  76. httpp-0.9.0/docs/site/snippets/cpp/get_route.cpp +11 -0
  77. httpp-0.9.0/docs/site/snippets/cpp/hooks.cpp +22 -0
  78. httpp-0.9.0/docs/site/snippets/cpp/request_info.cpp +14 -0
  79. httpp-0.9.0/docs/site/snippets/cpp/responses.cpp +22 -0
  80. httpp-0.9.0/docs/site/snippets/cpp/send_file.cpp +13 -0
  81. httpp-0.9.0/docs/site/snippets/cpp/serve_folder.cpp +8 -0
  82. httpp-0.9.0/docs/site/snippets/python/client_get.py +8 -0
  83. httpp-0.9.0/docs/site/snippets/python/client_post.py +12 -0
  84. httpp-0.9.0/docs/site/snippets/python/download_async.py +11 -0
  85. httpp-0.9.0/docs/site/snippets/python/download_file.py +4 -0
  86. httpp-0.9.0/docs/site/snippets/python/download_verified.py +11 -0
  87. httpp-0.9.0/docs/site/snippets/python/file_browser.py +7 -0
  88. httpp-0.9.0/docs/site/snippets/python/get_route.py +12 -0
  89. httpp-0.9.0/docs/site/snippets/python/hooks.py +23 -0
  90. httpp-0.9.0/docs/site/snippets/python/request_info.py +17 -0
  91. httpp-0.9.0/docs/site/snippets/python/responses.py +20 -0
  92. httpp-0.9.0/docs/site/snippets/python/send_file.py +13 -0
  93. httpp-0.9.0/docs/site/snippets/python/serve_folder.py +7 -0
  94. httpp-0.9.0/docs/site/src/components/Bench.module.css +104 -0
  95. httpp-0.9.0/docs/site/src/components/Bench.tsx +361 -0
  96. httpp-0.9.0/docs/site/src/components/Lang.module.css +40 -0
  97. httpp-0.9.0/docs/site/src/components/Lang.tsx +45 -0
  98. httpp-0.9.0/docs/site/src/components/LangContext.tsx +39 -0
  99. httpp-0.9.0/docs/site/src/components/LangSwitch.module.css +34 -0
  100. httpp-0.9.0/docs/site/src/components/LangSwitch.tsx +24 -0
  101. httpp-0.9.0/docs/site/src/components/Only.tsx +8 -0
  102. httpp-0.9.0/docs/site/src/css/custom.css +46 -0
  103. httpp-0.9.0/docs/site/src/theme/NavbarItem/ComponentTypes.tsx +7 -0
  104. httpp-0.9.0/docs/site/src/theme/Root.tsx +6 -0
  105. httpp-0.9.0/docs/site/static/img/favicon.svg +1 -0
  106. httpp-0.9.0/docs/site/tsconfig.json +8 -0
  107. {httpp-0.8.1 → httpp-0.9.0}/include/httpp/client.hpp +87 -86
  108. {httpp-0.8.1 → httpp-0.9.0}/include/httpp/curl.hpp +2 -2
  109. {httpp-0.8.1 → httpp-0.9.0}/include/httpp/curl_compat.h +1 -1
  110. {httpp-0.8.1 → httpp-0.9.0}/include/httpp/download.hpp +4 -3
  111. {httpp-0.8.1 → httpp-0.9.0}/include/httpp/export.hpp +1 -1
  112. httpp-0.9.0/include/httpp/file_browser.hpp +70 -0
  113. httpp-0.9.0/include/httpp/middleware.hpp +104 -0
  114. {httpp-0.8.1 → httpp-0.9.0}/include/httpp/router.hpp +1 -1
  115. {httpp-0.8.1 → httpp-0.9.0}/include/httpp/server.hpp +52 -18
  116. {httpp-0.8.1 → httpp-0.9.0}/include/httpp/swagger_ui.hpp +19 -7
  117. {httpp-0.8.1 → httpp-0.9.0}/include/httpp/url.hpp +17 -1
  118. {httpp-0.8.1 → httpp-0.9.0}/include/httpp/websocket.hpp +5 -5
  119. {httpp-0.8.1 → httpp-0.9.0}/include/httpp.h +2 -2
  120. httpp-0.9.0/src/assets/file_browser.html +376 -0
  121. {httpp-0.8.1 → httpp-0.9.0}/src/bindings/python/cy/async_routes.pxi +3 -3
  122. {httpp-0.8.1 → httpp-0.9.0}/src/bindings/python/cy/client.pxi +3 -1
  123. {httpp-0.8.1 → httpp-0.9.0}/src/bindings/python/cy/declarations.pxi +18 -14
  124. httpp-0.9.0/src/bindings/python/cy/directory.pxi +53 -0
  125. httpp-0.9.0/src/bindings/python/cy/file_browser.pxi +116 -0
  126. {httpp-0.8.1 → httpp-0.9.0}/src/bindings/python/cy/request.pxi +4 -0
  127. {httpp-0.8.1 → httpp-0.9.0}/src/bindings/python/cy/server.pxi +25 -37
  128. {httpp-0.8.1 → httpp-0.9.0}/src/bindings/python/cy/support.pxi +65 -27
  129. httpp-0.9.0/src/bindings/python/cy/swagger_ui.pxi +41 -0
  130. {httpp-0.8.1 → httpp-0.9.0}/src/bindings/python/cy/transfer.pxi +15 -4
  131. {httpp-0.8.1 → httpp-0.9.0}/src/bindings/python/httpp/__init__.py +4 -4
  132. {httpp-0.8.1 → httpp-0.9.0}/src/bindings/python/httpp/_http.py +4 -2
  133. {httpp-0.8.1 → httpp-0.9.0}/src/bindings/python/httpp/middleware.py +19 -0
  134. {httpp-0.8.1 → httpp-0.9.0}/src/bindings/python/httpp/server.py +23 -6
  135. {httpp-0.8.1 → httpp-0.9.0}/src/bindings/python/httpp_cy.pyx +3 -0
  136. {httpp-0.8.1 → httpp-0.9.0}/src/cli/httpp_cli.cpp +49 -14
  137. {httpp-0.8.1 → httpp-0.9.0}/src/core/async_http.cpp +120 -7
  138. {httpp-0.8.1 → httpp-0.9.0}/src/core/async_server.cpp +12 -1
  139. {httpp-0.8.1 → httpp-0.9.0}/src/core/client.cpp +39 -38
  140. {httpp-0.8.1 → httpp-0.9.0}/src/core/curl.cpp +4 -4
  141. {httpp-0.8.1 → httpp-0.9.0}/src/core/curl_compat.cpp +3 -3
  142. {httpp-0.8.1 → httpp-0.9.0}/src/core/download.cpp +5 -5
  143. {httpp-0.8.1 → httpp-0.9.0}/src/core/file_browser.cpp +51 -23
  144. {httpp-0.8.1 → httpp-0.9.0}/src/core/form.cpp +1 -1
  145. {httpp-0.8.1 → httpp-0.9.0}/src/core/http_exchange.cpp +29 -6
  146. {httpp-0.8.1 → httpp-0.9.0}/src/core/internal/async_http.hpp +10 -1
  147. {httpp-0.8.1 → httpp-0.9.0}/src/core/internal/async_server.hpp +1 -0
  148. {httpp-0.8.1 → httpp-0.9.0}/src/core/internal/http_exchange.hpp +15 -5
  149. {httpp-0.8.1 → httpp-0.9.0}/src/core/internal/response_compression.hpp +1 -1
  150. {httpp-0.8.1 → httpp-0.9.0}/src/core/middleware.cpp +195 -28
  151. {httpp-0.8.1 → httpp-0.9.0}/src/core/response_compression.cpp +1 -1
  152. {httpp-0.8.1 → httpp-0.9.0}/src/core/server.cpp +71 -31
  153. {httpp-0.8.1 → httpp-0.9.0}/src/core/swagger_ui.cpp +20 -6
  154. {httpp-0.8.1 → httpp-0.9.0}/src/core/url.cpp +14 -1
  155. {httpp-0.8.1 → httpp-0.9.0}/tests/cmake/consumer_project/main.cpp +6 -6
  156. {httpp-0.8.1 → httpp-0.9.0}/tests/cpp/test_async_http.cpp +6 -6
  157. {httpp-0.8.1 → httpp-0.9.0}/tests/cpp/test_async_pool_proxy.cpp +263 -0
  158. {httpp-0.8.1 → httpp-0.9.0}/tests/cpp/test_async_stream.cpp +3 -3
  159. {httpp-0.8.1 → httpp-0.9.0}/tests/cpp/test_client.cpp +1 -1
  160. {httpp-0.8.1 → httpp-0.9.0}/tests/cpp/test_client_async_engine.cpp +42 -42
  161. {httpp-0.8.1 → httpp-0.9.0}/tests/cpp/test_client_blocking_engine.cpp +8 -8
  162. {httpp-0.8.1 → httpp-0.9.0}/tests/cpp/test_client_encoding.cpp +25 -25
  163. {httpp-0.8.1 → httpp-0.9.0}/tests/cpp/test_client_request.cpp +10 -10
  164. {httpp-0.8.1 → httpp-0.9.0}/tests/cpp/test_client_session.cpp +23 -23
  165. {httpp-0.8.1 → httpp-0.9.0}/tests/cpp/test_curl.cpp +5 -5
  166. {httpp-0.8.1 → httpp-0.9.0}/tests/cpp/test_curl_compat.cpp +1 -1
  167. {httpp-0.8.1 → httpp-0.9.0}/tests/cpp/test_download.cpp +9 -9
  168. {httpp-0.8.1 → httpp-0.9.0}/tests/cpp/test_download_transfer.cpp +4 -4
  169. {httpp-0.8.1 → httpp-0.9.0}/tests/cpp/test_file_browser.cpp +204 -57
  170. {httpp-0.8.1 → httpp-0.9.0}/tests/cpp/test_form.cpp +4 -4
  171. {httpp-0.8.1 → httpp-0.9.0}/tests/cpp/test_log.cpp +2 -2
  172. {httpp-0.8.1 → httpp-0.9.0}/tests/cpp/test_path.cpp +2 -2
  173. {httpp-0.8.1 → httpp-0.9.0}/tests/cpp/test_router.cpp +3 -3
  174. {httpp-0.8.1 → httpp-0.9.0}/tests/cpp/test_server.cpp +21 -21
  175. {httpp-0.8.1 → httpp-0.9.0}/tests/cpp/test_server_after_send.cpp +6 -6
  176. {httpp-0.8.1 → httpp-0.9.0}/tests/cpp/test_server_compression.cpp +6 -6
  177. {httpp-0.8.1 → httpp-0.9.0}/tests/cpp/test_server_conditional.cpp +61 -2
  178. {httpp-0.8.1 → httpp-0.9.0}/tests/cpp/test_server_features.cpp +38 -38
  179. {httpp-0.8.1 → httpp-0.9.0}/tests/cpp/test_server_io_routes.cpp +40 -40
  180. {httpp-0.8.1 → httpp-0.9.0}/tests/cpp/test_server_io_threads.cpp +15 -15
  181. {httpp-0.8.1 → httpp-0.9.0}/tests/cpp/test_server_middleware.cpp +103 -46
  182. {httpp-0.8.1 → httpp-0.9.0}/tests/cpp/test_server_routing.cpp +1 -1
  183. {httpp-0.8.1 → httpp-0.9.0}/tests/cpp/test_server_shutdown.cpp +6 -6
  184. {httpp-0.8.1 → httpp-0.9.0}/tests/cpp/test_server_tls.cpp +11 -11
  185. {httpp-0.8.1 → httpp-0.9.0}/tests/cpp/test_server_websocket.cpp +12 -12
  186. {httpp-0.8.1 → httpp-0.9.0}/tests/cpp/test_swagger_ui_route.cpp +8 -8
  187. {httpp-0.8.1 → httpp-0.9.0}/tests/cpp/test_url.cpp +25 -0
  188. httpp-0.9.0/tests/python/test_builders.py +168 -0
  189. {httpp-0.8.1 → httpp-0.9.0}/tests/python/test_cli.py +30 -0
  190. {httpp-0.8.1 → httpp-0.9.0}/tests/python/test_cpp_python_parity.py +28 -14
  191. httpp-0.9.0/tests/python/test_file_browser.py +234 -0
  192. {httpp-0.8.1 → httpp-0.9.0}/tests/python/test_io_threads.py +13 -1
  193. {httpp-0.8.1 → httpp-0.9.0}/tests/python/test_pathlib.py +1 -1
  194. httpp-0.8.1/benchmarks/.gitignore +0 -1
  195. httpp-0.8.1/include/httpp/file_browser.hpp +0 -34
  196. httpp-0.8.1/include/httpp/middleware.hpp +0 -54
  197. httpp-0.8.1/src/assets/file_browser.html +0 -185
  198. httpp-0.8.1/tests/python/test_file_browser.py +0 -124
  199. {httpp-0.8.1 → httpp-0.9.0}/.github/workflows/autobahn.yml +0 -0
  200. {httpp-0.8.1 → httpp-0.9.0}/.github/workflows/cmake.yml +0 -0
  201. {httpp-0.8.1 → httpp-0.9.0}/.github/workflows/release_template.md +0 -0
  202. {httpp-0.8.1 → httpp-0.9.0}/.github/workflows/wheels.yml +0 -0
  203. {httpp-0.8.1 → httpp-0.9.0}/.gitmodules +0 -0
  204. {httpp-0.8.1 → httpp-0.9.0}/CMakeLists.txt +0 -0
  205. {httpp-0.8.1 → httpp-0.9.0}/LICENSE.txt +0 -0
  206. {httpp-0.8.1 → httpp-0.9.0}/benchmarks/asgi_app.py +0 -0
  207. {httpp-0.8.1 → httpp-0.9.0}/benchmarks/bench_validate.py +0 -0
  208. {httpp-0.8.1 → httpp-0.9.0}/benchmarks/cpp/drogon_bench.cpp +0 -0
  209. {httpp-0.8.1 → httpp-0.9.0}/benchmarks/cpp/ws_load.cpp +0 -0
  210. {httpp-0.8.1 → httpp-0.9.0}/benchmarks/cpu_app.py +0 -0
  211. {httpp-0.8.1 → httpp-0.9.0}/benchmarks/diag_io.sh +0 -0
  212. {httpp-0.8.1 → httpp-0.9.0}/benchmarks/fastapi_app.py +0 -0
  213. {httpp-0.8.1 → httpp-0.9.0}/benchmarks/httpp_app.py +0 -0
  214. {httpp-0.8.1 → httpp-0.9.0}/benchmarks/io_app.py +0 -0
  215. {httpp-0.8.1 → httpp-0.9.0}/benchmarks/stress.py +0 -0
  216. {httpp-0.8.1 → httpp-0.9.0}/benchmarks/suite_asgi.py +0 -0
  217. {httpp-0.8.1 → httpp-0.9.0}/benchmarks/ws_websockets.py +0 -0
  218. {httpp-0.8.1 → httpp-0.9.0}/cmake/DynamicVersion.cmake +0 -0
  219. {httpp-0.8.1 → httpp-0.9.0}/cmake/EmbedFile.cmake +0 -0
  220. {httpp-0.8.1 → httpp-0.9.0}/cmake/FindCython.cmake +0 -0
  221. {httpp-0.8.1 → httpp-0.9.0}/cmake/Optimize.cmake +0 -0
  222. {httpp-0.8.1 → httpp-0.9.0}/cmake/Startup.cmake +0 -0
  223. {httpp-0.8.1 → httpp-0.9.0}/cmake/UseCython.cmake +0 -0
  224. {httpp-0.8.1 → httpp-0.9.0}/cmake/httppConfig.cmake.in +0 -0
  225. {httpp-0.8.1 → httpp-0.9.0}/cmake/httpp_mbedtls_config.h +0 -0
  226. {httpp-0.8.1 → httpp-0.9.0}/cmake/utils/embedded_files.in.hpp +0 -0
  227. {httpp-0.8.1 → httpp-0.9.0}/docs/Architecture.md +0 -0
  228. {httpp-0.8.1 → httpp-0.9.0}/docs/adr/0001-own-both-layers.md +0 -0
  229. {httpp-0.8.1 → httpp-0.9.0}/docs/adr/0002-standard-asyncio-loop.md +0 -0
  230. {httpp-0.8.1 → httpp-0.9.0}/docs/adr/0003-engine-and-third-party.md +0 -0
  231. {httpp-0.8.1 → httpp-0.9.0}/docs/adr/0004-zero-system-dependencies.md +0 -0
  232. {httpp-0.8.1 → httpp-0.9.0}/docs/adr/0005-multiprocess-workers.md +0 -0
  233. {httpp-0.8.1 → httpp-0.9.0}/docs/adr/0006-own-model-layer.md +0 -0
  234. {httpp-0.8.1 → httpp-0.9.0}/docs/adr/0007-openapi-from-one-plan.md +0 -0
  235. {httpp-0.8.1 → httpp-0.9.0}/docs/adr/0008-swagger-ui-compiled-in.md +0 -0
  236. {httpp-0.8.1 → httpp-0.9.0}/docs/adr/0009-hot-path.md +0 -0
  237. {httpp-0.8.1 → httpp-0.9.0}/docs/adr/0010-mbedtls-threading.md +0 -0
  238. {httpp-0.8.1 → httpp-0.9.0}/docs/adr/0012-run-wins-over-listen.md +0 -0
  239. {httpp-0.8.1 → httpp-0.9.0}/docs/adr/0013-packaging.md +0 -0
  240. {httpp-0.8.1 → httpp-0.9.0}/docs/adr/0014-coding-conventions.md +0 -0
  241. {httpp-0.8.1 → httpp-0.9.0}/docs/adr/0015-testing-and-ci.md +0 -0
  242. {httpp-0.8.1 → httpp-0.9.0}/docs/adr/0016-hybrid-api-parity.md +0 -0
  243. {httpp-0.8.1 → httpp-0.9.0}/docs/adr/0017-python-binding-policy.md +0 -0
  244. {httpp-0.8.1 → httpp-0.9.0}/docs/adr/0018-python-logging-bridge.md +0 -0
  245. {httpp-0.8.1 → httpp-0.9.0}/docs/adr/0019-vendored-deflate-inflate.md +0 -0
  246. {httpp-0.8.1 → httpp-0.9.0}/docs/adr/0020-http-exception-and-response-classes.md +0 -0
  247. {httpp-0.8.1 → httpp-0.9.0}/docs/adr/0021-pool-thread-state-and-two-core-numbers.md +0 -0
  248. {httpp-0.8.1 → httpp-0.9.0}/docs/adr/0022-dual-api-rule-and-delegated-decisions.md +0 -0
  249. {httpp-0.8.1 → httpp-0.9.0}/docs/adr/0023-inline-async-handlers.md +0 -0
  250. {httpp-0.8.1 → httpp-0.9.0}/docs/adr/0024-io-threads-and-lanes.md +0 -0
  251. {httpp-0.8.1 → httpp-0.9.0}/docs/adr/0025-measured-defaults-on-16-threads.md +0 -0
  252. {httpp-0.8.1 → httpp-0.9.0}/docs/adr/0026-websocket.md +0 -0
  253. {httpp-0.8.1 → httpp-0.9.0}/docs/adr/0027-websocket-python-and-async-handshake.md +0 -0
  254. {httpp-0.8.1 → httpp-0.9.0}/docs/adr/0028-autobahn-called-by-the-orchestrator.md +0 -0
  255. {httpp-0.8.1 → httpp-0.9.0}/docs/adr/0029-incremental-utf8-validation.md +0 -0
  256. {httpp-0.8.1 → httpp-0.9.0}/docs/adr/0030-benchmarks-built-by-cmake.md +0 -0
  257. {httpp-0.8.1 → httpp-0.9.0}/docs/adr/0031-compressed-embedded-files.md +0 -0
  258. {httpp-0.8.1 → httpp-0.9.0}/docs/adr/0033-engine-per-request-cost.md +0 -0
  259. {httpp-0.8.1 → httpp-0.9.0}/docs/adr/0034-balanced-connections-between-io-threads.md +0 -0
  260. {httpp-0.8.1 → httpp-0.9.0}/docs/adr/0035-hook-path-needs-no-server-pointer.md +0 -0
  261. {httpp-0.8.1 → httpp-0.9.0}/docs/adr/0036-connection-read-buffer-not-zero-filled.md +0 -0
  262. {httpp-0.8.1 → httpp-0.9.0}/docs/adr/0038-graceful-shutdown.md +0 -0
  263. {httpp-0.8.1 → httpp-0.9.0}/docs/adr/0039-reload-supervisor.md +0 -0
  264. {httpp-0.8.1 → httpp-0.9.0}/docs/adr/0040-server-tls.md +0 -0
  265. {httpp-0.8.1 → httpp-0.9.0}/docs/adr/0041-native-cli-and-py.md +0 -0
  266. {httpp-0.8.1 → httpp-0.9.0}/docs/adr/0042-test-client.md +0 -0
  267. {httpp-0.8.1 → httpp-0.9.0}/docs/adr/0043-websocket-close-1001-on-drain.md +0 -0
  268. {httpp-0.8.1 → httpp-0.9.0}/docs/adr/0044-worker-respawn.md +0 -0
  269. {httpp-0.8.1 → httpp-0.9.0}/docs/adr/0045-conditional-static-files.md +0 -0
  270. {httpp-0.8.1 → httpp-0.9.0}/docs/adr/0046-testclient-websocket-and-files.md +0 -0
  271. {httpp-0.8.1 → httpp-0.9.0}/docs/adr/0047-one-mime-table-and-exchange-leak.md +0 -0
  272. {httpp-0.8.1 → httpp-0.9.0}/docs/adr/0048-websocket-on-routers-and-dependencies.md +0 -0
  273. {httpp-0.8.1 → httpp-0.9.0}/docs/adr/0049-split-the-cython-module-into-pxi-files.md +0 -0
  274. {httpp-0.8.1 → httpp-0.9.0}/docs/adr/0050-own-logging-module-replaces-aixlog.md +0 -0
  275. {httpp-0.8.1 → httpp-0.9.0}/docs/adr/0051-sync-client-on-the-async-engine.md +0 -0
  276. {httpp-0.8.1 → httpp-0.9.0}/docs/adr/0052-downloads-stream-through-a-body-sink.md +0 -0
  277. {httpp-0.8.1 → httpp-0.9.0}/docs/adr/0053-cpp-httplib-removed.md +0 -0
  278. {httpp-0.8.1 → httpp-0.9.0}/docs/adr/0054-own-file-system-module.md +0 -0
  279. {httpp-0.8.1 → httpp-0.9.0}/docs/adr/0055-httpp-path-class.md +0 -0
  280. {httpp-0.8.1 → httpp-0.9.0}/docs/adr/0056-operating-system-log-handlers.md +0 -0
  281. {httpp-0.8.1 → httpp-0.9.0}/docs/adr/0057-public-logging-module.md +0 -0
  282. {httpp-0.8.1 → httpp-0.9.0}/docs/adr/0058-fs-merged-into-path.md +0 -0
  283. {httpp-0.8.1 → httpp-0.9.0}/docs/agent.md +0 -0
  284. {httpp-0.8.1 → httpp-0.9.0}/docs/index.rst +0 -0
  285. {httpp-0.8.1 → httpp-0.9.0}/examples/find_httpp_via_python/CMakeLists.txt +0 -0
  286. {httpp-0.8.1 → httpp-0.9.0}/examples/find_httpp_via_python/main.cpp +0 -0
  287. {httpp-0.8.1 → httpp-0.9.0}/examples/python/01_hello_server.py +0 -0
  288. {httpp-0.8.1 → httpp-0.9.0}/examples/python/02_path_params.py +0 -0
  289. {httpp-0.8.1 → httpp-0.9.0}/examples/python/03_request_object.py +0 -0
  290. {httpp-0.8.1 → httpp-0.9.0}/examples/python/04_responses.py +0 -0
  291. {httpp-0.8.1 → httpp-0.9.0}/examples/python/05_http_methods.py +0 -0
  292. {httpp-0.8.1 → httpp-0.9.0}/examples/python/06_async_handlers.py +0 -0
  293. {httpp-0.8.1 → httpp-0.9.0}/examples/python/07_serve_directory.py +0 -0
  294. {httpp-0.8.1 → httpp-0.9.0}/examples/python/08_error_handling.py +0 -0
  295. {httpp-0.8.1 → httpp-0.9.0}/examples/python/09_client.py +0 -0
  296. {httpp-0.8.1 → httpp-0.9.0}/examples/python/10_request_builder.py +0 -0
  297. {httpp-0.8.1 → httpp-0.9.0}/examples/python/11_download.py +0 -0
  298. {httpp-0.8.1 → httpp-0.9.0}/examples/python/12_hooks_and_settings.py +0 -0
  299. {httpp-0.8.1 → httpp-0.9.0}/examples/python/13_streaming_and_files.py +0 -0
  300. {httpp-0.8.1 → httpp-0.9.0}/examples/python/14_async_client.py +0 -0
  301. {httpp-0.8.1 → httpp-0.9.0}/examples/python/15_progress_and_url.py +0 -0
  302. {httpp-0.8.1 → httpp-0.9.0}/include/httpp/log.hpp +0 -0
  303. {httpp-0.8.1 → httpp-0.9.0}/include/httpp/logging.hpp +0 -0
  304. {httpp-0.8.1 → httpp-0.9.0}/include/httpp/path.hpp +0 -0
  305. {httpp-0.8.1 → httpp-0.9.0}/include/httpp/progress.hpp +0 -0
  306. {httpp-0.8.1 → httpp-0.9.0}/include/httpp/sha256.hpp +0 -0
  307. {httpp-0.8.1 → httpp-0.9.0}/pyproject.toml +0 -0
  308. {httpp-0.8.1 → httpp-0.9.0}/requirements-dev.txt +0 -0
  309. {httpp-0.8.1 → httpp-0.9.0}/src/bindings/python/CMakeLists.txt +0 -0
  310. {httpp-0.8.1 → httpp-0.9.0}/src/bindings/python/_validate_cy.pyx +0 -0
  311. {httpp-0.8.1 → httpp-0.9.0}/src/bindings/python/httpp/__main__.py +0 -0
  312. {httpp-0.8.1 → httpp-0.9.0}/src/bindings/python/httpp/_background.py +0 -0
  313. {httpp-0.8.1 → httpp-0.9.0}/src/bindings/python/httpp/_forms.py +0 -0
  314. {httpp-0.8.1 → httpp-0.9.0}/src/bindings/python/httpp/_log.py +0 -0
  315. {httpp-0.8.1 → httpp-0.9.0}/src/bindings/python/httpp/_params.py +0 -0
  316. {httpp-0.8.1 → httpp-0.9.0}/src/bindings/python/httpp/_reload.py +0 -0
  317. {httpp-0.8.1 → httpp-0.9.0}/src/bindings/python/httpp/_router.py +0 -0
  318. {httpp-0.8.1 → httpp-0.9.0}/src/bindings/python/httpp/_run.py +0 -0
  319. {httpp-0.8.1 → httpp-0.9.0}/src/bindings/python/httpp/_schema.py +0 -0
  320. {httpp-0.8.1 → httpp-0.9.0}/src/bindings/python/httpp/_validate.py +0 -0
  321. {httpp-0.8.1 → httpp-0.9.0}/src/bindings/python/httpp/_websocket.py +0 -0
  322. {httpp-0.8.1 → httpp-0.9.0}/src/bindings/python/httpp/errors.py +0 -0
  323. {httpp-0.8.1 → httpp-0.9.0}/src/bindings/python/httpp/models.py +0 -0
  324. {httpp-0.8.1 → httpp-0.9.0}/src/bindings/python/httpp/progress.py +0 -0
  325. {httpp-0.8.1 → httpp-0.9.0}/src/bindings/python/httpp/responses.py +0 -0
  326. {httpp-0.8.1 → httpp-0.9.0}/src/bindings/python/httpp/status.py +0 -0
  327. {httpp-0.8.1 → httpp-0.9.0}/src/bindings/python/httpp/testclient.py +0 -0
  328. {httpp-0.8.1 → httpp-0.9.0}/src/bindings/python/httpp/utils.py +0 -0
  329. {httpp-0.8.1 → httpp-0.9.0}/src/bindings/python/httpp_cli.py +0 -0
  330. {httpp-0.8.1 → httpp-0.9.0}/src/core/content_decode.cpp +0 -0
  331. {httpp-0.8.1 → httpp-0.9.0}/src/core/deflate.cpp +0 -0
  332. {httpp-0.8.1 → httpp-0.9.0}/src/core/inflate.cpp +0 -0
  333. {httpp-0.8.1 → httpp-0.9.0}/src/core/internal/blocking_pool.hpp +0 -0
  334. {httpp-0.8.1 → httpp-0.9.0}/src/core/internal/checksums.hpp +0 -0
  335. {httpp-0.8.1 → httpp-0.9.0}/src/core/internal/content_decode.hpp +0 -0
  336. {httpp-0.8.1 → httpp-0.9.0}/src/core/internal/deflate.hpp +0 -0
  337. {httpp-0.8.1 → httpp-0.9.0}/src/core/internal/inflate.hpp +0 -0
  338. {httpp-0.8.1 → httpp-0.9.0}/src/core/internal/log.hpp +0 -0
  339. {httpp-0.8.1 → httpp-0.9.0}/src/core/internal/logging_os.hpp +0 -0
  340. {httpp-0.8.1 → httpp-0.9.0}/src/core/internal/tls_session.hpp +0 -0
  341. {httpp-0.8.1 → httpp-0.9.0}/src/core/internal/urlencoded.hpp +0 -0
  342. {httpp-0.8.1 → httpp-0.9.0}/src/core/internal/websocket.hpp +0 -0
  343. {httpp-0.8.1 → httpp-0.9.0}/src/core/internal/worker_pool.hpp +0 -0
  344. {httpp-0.8.1 → httpp-0.9.0}/src/core/log.cpp +0 -0
  345. {httpp-0.8.1 → httpp-0.9.0}/src/core/logging.cpp +0 -0
  346. {httpp-0.8.1 → httpp-0.9.0}/src/core/logging_os.cpp +0 -0
  347. {httpp-0.8.1 → httpp-0.9.0}/src/core/mbedtls_alt/threading_alt.h +0 -0
  348. {httpp-0.8.1 → httpp-0.9.0}/src/core/mbedtls_threading.cpp +0 -0
  349. {httpp-0.8.1 → httpp-0.9.0}/src/core/path.cpp +0 -0
  350. {httpp-0.8.1 → httpp-0.9.0}/src/core/progress.cpp +0 -0
  351. {httpp-0.8.1 → httpp-0.9.0}/src/core/router.cpp +0 -0
  352. {httpp-0.8.1 → httpp-0.9.0}/src/core/sha256.cpp +0 -0
  353. {httpp-0.8.1 → httpp-0.9.0}/src/core/tls_session.cpp +0 -0
  354. {httpp-0.8.1 → httpp-0.9.0}/src/core/websocket.cpp +0 -0
  355. {httpp-0.8.1 → httpp-0.9.0}/src/core/websocket_api.cpp +0 -0
  356. {httpp-0.8.1 → httpp-0.9.0}/src/third_party/CLI11/CLI11.hpp +0 -0
  357. {httpp-0.8.1 → httpp-0.9.0}/src/third_party/README.md +0 -0
  358. {httpp-0.8.1 → httpp-0.9.0}/src/third_party/indicators/indicators.hpp +0 -0
  359. {httpp-0.8.1 → httpp-0.9.0}/src/third_party/llhttp/LICENSE +0 -0
  360. {httpp-0.8.1 → httpp-0.9.0}/src/third_party/llhttp/VENDORED.md +0 -0
  361. {httpp-0.8.1 → httpp-0.9.0}/src/third_party/llhttp/include/llhttp.h +0 -0
  362. {httpp-0.8.1 → httpp-0.9.0}/src/third_party/llhttp/src/api.c +0 -0
  363. {httpp-0.8.1 → httpp-0.9.0}/src/third_party/llhttp/src/http.c +0 -0
  364. {httpp-0.8.1 → httpp-0.9.0}/src/third_party/llhttp/src/llhttp.c +0 -0
  365. {httpp-0.8.1 → httpp-0.9.0}/src/third_party/stb_deflate/LICENSE +0 -0
  366. {httpp-0.8.1 → httpp-0.9.0}/src/third_party/stb_deflate/VENDORED.md +0 -0
  367. {httpp-0.8.1 → httpp-0.9.0}/src/third_party/stb_deflate/stb_deflate.h +0 -0
  368. {httpp-0.8.1 → httpp-0.9.0}/src/third_party/stb_inflate/LICENSE +0 -0
  369. {httpp-0.8.1 → httpp-0.9.0}/src/third_party/stb_inflate/VENDORED.md +0 -0
  370. {httpp-0.8.1 → httpp-0.9.0}/src/third_party/stb_inflate/stb_inflate.h +0 -0
  371. {httpp-0.8.1 → httpp-0.9.0}/src/third_party/swagger-ui/LICENSE +0 -0
  372. {httpp-0.8.1 → httpp-0.9.0}/src/third_party/swagger-ui/NOTICE +0 -0
  373. {httpp-0.8.1 → httpp-0.9.0}/src/third_party/swagger-ui/VENDORED.md +0 -0
  374. {httpp-0.8.1 → httpp-0.9.0}/src/third_party/swagger-ui/swagger-api-icon.svg +0 -0
  375. {httpp-0.8.1 → httpp-0.9.0}/src/third_party/swagger-ui/swagger-ui-bundle.js +0 -0
  376. {httpp-0.8.1 → httpp-0.9.0}/src/third_party/swagger-ui/swagger-ui-bundle.js.LICENSE.txt +0 -0
  377. {httpp-0.8.1 → httpp-0.9.0}/src/third_party/swagger-ui/swagger-ui.css +0 -0
  378. {httpp-0.8.1 → httpp-0.9.0}/tests/CMakeLists.txt +0 -0
  379. {httpp-0.8.1 → httpp-0.9.0}/tests/cmake/CMakeLists.txt +0 -0
  380. {httpp-0.8.1 → httpp-0.9.0}/tests/cmake/consumer_project/CMakeLists.txt +0 -0
  381. {httpp-0.8.1 → httpp-0.9.0}/tests/cmake/embed_compress/CMakeLists.txt +0 -0
  382. {httpp-0.8.1 → httpp-0.9.0}/tests/cmake/embed_compress/main.cpp +0 -0
  383. {httpp-0.8.1 → httpp-0.9.0}/tests/cmake/run_consumer_test.cmake +0 -0
  384. {httpp-0.8.1 → httpp-0.9.0}/tests/cpp/CMakeLists.txt +0 -0
  385. {httpp-0.8.1 → httpp-0.9.0}/tests/cpp/inflate_fixtures.hpp +0 -0
  386. {httpp-0.8.1 → httpp-0.9.0}/tests/cpp/local_server.hpp +0 -0
  387. {httpp-0.8.1 → httpp-0.9.0}/tests/cpp/swagger_original.hpp +0 -0
  388. {httpp-0.8.1 → httpp-0.9.0}/tests/cpp/test_async_https.cpp +0 -0
  389. {httpp-0.8.1 → httpp-0.9.0}/tests/cpp/test_async_server.cpp +0 -0
  390. {httpp-0.8.1 → httpp-0.9.0}/tests/cpp/test_certs.hpp +0 -0
  391. {httpp-0.8.1 → httpp-0.9.0}/tests/cpp/test_deflate.cpp +0 -0
  392. {httpp-0.8.1 → httpp-0.9.0}/tests/cpp/test_inflate.cpp +0 -0
  393. {httpp-0.8.1 → httpp-0.9.0}/tests/cpp/test_logging_module.cpp +0 -0
  394. {httpp-0.8.1 → httpp-0.9.0}/tests/cpp/test_logging_os.cpp +0 -0
  395. {httpp-0.8.1 → httpp-0.9.0}/tests/cpp/test_mime.cpp +0 -0
  396. {httpp-0.8.1 → httpp-0.9.0}/tests/cpp/test_progress.cpp +0 -0
  397. {httpp-0.8.1 → httpp-0.9.0}/tests/cpp/test_sha256.cpp +0 -0
  398. {httpp-0.8.1 → httpp-0.9.0}/tests/cpp/test_swagger_ui.cpp +0 -0
  399. {httpp-0.8.1 → httpp-0.9.0}/tests/cpp/test_websocket_session.cpp +0 -0
  400. {httpp-0.8.1 → httpp-0.9.0}/tests/cpp/test_worker_pool.cpp +0 -0
  401. {httpp-0.8.1 → httpp-0.9.0}/tests/cpp/tls_test_server.hpp +0 -0
  402. {httpp-0.8.1 → httpp-0.9.0}/tests/cpp/ws_test_client.hpp +0 -0
  403. {httpp-0.8.1 → httpp-0.9.0}/tests/python/CMakeLists.txt +0 -0
  404. {httpp-0.8.1 → httpp-0.9.0}/tests/python/conftest.py +0 -0
  405. {httpp-0.8.1 → httpp-0.9.0}/tests/python/test_abi3_safe.py +0 -0
  406. {httpp-0.8.1 → httpp-0.9.0}/tests/python/test_async_engine.py +0 -0
  407. {httpp-0.8.1 → httpp-0.9.0}/tests/python/test_cli_path.py +0 -0
  408. {httpp-0.8.1 → httpp-0.9.0}/tests/python/test_client.py +0 -0
  409. {httpp-0.8.1 → httpp-0.9.0}/tests/python/test_client_encoding.py +0 -0
  410. {httpp-0.8.1 → httpp-0.9.0}/tests/python/test_client_keep_alive.py +0 -0
  411. {httpp-0.8.1 → httpp-0.9.0}/tests/python/test_download_progress_url.py +0 -0
  412. {httpp-0.8.1 → httpp-0.9.0}/tests/python/test_download_sha256.py +0 -0
  413. {httpp-0.8.1 → httpp-0.9.0}/tests/python/test_embed_file.py +0 -0
  414. {httpp-0.8.1 → httpp-0.9.0}/tests/python/test_examples.py +0 -0
  415. {httpp-0.8.1 → httpp-0.9.0}/tests/python/test_forms.py +0 -0
  416. {httpp-0.8.1 → httpp-0.9.0}/tests/python/test_httpp_basic.py +0 -0
  417. {httpp-0.8.1 → httpp-0.9.0}/tests/python/test_httpp_routes.py +0 -0
  418. {httpp-0.8.1 → httpp-0.9.0}/tests/python/test_inline_async.py +0 -0
  419. {httpp-0.8.1 → httpp-0.9.0}/tests/python/test_log.py +0 -0
  420. {httpp-0.8.1 → httpp-0.9.0}/tests/python/test_log_bridge.py +0 -0
  421. {httpp-0.8.1 → httpp-0.9.0}/tests/python/test_middleware.py +0 -0
  422. {httpp-0.8.1 → httpp-0.9.0}/tests/python/test_models_vs_pydantic.py +0 -0
  423. {httpp-0.8.1 → httpp-0.9.0}/tests/python/test_openapi.py +0 -0
  424. {httpp-0.8.1 → httpp-0.9.0}/tests/python/test_params_depends.py +0 -0
  425. {httpp-0.8.1 → httpp-0.9.0}/tests/python/test_path_templates.py +0 -0
  426. {httpp-0.8.1 → httpp-0.9.0}/tests/python/test_pool_thread_state.py +0 -0
  427. {httpp-0.8.1 → httpp-0.9.0}/tests/python/test_portability_sources.py +0 -0
  428. {httpp-0.8.1 → httpp-0.9.0}/tests/python/test_query_encoding.py +0 -0
  429. {httpp-0.8.1 → httpp-0.9.0}/tests/python/test_reload.py +0 -0
  430. {httpp-0.8.1 → httpp-0.9.0}/tests/python/test_response_injection.py +0 -0
  431. {httpp-0.8.1 → httpp-0.9.0}/tests/python/test_responses.py +0 -0
  432. {httpp-0.8.1 → httpp-0.9.0}/tests/python/test_router.py +0 -0
  433. {httpp-0.8.1 → httpp-0.9.0}/tests/python/test_run.py +0 -0
  434. {httpp-0.8.1 → httpp-0.9.0}/tests/python/test_server_features.py +0 -0
  435. {httpp-0.8.1 → httpp-0.9.0}/tests/python/test_server_raw_request.py +0 -0
  436. {httpp-0.8.1 → httpp-0.9.0}/tests/python/test_shutdown.py +0 -0
  437. {httpp-0.8.1 → httpp-0.9.0}/tests/python/test_testclient.py +0 -0
  438. {httpp-0.8.1 → httpp-0.9.0}/tests/python/test_tls.py +0 -0
  439. {httpp-0.8.1 → httpp-0.9.0}/tests/python/test_validate_vs_pydantic.py +0 -0
  440. {httpp-0.8.1 → httpp-0.9.0}/tests/python/test_websocket.py +0 -0
  441. {httpp-0.8.1 → httpp-0.9.0}/tests/python/test_websocket_router.py +0 -0
  442. {httpp-0.8.1 → httpp-0.9.0}/tests/utest/utest.h +0 -0
  443. {httpp-0.8.1 → httpp-0.9.0}/tests/utest/utest_main.cxx +0 -0
  444. {httpp-0.8.1 → httpp-0.9.0}/tools/autobahn/README.md +0 -0
  445. {httpp-0.8.1 → httpp-0.9.0}/tools/autobahn/check_report.py +0 -0
  446. {httpp-0.8.1 → httpp-0.9.0}/tools/autobahn/echo_server.py +0 -0
  447. {httpp-0.8.1 → httpp-0.9.0}/tools/autobahn/fuzzingclient.json +0 -0
  448. {httpp-0.8.1 → httpp-0.9.0}/tools/fastapi_probes/probe_fastapi_deps_responses.py +0 -0
  449. {httpp-0.8.1 → httpp-0.9.0}/tools/fastapi_probes/probe_fastapi_params.py +0 -0
  450. {httpp-0.8.1 → httpp-0.9.0}/tools/fastapi_probes/probe_pydantic_types.py +0 -0
  451. {httpp-0.8.1 → httpp-0.9.0}/version.py +0 -0
@@ -0,0 +1,47 @@
1
+ name: docs
2
+
3
+ # Builds the documentation site in docs/site (ADR-0060). The orchestrator calls it on every push to master and on tags; it is
4
+ # informational there (release-wheels does not wait for it). On pull requests it runs only when the site changes. Publishes nothing.
5
+ on:
6
+ workflow_dispatch:
7
+ workflow_call:
8
+ pull_request:
9
+ branches: [ master ]
10
+ paths:
11
+ - "docs/site/**"
12
+ - ".github/workflows/docs.yml"
13
+
14
+ permissions:
15
+ contents: read
16
+
17
+ jobs:
18
+ site:
19
+ runs-on: ubuntu-latest
20
+ defaults:
21
+ run:
22
+ working-directory: docs/site
23
+ steps:
24
+ - uses: actions/checkout@v6
25
+ with:
26
+ submodules: recursive
27
+ - uses: actions/setup-python@v6
28
+ with:
29
+ python-version: "3.12"
30
+ - uses: actions/setup-node@v6
31
+ with:
32
+ node-version: "22"
33
+ cache: npm
34
+ cache-dependency-path: docs/site/package-lock.json
35
+ - name: Both languages have every snippet
36
+ run: python3 scripts/prepare.py all
37
+ - name: Build and install httpp
38
+ working-directory: .
39
+ run: pip install .
40
+ - name: Snippets build, run and do what their pages say
41
+ run: python3 scripts/test_snippets.py
42
+ - name: Install
43
+ run: npm ci
44
+ - name: Type check
45
+ run: npm run typecheck
46
+ - name: Build
47
+ run: npm run build
@@ -63,6 +63,12 @@ jobs:
63
63
  permissions:
64
64
  contents: write
65
65
 
66
+ # Runs after the cmake job, so the docs are built only against a library that built and passed its tests. Informational:
67
+ # release-wheels does not wait for it, a broken docs build must not block publishing the wheels (ADR-0060).
68
+ docs:
69
+ uses: ./.github/workflows/docs.yml
70
+ needs: [init, cmake]
71
+
66
72
  release-wheels:
67
73
  needs: [wheel, init]
68
74
  runs-on: ubuntu-latest
@@ -0,0 +1,61 @@
1
+ name: pages
2
+
3
+ # Publishes the documentation site (docs/site, ADR-0064) to GitHub Pages: https://mohammadraziei.github.io/httpp/
4
+ # docs.yml checks the site (snippets, type check, build) and publishes nothing; this workflow builds it again and deploys it.
5
+ # It is a workflow of its own, not a job of docs.yml: the orchestrator calls docs.yml, and a called workflow cannot ask for
6
+ # more permissions than its caller gives.
7
+ # One-time setup: Settings -> Pages -> Source: "GitHub Actions".
8
+ on:
9
+ workflow_dispatch:
10
+ push:
11
+ branches: [ master ]
12
+ paths:
13
+ - "docs/site/**"
14
+ - "benchmarks/results/full/*.json"
15
+ - ".github/workflows/pages.yml"
16
+
17
+ permissions:
18
+ contents: read
19
+
20
+ concurrency:
21
+ group: pages
22
+ cancel-in-progress: true
23
+
24
+ jobs:
25
+ build:
26
+ runs-on: ubuntu-latest
27
+ defaults:
28
+ run:
29
+ working-directory: docs/site
30
+ steps:
31
+ - uses: actions/checkout@v6
32
+ - uses: actions/setup-python@v6
33
+ with:
34
+ python-version: "3.12"
35
+ - uses: actions/setup-node@v6
36
+ with:
37
+ node-version: "22"
38
+ cache: npm
39
+ cache-dependency-path: docs/site/package-lock.json
40
+ - name: Snippets and benchmark data
41
+ run: python3 scripts/prepare.py all
42
+ - name: Install
43
+ run: npm ci
44
+ - name: Build
45
+ run: npm run build
46
+ - uses: actions/upload-pages-artifact@v3
47
+ with:
48
+ path: docs/site/build
49
+
50
+ deploy:
51
+ needs: build
52
+ runs-on: ubuntu-latest
53
+ permissions:
54
+ pages: write
55
+ id-token: write
56
+ environment:
57
+ name: github-pages
58
+ url: ${{ steps.deployment.outputs.page_url }}
59
+ steps:
60
+ - id: deployment
61
+ uses: actions/deploy-pages@v4
@@ -134,4 +134,6 @@ ehthumbs.db
134
134
  Thumbs.db
135
135
 
136
136
  # Build directory
137
- *build*/
137
+ *build*/
138
+ # local benchmark build tree (benchmarks/CMakeLists.txt, ADR-0030)
139
+ build-bench/
@@ -7,6 +7,31 @@ such changes are listed under **Changed**).
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.9.0] - 2026-11-14
11
+
12
+ ### Added
13
+
14
+ - **File browser page (ADR-0032).** Audio and video previews use the page's own controls instead of the browser's: they follow the light, dark and accent settings and add seek with buffered range, volume, speed, full screen for video, keyboard keys, and previous and next through the files of the folder. Download, Open raw and Close are icon buttons with tooltips at the top right, the dialog is a little larger, opens and closes with a short animation, and closes on a click outside, Escape or the Close button. Files get an icon by kind (image, audio, video, PDF, archive, text, other) and the list view has a Type column that can be sorted. No API change.
15
+
16
+ - **The file browser shows html and svg (ADR-0070).** "Open raw" now renders them in the tab it opens, and the dialog shows an svg as an image (html stays text there), always behind `Content-Security-Policy: sandbox; default-src 'none'; ...`, so no script runs and nothing outside the server is fetched. xml, js and unknown types stay downloads. **This changes the default:** before, html and svg were always downloads. `file_browser::set_safe_mode(true)` (Python `FileBrowser.set_safe_mode` / `safe_mode=True`, `httpp browse --safe`) brings the old behaviour back. `httpp::directory` gains `set_inline_active(bool)` (Python `Directory.set_inline_active` / `inline_active=`), which does the same for a mounted folder together with `set_download_active(true)`. A `download_active` answer (the file browser's `/raw`, or a directory with `set_download_active(true)`) now carries `Cache-Control: no-cache` and an ETag that follows how the file is sent, so changing the mode is never hidden by a browser's cached copy.
17
+
18
+ ### Changed
19
+
20
+ - **`httpp server` and `httpp browse` log (ADR-0011).** They printed nothing after the first line. Now, as `httpp py run`, they write `listening on http://host:port` and one line per request (`GET /a.mp3 200`) to stderr; `--log-level` (`trace`, `debug`, `info`, `warning`, `error`, `off`) changes it, and `--log-level off` is the old silent behaviour. The library's own default (`listen()` at `warning`) is unchanged.
21
+ - **C++ names now match Python's (ADR-0062, breaking for C++ code).** `httpp::request` is the client builder, as `httpp.Request` is, and the request a server handler receives is `httpp::server_request`, as `httpp.ServerRequest` is. Before, the handler's request was `httpp::request` and the builder was `httpp::client::request` (removed, no alias). Rename `const httpp::request&` to `const httpp::server_request&` in your handlers and `httpp::client::request` to `httpp::request`. Python code is unchanged.
22
+ - **File browser API** (ADR-0065): C++ `httpp::file_browser_options` and `httpp::mount_file_browser(...)` are replaced by the class `httpp::file_browser(root).set_title(...).set_theme(file_browser::theme_mode::dark)...mount(server, "/files")`; theme, view and sort are enums (`theme_mode`, `view_mode`, `sort_key`) instead of strings, and a bad accent or `max_entries` throws at the setter. Python gets the same design: `httpp.FileBrowser(root, ...)` with chained `set_*` methods, `FileBrowser.Theme/View/Sort` enums and `mount(server, base)`; `Server.mount_file_browser(...)` is removed. `httpp browse` is unchanged.
23
+ - **Builder classes for the remaining option structs (ADR-0066, breaking for C++ code).** `httpp::add_cors`, `add_trusted_host`, `add_https_redirect` and their option structs are replaced by `httpp::cors`, `trusted_host` and `https_redirect` (chained `set_*`, then `install(server&)`); `server::directory_options` and the three-argument `serve_directory` by `httpp::directory(root).set_index(...).set_show_hidden(...).set_download_active(...).mount(server, base)` (`hidden` is now `show_hidden`); `mount_swagger_ui` by `httpp::swagger_ui().set_docs_path(...).set_openapi_url(...).set_title(...).mount(server)`. Python gains `httpp.Directory` and `httpp.SwaggerUI`; `Server.mount_swagger_ui` is removed. Bad values are refused at the setter.
24
+ - **URLs and proxies (ADR-0067, breaking).** Every C++ function that needs a URL takes an `httpp::url`, which converts implicitly from a string or literal (`client`, `async_client`, `client::fetch`, `request`, `download`, `sha256_url`); `url` gains `str()`, `username()` and `password()` (Python `URL` too). A proxy is one URL, `set_proxy("http://user:pass@127.0.0.1:3128")` in C++ and `proxy="http://user:pass@127.0.0.1:3128"` in Python, and the credentials are now sent as `Proxy-Authorization`. The `(host, port)` forms and the Python tuple are removed.
25
+ - **SOCKS5 proxy (ADR-0068).** `set_proxy("socks5h://user:pass@127.0.0.1:1080")` (or `socks5://`, local DNS) in C++ and `proxy="..."` in Python; works for http and https targets. `httpp::url` parses the two schemes and gains `is_http()` (Python `URL.is_http`); a socks URL is a proxy address and is refused as a target.
26
+ - **Client address and reverse proxies (ADR-0069).** `server_request::client_ip` / `request.client_ip` (the address of the connection, `""` when unknown). `httpp::forwarded_headers` / `ProxyHeadersMiddleware`: when the connection comes from a trusted proxy (`set_trusted_proxies`, default loopback; addresses, CIDR ranges or `*`), `client_ip` comes from `X-Forwarded-For` (first untrusted address from the right), `secure` from `X-Forwarded-Proto`, and `Host` from `X-Forwarded-Host` with `set_trust_forwarded_host(true)`.
27
+ - On a free-threaded Python the default worker pool starts at 2 threads instead of `max(8, CPUs)`, grows after a 2 ms wait and still reaches the old ceiling (ADR-0059): CPU-bound `def` handlers measured 68.2k against 58.2k req/s at one I/O thread (3.14t, 16 threads). Builds with a GIL are unchanged.
28
+
29
+ ### Fixed
30
+
31
+ - **`AsyncClient` and `Request.run_async` on free-threaded Python.** The completion callback ran on the C++ network thread without pinning a thread state, so every request created and destroyed one (`PyGILState_Ensure`/`Release`), which is very slow on 3.14t: in the 0.8.1 benchmark `AsyncClient` made 33,842 req/s on 3.14 and 2,426 on 3.14t (32 tasks). The server trampolines already had this fix.
32
+ - **HTTP client connection pool (ADR-0071).** The engine kept at most 8 idle connections per origin and closed the rest, so with more than 8 requests in flight (`Client` from 16 or 32 threads on a free-threaded Python, `AsyncClient` with 32 tasks) every burst reopened its extra connections. The limit is now 256. With both fixes (`benchmarks/run.sh full` on the owner's machine, i7-13620H, governor `performance`, 32 threads or tasks), 3.14t: `Client` 28,438 to 152,873 req/s, `AsyncClient` 57,634 (after the thread-state fix alone) to 113,747; on 3.14 (GIL) the same run gives 92,811 and 61,433. Test: `async_pool.a_burst_larger_than_eight_keeps_all_its_connections_for_the_next_burst`.
33
+ - **`benchmarks/run.sh` keeps no options between runs.** The `BENCH_*` options are CMake cache variables, so `run.sh full -DBENCH_ONLY=client` made every later `run.sh full` run only the client part too. `run.sh` now drops the cached `BENCH_*` values first (`-UBENCH_*`): an option applies to the run that passes it.
34
+
10
35
  ## [0.8.1] - 2026-11-11
11
36
 
12
37
  ### Added
@@ -460,7 +485,8 @@ First release.
460
485
  - Single umbrella header `include/httpp.h` that carries the version, and `version.py` for tagging and releases.
461
486
  - CMake and wheels workflows in CI.
462
487
 
463
- [Unreleased]: https://github.com/MohammadRaziei/httpp/compare/v0.8.1...HEAD
488
+ [Unreleased]: https://github.com/MohammadRaziei/httpp/compare/v0.9.0...HEAD
489
+ [0.9.0]: https://github.com/MohammadRaziei/httpp/compare/v0.8.1...v0.9.0
464
490
  [0.8.1]: https://github.com/MohammadRaziei/httpp/compare/v0.8.0...v0.8.1
465
491
  [0.8.0]: https://github.com/MohammadRaziei/httpp/compare/v0.7.0...v0.8.0
466
492
  [0.7.0]: https://github.com/MohammadRaziei/httpp/compare/v0.6.1...v0.7.0
@@ -1,5 +1,15 @@
1
1
  # httpp hand-off (consolidated, 2026-11-05; updates 2026-11-06 and 2026-11-07 below)
2
2
 
3
+ > **Update 2026-11-14 (newest, read first): version 0.9.0 (`HTTPP_VERSION_MINOR`/`PATCH` in `include/httpp.h`; CHANGELOG has the section and an empty `[Unreleased]`). Nothing is committed, tagged or pushed (the owner does that). Next free ADR number: 0072. Done: free-threaded `AsyncClient`/`Request.run_async` fix (thread-state pin in `_done_trampoline`) and the client pool limit 8 to 256 (ADR-0071, test `async_pool.a_burst_larger_than_eight_keeps_all_its_connections_for_the_next_burst`); `benchmarks/run.sh` drops the cached `BENCH_*` options on every run; `benchmarks/results/full/*.json` are the owner's `run.sh full` of 2026-11-14 (governor `performance`). Checked: C++ 551/551 on Linux from a build of the merged tree. NOT checked: the full Python suite on this tree, Windows, macOS, the `diag_sync_client.py` sweep after the pool fix.
4
+ >
5
+ > **Update 2026-11-12 (newest, read first): ADR-0062. The C++ request names match Python's: `httpp::request` is the client builder (was `httpp::client::request`, removed), `httpp::server_request` is the handler's request (was `httpp::request`). Done by a scripted rename over include, src, tests, examples, benchmarks and the Cython declarations; ADRs 0051 to 0053 keep the old names on purpose. The docs site (`docs/site`, ADR-0060, workflow `docs.yml`) is not committed either. Checked on Linux from a build of this tree: C++ 522/522, Python 576 passed and 7 skipped, parity test 7/7; NOT checked: Windows, macOS, a pip wheel. Next free ADR number: 0063. Not renamed: C++ has one `httpp::response`, Python has `Response` and `ResponseHead`.
6
+ >
7
+ > **Update 2026-11-11 (very newest, read first): version 0.8.1 (`HTTPP_VERSION_PATCH` in `include/httpp.h`, CHANGELOG has the section). Nothing is pushed; the owner commits and tags. Next free ADR number: 0059.**
8
+ > Done in this stretch: `httpp::path` (ADR-0055, pathlib-shaped, public, `open()`, `cwd()`, `as_uri()`, `as_posix()`; Python takes str/bytes/pathlib.Path), `fs` merged into `path` (ADR-0058), public `httpp/logging.hpp` with `HTTPP_API` and no pimpl (ADR-0057), `set_log_system` with the ported OS handlers (ADR-0056). Leak checks (Linux): C++ ASan/LSan/UBSan clean on 523 tests, Python RSS plateaus on 3.13 and 3.14t. Full Python suite: 853 passed, 5 skipped on 3.14t.
9
+ > **macOS wheel (PR #183, cp313t x86_64 under Rosetta) died at `test_ctrl_c_at_any_moment_never_wedges_listen`: a test race, not a core bug.** The old test used `threading.Timer(rnd.uniform(0, 0.12), _thread.interrupt_main)` and called `sender.start()` outside the `try`; with a delay near 0 the interrupt landed inside `Thread.start()` (which waits on an Event), escaped into pytest, exit code 2 after 230 passed. Proven with a stand-alone script (3000 of 3000 starts received the interrupt on 3.13; on 3.14t the Event lock was even corrupted: "release unlocked lock"). Fix, in the test only: a plain Thread waits on a list flag, the flag is set on the first line inside the `try`, and `finally` tolerates a late interrupt (no join). Passes 6 times on 3.13 and 6 on 3.14t. **NOT verified on macOS:** that `Server.listen()` itself survives the interrupt there; the test never reached that part before. If the next macOS CI run hangs or fails inside `listen()`, that is a real core bug: investigate then (listen polls a plain flag every 50 ms, see the ponytail note in `server.py`).
10
+ > **Open risks the owner accepted (CI decides):** the Windows halves of `path.cpp`, class-level `HTTPP_API` export of `logging::handler`/`file_handler` on MSVC, `logging_os` for Android, Apple and Windows (compiled nowhere yet). Question to the owner, unanswered: 0.8.1 or 0.9.0 for this much API (public path and logging).
11
+ > **Rules (also in memory):** talk Persian; code, comments, docs English, no em dash, no Persian in code; never push; after each step zip as httpp.zip (exclude .git/, build*/, __pycache__, *.whl) and send it; never `std::filesystem`; no system dependencies; a decision gets an ADR; do not sweep problems under the carpet (no timeout bumps or skips as a fix).
12
+ >
3
13
  > **Update 2026-11-11 (newest): `httpp::fs` was merged into `httpp::path` (ADR-0058): no `fs.hpp`/`fs.cpp`, the CLI and the tests link `httpp_core`. Next free ADR number: 0059.
4
14
  >
5
15
  > **Update 2026-11-11 (latest): the logging module is public (`include/httpp/logging.hpp`, ADR-0057, amends 0050); `logging.cpp` is no longer compiled into the test program. Next free ADR number: 0058.
@@ -99,7 +109,7 @@ Request paths:
99
109
  - **Lanes (ADR-0024)**: `set_io_threads(n)` = one engine per I/O thread on one port (SO_REUSEPORT). Python: one asyncio loop per I/O thread only on a free-threaded build, else one loop. Default `io_threads` = `min(4, CPUs // 4)` with a GIL, 1 without a GIL or on Windows. With several I/O threads a new connection goes to the engine with the fewest connections (ADR-0034).
100
110
  - `after_request`/`error_handler` hooks make `done` go through `run_in_executor`. The hook path of `make_sender` no longer touches `this` after `weak.lock()` (ADR-0035).
101
111
  - **WebSocket (ADR-0026, 0027)**: generic engine tunnel; `ws_session` implements RFC 6455 (frames, fragments, control frames, close handshake, UTF-8 and close-code checks, bounded send queue, ping). Python `@app.websocket(path, ...)` with a Starlette-shaped `websocket` object, per-connection C++ mailbox. Same-origin default policy. Routers and `Depends` work on WebSocket routes (ADR-0048). Not supported: `response`, background tasks, OpenAPI. No permessage-deflate, no TLS of its own.
102
- - **File browser (ADR-0032)**: `httpp::mount_file_browser(server&, base, root, file_browser_options)`; Python `Server.mount_file_browser(base, root, **options)`; CLI `httpp browse [DIRECTORY]`. Read-only; the root is a ceiling (`..`, absolute paths, backslash, NUL, symlinks out are refused with the same 404); dotfiles hidden unless `show_hidden`; active types always downloads; no login (use the `before` hook); `search` filters the open folder; no ETag in v1.
112
+ - **File browser (ADR-0032)**: `httpp::mount_file_browser(server&, base, root, file_browser_options)`; Python `Server.mount_file_browser(base, root, **options)`; CLI `httpp browse [DIRECTORY]`. Read-only; the root is a ceiling (`..`, absolute paths, backslash, NUL, symlinks out are refused with the same 404); dotfiles hidden unless `show_hidden`; active types are downloads, except html and svg, which Open raw renders under a CSP sandbox (`set_safe_mode(true)` / `--safe` makes them downloads too, ADR-0070); no login (use the `before` hook); `search` filters the open folder; no ETag in v1.
103
113
  - **Server compression**: `set_compression(min_size, level)` / `Server(compression=...)`: text answers only, off by default; no ADR yet and no benchmark.
104
114
 
105
115
  ## 4. Build and test
@@ -114,7 +124,7 @@ Request paths:
114
124
  - `perf` on his machine: his `perf report --symbol-filter=...` did NOT filter (all outputs were identical); use `--sort dso,symbol` plus `grep`, or `-S` with the mangled name.
115
125
 
116
126
  ## 5. State after the last session (2026-11-05)
117
- Nothing is committed or pushed (the owner commits). Version in the tree is 0.8.1 (bumped 2026-11-11; the owner commits and tags it); `CHANGELOG.md` has the 0.8.1 section, `[Unreleased]` is empty.
127
+ Nothing is committed or pushed (the owner commits). Version in the tree is 0.9.0 (bumped 2026-11-14; the owner commits and tags it); `CHANGELOG.md` has the 0.9.0 section, `[Unreleased]` is empty.
118
128
 
119
129
  ### Verified
120
130
  - C++ suite 407 tests pass in Release, and are clean under AddressSanitizer (no memory errors) and ThreadSanitizer (no warnings).
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: httpp
3
- Version: 0.8.1
3
+ Version: 0.9.0
4
4
  Summary: A Cython project with scikit-build
5
5
  Author-Email: Mohammad Raziei <mohammadraziei1375@gmail.com>
6
6
  License: MIT
@@ -138,6 +138,7 @@ Static files can be served next to your routes:
138
138
 
139
139
  ```python
140
140
  app.serve_directory("/static", "./public")
141
+ httpp.Directory("./public", index=False, show_hidden=False).mount(app, "/assets") # with settings
141
142
  ```
142
143
 
143
144
  ### Handler reference
@@ -319,7 +320,20 @@ def login():
319
320
  ### A read-only file browser
320
321
 
321
322
  ```python
322
- app.mount_file_browser("/files", "/srv/shared", title="Shared", theme="dark", accent="#2a7de1", show_hidden=False)
323
+ from httpp import FileBrowser
324
+
325
+ FileBrowser("/srv/shared", title="Shared", theme=FileBrowser.Theme.DARK, accent="#2a7de1").mount(app, "/files")
326
+ # or chained: FileBrowser("/srv/shared").set_title("Shared").set_show_hidden(False).mount(app, "/files")
327
+ ```
328
+
329
+ The same in C++ (a builder with enums; a bad accent or `max_entries` throws at the setter):
330
+
331
+ ```cpp
332
+ httpp::file_browser("/srv/shared")
333
+ .set_title("Shared")
334
+ .set_theme(httpp::file_browser::theme_mode::dark)
335
+ .set_accent("#2a7de1")
336
+ .mount(server, "/files");
323
337
  ```
324
338
 
325
339
  ```
@@ -328,7 +342,7 @@ httpp browse ~/Downloads --port 8000 --theme auto
328
342
 
329
343
  Lists folders, opens text and images, downloads files; nothing can be written, renamed or deleted. The folder you give is a ceiling:
330
344
  `..`, absolute paths and symlinks that leave it are refused, dotfiles are hidden (404 too) unless `show_hidden=True` / `--hidden`, and html, svg and
331
- other active types are always downloads. A folder is cut at `max_entries` (5000). It has **no login**: it listens on 127.0.0.1 by default, and for anything
345
+ other active types are downloads, but html and svg are rendered by "Open raw", sandboxed so no script runs (`safe_mode=True` / `--safe` makes them downloads too). A folder is cut at `max_entries` (5000). It has **no login**: it listens on 127.0.0.1 by default, and for anything
332
346
  else put a `before_request` hook in front of it. A bad option or folder raises `ValueError`.
333
347
 
334
348
  ### Settings
@@ -566,8 +580,8 @@ app.add_middleware(GZipMiddleware, minimum_size=1000)
566
580
  ```
567
581
 
568
582
  The options are Starlette's. The work runs in C++ without the GIL: a CORS preflight is answered on the I/O thread and never reaches Python.
569
- `before_request` hooks run after the middleware, `after_request` hooks before it. In C++: `httpp::add_cors(server&, cors_options)`,
570
- `httpp::add_trusted_host(server&, trusted_host_options)` (`httpp/middleware.hpp`), or your own pair of hooks with `server::use(before, after)`.
583
+ `before_request` hooks run after the middleware, `after_request` hooks before it. In C++: `httpp::cors().set_allow_origins({...}).install(server&)`,
584
+ `httpp::trusted_host({...}).install(server&)` (`httpp/middleware.hpp`), or your own pair of hooks with `server::use(before, after)`.
571
585
  Not supported: ASGI middleware. `HTTPSRedirectMiddleware` sends plain requests to the https address (see TLS below).
572
586
 
573
587
  ## Build from source
@@ -111,6 +111,7 @@ Static files can be served next to your routes:
111
111
 
112
112
  ```python
113
113
  app.serve_directory("/static", "./public")
114
+ httpp.Directory("./public", index=False, show_hidden=False).mount(app, "/assets") # with settings
114
115
  ```
115
116
 
116
117
  ### Handler reference
@@ -292,7 +293,20 @@ def login():
292
293
  ### A read-only file browser
293
294
 
294
295
  ```python
295
- app.mount_file_browser("/files", "/srv/shared", title="Shared", theme="dark", accent="#2a7de1", show_hidden=False)
296
+ from httpp import FileBrowser
297
+
298
+ FileBrowser("/srv/shared", title="Shared", theme=FileBrowser.Theme.DARK, accent="#2a7de1").mount(app, "/files")
299
+ # or chained: FileBrowser("/srv/shared").set_title("Shared").set_show_hidden(False).mount(app, "/files")
300
+ ```
301
+
302
+ The same in C++ (a builder with enums; a bad accent or `max_entries` throws at the setter):
303
+
304
+ ```cpp
305
+ httpp::file_browser("/srv/shared")
306
+ .set_title("Shared")
307
+ .set_theme(httpp::file_browser::theme_mode::dark)
308
+ .set_accent("#2a7de1")
309
+ .mount(server, "/files");
296
310
  ```
297
311
 
298
312
  ```
@@ -301,7 +315,7 @@ httpp browse ~/Downloads --port 8000 --theme auto
301
315
 
302
316
  Lists folders, opens text and images, downloads files; nothing can be written, renamed or deleted. The folder you give is a ceiling:
303
317
  `..`, absolute paths and symlinks that leave it are refused, dotfiles are hidden (404 too) unless `show_hidden=True` / `--hidden`, and html, svg and
304
- other active types are always downloads. A folder is cut at `max_entries` (5000). It has **no login**: it listens on 127.0.0.1 by default, and for anything
318
+ other active types are downloads, but html and svg are rendered by "Open raw", sandboxed so no script runs (`safe_mode=True` / `--safe` makes them downloads too). A folder is cut at `max_entries` (5000). It has **no login**: it listens on 127.0.0.1 by default, and for anything
305
319
  else put a `before_request` hook in front of it. A bad option or folder raises `ValueError`.
306
320
 
307
321
  ### Settings
@@ -539,8 +553,8 @@ app.add_middleware(GZipMiddleware, minimum_size=1000)
539
553
  ```
540
554
 
541
555
  The options are Starlette's. The work runs in C++ without the GIL: a CORS preflight is answered on the I/O thread and never reaches Python.
542
- `before_request` hooks run after the middleware, `after_request` hooks before it. In C++: `httpp::add_cors(server&, cors_options)`,
543
- `httpp::add_trusted_host(server&, trusted_host_options)` (`httpp/middleware.hpp`), or your own pair of hooks with `server::use(before, after)`.
556
+ `before_request` hooks run after the middleware, `after_request` hooks before it. In C++: `httpp::cors().set_allow_origins({...}).install(server&)`,
557
+ `httpp::trusted_host({...}).install(server&)` (`httpp/middleware.hpp`), or your own pair of hooks with `server::use(before, after)`.
544
558
  Not supported: ASGI middleware. `HTTPSRedirectMiddleware` sends plain requests to the https address (see TLS below).
545
559
 
546
560
  ## Build from source
@@ -3,7 +3,7 @@
3
3
  # cmake -S benchmarks -B build-bench -G Ninja -DCMAKE_BUILD_TYPE=Release
4
4
  # cmake --build build-bench --target bench # about 25 minutes; `--target bench_quick` is about 5
5
5
  #
6
- # Then send back the file it prints at the end (build-bench/results/*.txt). Targets:
6
+ # It writes benchmarks/results/full/*.json (results/quick/ for bench_quick; the docs site reads full/, see docs/site/scripts/prepare.py) and a .txt of the same run. Targets:
7
7
  # bench_env Python 3.14 (GIL) and 3.14t (free-threaded) virtualenvs with this httpp, uvicorn, websockets..., and the load generator `oha` (needs network)
8
8
  # cpp_bench the httpp C++ server of the suite (HTTP routes and a WebSocket echo)
9
9
  # ws_load the WebSocket load generator (oha does not speak WebSocket)
@@ -31,7 +31,10 @@ set(BENCH_SECONDS 5 CACHE STRING "seconds per measurement")
31
31
  set(BENCH_ROUNDS 3 CACHE STRING "interleaved rounds")
32
32
  set(BENCH_CONC 64 CACHE STRING "connections of the load generators")
33
33
  set(BENCH_IO_THREADS "1,2,4,8" CACHE STRING "I/O thread counts")
34
- set(BENCH_ONLY "hello,json,cpu,latency,ws,idle" CACHE STRING "which parts: hello json cpu latency ws (WebSocket echo) idle (memory with many idle WebSockets)")
34
+ set(BENCH_ONLY "hello,json,cpu,latency,ws,idle,client" CACHE STRING "which parts: hello json cpu latency ws (WebSocket echo) idle (memory with many idle WebSockets) client (HTTP client libraries)")
35
+ set(BENCH_CLIENT_CONC 32 CACHE STRING "threads (sync clients) or tasks (async clients) of the client part")
36
+ set(BENCH_PURPOSE "published" CACHE STRING "published, or smoke (a test of the machinery: the docs site ignores it)")
37
+ set(BENCH_RESULTS_DIR "${CMAKE_CURRENT_LIST_DIR}/results" CACHE PATH "where the .json (read by docs/site) and .txt files go")
35
38
  set(BENCH_WS_SIZE 64 CACHE STRING "bytes per WebSocket message")
36
39
  set(BENCH_IDLE_CONNS 10000 CACHE STRING "idle WebSocket connections for the memory table (cut to what the open-file limit allows)")
37
40
  set(BENCH_SERVER_CPUS "" CACHE STRING "e.g. 0-7 (empty: derived from the CPU topology)")
@@ -142,7 +145,8 @@ function(add_bench_target name seconds rounds io_threads)
142
145
  set(_cmd ${Python3_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/suite.py
143
146
  --pys "${BENCH_PY_ARG}" --cpp $<TARGET_FILE:cpp_bench> --ws-load $<TARGET_FILE:ws_load> --oha ${BENCH_OHA}
144
147
  --seconds ${seconds} --rounds ${rounds} --conc ${BENCH_CONC} --io-threads ${io_threads} --rate --only ${BENCH_ONLY}
145
- --ws-size ${BENCH_WS_SIZE} --idle-conns ${BENCH_IDLE_CONNS} --out-dir ${BENCH_DIR}/results)
148
+ --ws-size ${BENCH_WS_SIZE} --idle-conns ${BENCH_IDLE_CONNS} --client-conc ${BENCH_CLIENT_CONC} --purpose ${BENCH_PURPOSE}
149
+ --out-dir ${BENCH_RESULTS_DIR})
146
150
  if(BENCH_SERVER_CPUS) # an empty value would be dropped from the command and eat the next option
147
151
  list(APPEND _cmd --server-cpus ${BENCH_SERVER_CPUS})
148
152
  endif()
@@ -5,7 +5,7 @@ One command for the whole comparison (CMake 3.28 or newer, a C++ compiler, Pytho
5
5
  cmake -S benchmarks -B build-bench -G Ninja -DCMAKE_BUILD_TYPE=Release
6
6
  cmake --build build-bench --target bench # about 25 minutes; --target bench_quick is about 5
7
7
 
8
- It builds what it needs, runs everything and prints the path of one result file (`build-bench/results/<time>.txt`). Plug the charger in and
8
+ It builds what it needs, runs everything and writes the JSON files of `benchmarks/results/full/` (`quick/` for a quick run) and a `report.txt` of the same run. `benchmarks/run.sh quick` or `full` does the configure and the build in one go. Plug the charger in and
9
9
  close heavy programs first.
10
10
 
11
11
  | target | what it does |
@@ -25,6 +25,22 @@ Settings are cache variables, set at configure time: `-DBENCH_SECONDS=10 -DBENCH
25
25
  `bench_setup.py` makes the virtualenvs and checks the machine. `bench.py`, `io_bench.py`, `cpu_bench.py` are the older single-purpose scripts.
26
26
  Numbers are only comparable inside one result file.
27
27
 
28
+ **JSON and the docs page** (ADR-0063). A run writes a directory of JSON files with fixed names (a run overwrites the previous one of its kind, the date is
29
+ inside, git keeps the history): `benchmarks/results/full/` for `run.sh full`, `benchmarks/results/quick/` for `run.sh quick`.
30
+
31
+ | file | what is in it |
32
+ |---|---|
33
+ | `system.json` | date, hardware (CPU, cores, memory, OS, laptop or not), CPU pinning, compiler, settings, the list of the runtimes below |
34
+ | `cpp.json` | the C++ servers (httpp, Drogon): every variant with its rounds, fixed-rate latency, idle memory |
35
+ | `py314.json`, `py314t.json` | the same for each Python given in `BENCH_PYS`, plus its version, the GIL state and the version of every library; the HTTP client rows of that Python are here too |
36
+
37
+ `docs/site` reads `full/` (`python3 docs/site/scripts/prepare.py bench` does it, `npm start` and `npm run build` too), puts the files together and draws them on the
38
+ Benchmarks page. `quick/` (`-DBENCH_PURPOSE=smoke`) is git-ignored and the site skips it, unless `HTTPP_BENCH_SMOKE=1` is set to preview the page with it.
39
+
40
+ Servers and clients in the suite: uvicorn (bare ASGI), FastAPI + uvicorn, aiohttp, httpp (`def`, `async def`, C++), Drogon; and, as HTTP clients, httpp `Client` / `AsyncClient`, requests,
41
+ httpx (sync and async) and aiohttp (`BENCH_ONLY=client`, `BENCH_CLIENT_CONC=32`). Runtimes: the C++ binaries, Python 3.14 and 3.14t (`BENCH_PYS`). A library with no wheel for an interpreter
42
+ is left out there; `meta.pythons[].gil_after_import` in the JSON says when importing a library turned the GIL back on.
43
+
28
44
  `diag_io.sh [IO_THREADS [SERVER_CPUS [LOAD_CPUS]]]` is for one question: why the C++ server does not scale like Drogon with several I/O threads. It runs `cpp_bench` `/io` under
29
45
  `perf` with kernel samples and counts the CPU ticks of each server thread (are the connections spread evenly?), writes small files into `build-bench/diag/` and prints their paths.
30
46
  Linux only; needs `perf`, `taskset`, `oha` and `cmake --build build-bench --target cpp_bench`. For Drogon: `BENCH_CPP_BIN=build-bench/drogon_bench BENCH_DIAG_PATH=/sync benchmarks/diag_io.sh`.
@@ -38,7 +38,7 @@ def start(target, port, workers):
38
38
  cmd = [sys.executable, "-m", "uvicorn", "asgi_app:app" if target == "uvicorn" else "fastapi_app:app", "--port", str(port), "--log-level", "error",
39
39
  "--no-access-log", "--loop", "uvloop", "--http", "httptools", "--workers", str(workers)]
40
40
  else:
41
- cmd = [sys.executable, "-m", "httpp", "run", "httpp_app:app", "--port", str(port), "--log-level", "error",
41
+ cmd = [sys.executable, "-m", "httpp", "py", "run", "httpp_app:app", "--port", str(port), "--log-level", "error",
42
42
  "--workers", str(workers)]
43
43
  proc = subprocess.Popen(cmd, env=env, cwd=HERE, stdout=subprocess.DEVNULL, stderr=subprocess.PIPE)
44
44
  for _ in range(100):
@@ -51,7 +51,12 @@ def make_venv(uv, root, venvs, version):
51
51
  run([uv, "venv", "--python", version if want_nogil else version + "+gil", d])
52
52
  print(f"== installing httpp (built from this tree) and the servers to compare into {d}", flush=True)
53
53
  env = dict(os.environ, UV_LINK_MODE="copy") # the project may sit on another filesystem than the uv cache
54
+ # ponytail: one install per package, so that a package without a wheel for this interpreter (aiohttp on a free-threaded build, say) is
55
+ # skipped with a note and the suite leaves it out, instead of failing the whole environment.
54
56
  run([uv, "pip", "install", "--python", py, "--reinstall", root, "uvicorn", "httptools", "fastapi", "websockets"], env=env)
57
+ for extra in ("aiohttp", "httpx", "requests"):
58
+ if subprocess.run([uv, "pip", "install", "--python", py, extra], env=env).returncode != 0:
59
+ print(f"(no {extra} for {version}: it is left out of the comparison there)")
55
60
  if subprocess.run([uv, "pip", "install", "--python", py, "uvloop"], env=env).returncode != 0:
56
61
  print(f"(no uvloop for {version}: uvicorn and websockets use asyncio there)")
57
62
 
@@ -0,0 +1,144 @@
1
+ """One HTTP client library, one load run, one JSON line on stdout. Started by suite.py (the `client` part); it can be run by hand too.
2
+
3
+ python client_worker.py --lib aiohttp --port 8000 --path / --seconds 5 --conc 32
4
+
5
+ Every library makes GET requests in a loop against one server for --warmup seconds (not counted) and then --seconds. Sync libraries get
6
+ --conc threads with a session each, async libraries --conc tasks on one session. The numbers: requests per second, latency
7
+ percentiles of the calls, CPU time of this whole process per request, and its peak RSS."""
8
+ import argparse
9
+ import asyncio
10
+ import json
11
+ import resource
12
+ import threading
13
+ import time
14
+
15
+ LIBS = { # name -> (module that must import, sync or async)
16
+ "httpp Client": ("httpp", "sync"),
17
+ "requests": ("requests", "sync"),
18
+ "httpx": ("httpx", "sync"),
19
+ "httpp AsyncClient": ("httpp", "async"),
20
+ "aiohttp": ("aiohttp", "async"),
21
+ "httpx AsyncClient": ("httpx", "async"),
22
+ }
23
+
24
+
25
+ class Clock:
26
+ """Counts only what finishes inside the measuring window."""
27
+
28
+ def __init__(self, warmup, seconds):
29
+ now = time.perf_counter()
30
+ self.start, self.stop = now + warmup, now + warmup + seconds
31
+ self.cpu0 = None
32
+
33
+ def running(self):
34
+ return time.perf_counter() < self.stop
35
+
36
+ def inside(self, t0):
37
+ """True when a call that began at t0 counts. The first one also takes the CPU time of the process: a sampler thread of its own
38
+ can be starved for seconds by busy worker threads, the workers cannot."""
39
+ if t0 < self.start:
40
+ return False
41
+ if self.cpu0 is None:
42
+ self.cpu0 = time.process_time()
43
+ return True
44
+
45
+
46
+ def sync_worker(lib, url, base, path, clock, out):
47
+ lat, bad = [], 0
48
+ if lib == "httpp Client":
49
+ import httpp
50
+ c = httpp.Client(base)
51
+ call = lambda: c.get(path).status == 200 # noqa: E731
52
+ elif lib == "requests":
53
+ import requests
54
+ s = requests.Session()
55
+ call = lambda: s.get(url).status_code == 200 # noqa: E731
56
+ else:
57
+ import httpx
58
+ c = httpx.Client()
59
+ call = lambda: c.get(url).status_code == 200 # noqa: E731
60
+ while clock.running():
61
+ t0 = time.perf_counter()
62
+ try:
63
+ ok = call()
64
+ except Exception: # noqa: BLE001
65
+ ok = False
66
+ if clock.inside(t0):
67
+ lat.append(time.perf_counter() - t0)
68
+ bad += not ok
69
+ out.append((lat, bad))
70
+
71
+
72
+ async def async_main(lib, url, base, path, clock, conc, out):
73
+ lat, bad = [], 0
74
+
75
+ async def loop(call):
76
+ nonlocal bad
77
+ while clock.running():
78
+ t0 = time.perf_counter()
79
+ try:
80
+ ok = await call()
81
+ except Exception: # noqa: BLE001
82
+ ok = False
83
+ if clock.inside(t0):
84
+ lat.append(time.perf_counter() - t0)
85
+ bad += not ok
86
+
87
+ if lib == "httpp AsyncClient":
88
+ import httpp
89
+ async with httpp.AsyncClient(base, max_connections=conc) as c:
90
+ async def call():
91
+ return (await c.get(path)).status == 200
92
+ await asyncio.gather(*(loop(call) for _ in range(conc)))
93
+ elif lib == "aiohttp":
94
+ import aiohttp
95
+ async with aiohttp.ClientSession(connector=aiohttp.TCPConnector(limit=conc)) as s:
96
+ async def call():
97
+ async with s.get(url) as r:
98
+ await r.read()
99
+ return r.status == 200
100
+ await asyncio.gather(*(loop(call) for _ in range(conc)))
101
+ else:
102
+ import httpx
103
+ async with httpx.AsyncClient(limits=httpx.Limits(max_connections=conc, max_keepalive_connections=conc)) as c:
104
+ async def call():
105
+ return (await c.get(url)).status_code == 200
106
+ await asyncio.gather(*(loop(call) for _ in range(conc)))
107
+ out.append((lat, bad))
108
+
109
+
110
+ def main():
111
+ ap = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
112
+ ap.add_argument("--lib", required=True, choices=sorted(LIBS))
113
+ ap.add_argument("--port", type=int, required=True)
114
+ ap.add_argument("--path", default="/")
115
+ ap.add_argument("--seconds", type=float, default=5)
116
+ ap.add_argument("--warmup", type=float, default=1)
117
+ ap.add_argument("--conc", type=int, default=32)
118
+ args = ap.parse_args()
119
+ base = f"http://127.0.0.1:{args.port}"
120
+ url = base + args.path
121
+ out = []
122
+ __import__(LIBS[args.lib][0]) # the import is not part of the warmup
123
+ clock = Clock(args.warmup, args.seconds)
124
+ if LIBS[args.lib][1] == "sync":
125
+ threads = [threading.Thread(target=sync_worker, args=(args.lib, url, base, args.path, clock, out)) for _ in range(args.conc)]
126
+ for t in threads:
127
+ t.start()
128
+ for t in threads:
129
+ t.join()
130
+ else:
131
+ asyncio.run(async_main(args.lib, url, base, args.path, clock, args.conc, out))
132
+ cpu = time.process_time() - (clock.cpu0 if clock.cpu0 is not None else 0.0)
133
+ lat = sorted(x for part, _ in out for x in part)
134
+ bad = sum(b for _, b in out)
135
+ n = len(lat)
136
+
137
+ def pct(p):
138
+ return lat[min(n - 1, int(n * p))] * 1000 if n else 0.0
139
+ print(json.dumps({"lib": args.lib, "requests": n, "errors": bad, "rps": n / args.seconds, "p50_ms": pct(0.50), "p99_ms": pct(0.99),
140
+ "p999_ms": pct(0.999), "cpu_us_per_req": cpu * 1e6 / max(n, 1), "peak_rss_kib": resource.getrusage(resource.RUSAGE_SELF).ru_maxrss}))
141
+
142
+
143
+ if __name__ == "__main__":
144
+ main()
@@ -29,12 +29,12 @@ int main(int argc, char** argv) {
29
29
  httpp::server srv;
30
30
  srv.set_io_threads(io_threads);
31
31
  if (argc > 3) srv.set_keep_alive_max(static_cast<std::size_t>(std::atoll(argv[3]))); // for A/B runs of the default
32
- srv.route("GET", "/sync", [](const httpp::request&, httpp::response& r) { hello(r); });
33
- srv.route("GET", "/cpu", [](const httpp::request&, httpp::response& r) {
32
+ srv.route("GET", "/sync", [](const httpp::server_request&, httpp::response& r) { hello(r); });
33
+ srv.route("GET", "/cpu", [](const httpp::server_request&, httpp::response& r) {
34
34
  volatile long long s = work();
35
35
  r.body = std::to_string(s);
36
36
  });
37
- srv.route_io("GET", "/io", [](std::shared_ptr<const httpp::request>, httpp::responder rs) {
37
+ srv.route_io("GET", "/io", [](std::shared_ptr<const httpp::server_request>, httpp::responder rs) {
38
38
  httpp::response r;
39
39
  hello(r);
40
40
  rs.send(std::move(r));
@@ -4,7 +4,7 @@ def port():
4
4
  with socket.socket() as s:
5
5
  s.bind(("127.0.0.1", 0)); return s.getsockname()[1]
6
6
  p = port()
7
- proc = subprocess.Popen([sys.executable, "-m", "httpp", "run", "cpu_app:app", "--port", str(p), "--log-level", "error"],
7
+ proc = subprocess.Popen([sys.executable, "-m", "httpp", "py", "run", "cpu_app:app", "--port", str(p), "--log-level", "error"],
8
8
  cwd=S, env=dict(os.environ, PYTHONPATH=S), stderr=subprocess.PIPE)
9
9
  for _ in range(100):
10
10
  try: socket.create_connection(("127.0.0.1", p), .1).close(); break