foghttp 0.3.3__tar.gz → 0.3.4__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 (458) hide show
  1. {foghttp-0.3.3 → foghttp-0.3.4}/.flake8 +3 -1
  2. {foghttp-0.3.3 → foghttp-0.3.4}/Cargo.lock +2 -1
  3. {foghttp-0.3.3 → foghttp-0.3.4}/Cargo.toml +2 -1
  4. {foghttp-0.3.3 → foghttp-0.3.4}/PKG-INFO +10 -4
  5. {foghttp-0.3.3 → foghttp-0.3.4}/README.md +9 -3
  6. {foghttp-0.3.3 → foghttp-0.3.4}/SECURITY.md +5 -4
  7. {foghttp-0.3.3 → foghttp-0.3.4}/docs/index.md +9 -4
  8. {foghttp-0.3.3 → foghttp-0.3.4}/docs/limitations.md +11 -4
  9. foghttp-0.3.4/docs/proxies.md +202 -0
  10. {foghttp-0.3.3 → foghttp-0.3.4}/docs/quickstart.md +3 -2
  11. {foghttp-0.3.3 → foghttp-0.3.4}/docs/redirects.md +19 -0
  12. {foghttp-0.3.3 → foghttp-0.3.4}/docs/request-builder.md +1 -2
  13. {foghttp-0.3.3 → foghttp-0.3.4}/docs/tls.md +12 -5
  14. {foghttp-0.3.3 → foghttp-0.3.4}/docs/use-cases.md +1 -1
  15. {foghttp-0.3.3 → foghttp-0.3.4}/examples/README.md +9 -3
  16. foghttp-0.3.4/examples/http_proxy.py +34 -0
  17. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/_client/config.py +37 -1
  18. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/_client/options.py +1 -3
  19. foghttp-0.3.4/foghttp/_client/proxy/__init__.py +19 -0
  20. foghttp-0.3.4/foghttp/_client/proxy/auth.py +17 -0
  21. foghttp-0.3.4/foghttp/_client/proxy/constants.py +53 -0
  22. foghttp-0.3.4/foghttp/_client/proxy/environment.py +91 -0
  23. foghttp-0.3.4/foghttp/_client/proxy/models.py +131 -0
  24. foghttp-0.3.4/foghttp/_client/proxy/no_proxy.py +33 -0
  25. foghttp-0.3.4/foghttp/_client/proxy/no_proxy_rule.py +78 -0
  26. foghttp-0.3.4/foghttp/_client/proxy/no_proxy_tokens.py +72 -0
  27. foghttp-0.3.4/foghttp/_client/proxy/resolver.py +89 -0
  28. foghttp-0.3.4/foghttp/_client/proxy/transport_policy.py +9 -0
  29. foghttp-0.3.4/foghttp/_client/proxy/url_parsing.py +70 -0
  30. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/_client/raw/lifecycle.py +5 -1
  31. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/_client/raw/requests.py +11 -0
  32. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/_client/request_builder/header_policy.py +1 -0
  33. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/_client/transport.py +19 -37
  34. foghttp-0.3.4/foghttp/_client/transport_requests.py +26 -0
  35. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/_foghttp.pyi +12 -1
  36. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/async_client.py +5 -2
  37. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/client.py +5 -2
  38. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/messages.py +0 -2
  39. foghttp-0.3.4/foghttp/stream_response/__init__.py +5 -0
  40. foghttp-0.3.4/foghttp/stream_response/async_response.py +121 -0
  41. foghttp-0.3.4/foghttp/stream_response/base.py +94 -0
  42. foghttp-0.3.4/foghttp/stream_response/bindings.py +21 -0
  43. foghttp-0.3.4/foghttp/stream_response/constants.py +4 -0
  44. foghttp-0.3.4/foghttp/stream_response/lifecycle_debug.py +14 -0
  45. foghttp-0.3.4/foghttp/stream_response/status.py +48 -0
  46. foghttp-0.3.4/foghttp/stream_response/sync_response.py +102 -0
  47. foghttp-0.3.4/foghttp/stream_response/telemetry.py +44 -0
  48. {foghttp-0.3.3 → foghttp-0.3.4}/pyproject.toml +1 -1
  49. {foghttp-0.3.3 → foghttp-0.3.4}/ruff.toml +1 -1
  50. {foghttp-0.3.3 → foghttp-0.3.4}/src/core/client/mod.rs +33 -8
  51. foghttp-0.3.4/src/core/client/proxy/authorization.rs +19 -0
  52. foghttp-0.3.4/src/core/client/proxy/endpoint.rs +27 -0
  53. foghttp-0.3.4/src/core/client/proxy/http.rs +122 -0
  54. foghttp-0.3.4/src/core/client/proxy/mod.rs +16 -0
  55. foghttp-0.3.4/src/core/client/proxy/tests.rs +356 -0
  56. foghttp-0.3.4/src/core/client/proxy/tunnel.rs +285 -0
  57. foghttp-0.3.4/src/core/headers/mod.rs +10 -0
  58. foghttp-0.3.3/src/core/headers.rs → foghttp-0.3.4/src/core/headers/request.rs +1 -22
  59. foghttp-0.3.4/src/core/headers/response.rs +19 -0
  60. {foghttp-0.3.3 → foghttp-0.3.4}/src/core/headers/tests.rs +18 -1
  61. foghttp-0.3.4/src/core/metrics/buffered.rs +70 -0
  62. foghttp-0.3.4/src/core/metrics/counters.rs +176 -0
  63. foghttp-0.3.4/src/core/metrics/lifecycle.rs +6 -0
  64. foghttp-0.3.4/src/core/metrics/mod.rs +54 -0
  65. foghttp-0.3.4/src/core/metrics/origin/blocking.rs +7 -0
  66. foghttp-0.3.3/src/core/metrics/origin.rs → foghttp-0.3.4/src/core/metrics/origin/metrics.rs +11 -202
  67. foghttp-0.3.4/src/core/metrics/origin/mod.rs +13 -0
  68. foghttp-0.3.4/src/core/metrics/origin/registry.rs +81 -0
  69. foghttp-0.3.4/src/core/metrics/origin/snapshots.rs +36 -0
  70. foghttp-0.3.4/src/core/metrics/origin/tests.rs +91 -0
  71. foghttp-0.3.4/src/core/metrics/origin/waiters.rs +80 -0
  72. foghttp-0.3.4/src/core/metrics/snapshots.rs +195 -0
  73. foghttp-0.3.4/src/core/metrics/telemetry.rs +45 -0
  74. foghttp-0.3.4/src/core/metrics/tests.rs +247 -0
  75. {foghttp-0.3.3 → foghttp-0.3.4}/src/core/request.rs +7 -0
  76. {foghttp-0.3.3 → foghttp-0.3.4}/src/errors.rs +28 -0
  77. {foghttp-0.3.3 → foghttp-0.3.4}/src/messages.rs +16 -1
  78. {foghttp-0.3.3 → foghttp-0.3.4}/src/py/client/async_requests/spawn.rs +4 -5
  79. {foghttp-0.3.3 → foghttp-0.3.4}/src/py/client/async_requests/stream_spawn.rs +4 -5
  80. {foghttp-0.3.3 → foghttp-0.3.4}/src/py/client/mod.rs +68 -22
  81. {foghttp-0.3.3 → foghttp-0.3.4}/src/py/client/options.rs +0 -10
  82. foghttp-0.3.4/src/py/client/transport/body.rs +73 -0
  83. foghttp-0.3.4/src/py/client/transport/buffered.rs +111 -0
  84. foghttp-0.3.4/src/py/client/transport/client.rs +24 -0
  85. foghttp-0.3.4/src/py/client/transport/context.rs +35 -0
  86. foghttp-0.3.4/src/py/client/transport/mod.rs +16 -0
  87. foghttp-0.3.4/src/py/client/transport/proxy.rs +66 -0
  88. foghttp-0.3.4/src/py/client/transport/request.rs +137 -0
  89. foghttp-0.3.4/src/py/client/transport/response.rs +112 -0
  90. foghttp-0.3.4/src/py/client/transport/streaming.rs +152 -0
  91. foghttp-0.3.4/src/py/client/transport/tests.rs +188 -0
  92. foghttp-0.3.4/tests/client_cancellation/lifecycle_debug_actions.py +34 -0
  93. foghttp-0.3.4/tests/client_cancellation/lifecycle_debug_assertions.py +40 -0
  94. foghttp-0.3.4/tests/client_cancellation/lifecycle_debug_data.py +32 -0
  95. foghttp-0.3.4/tests/client_cancellation/lifecycle_debug_predicates.py +68 -0
  96. foghttp-0.3.4/tests/client_cancellation/test_async_lifecycle_debug_buffered.py +133 -0
  97. foghttp-0.3.4/tests/client_cancellation/test_async_lifecycle_debug_messages.py +78 -0
  98. foghttp-0.3.4/tests/client_cancellation/test_async_lifecycle_debug_streaming.py +132 -0
  99. foghttp-0.3.4/tests/client_cancellation/test_async_lifecycle_debug_strict.py +65 -0
  100. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_lifecycle/conftest.py +3 -2
  101. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_lifecycle/helpers.py +1 -0
  102. foghttp-0.3.4/tests/client_lifecycle/test_async_client_lifecycle.py +180 -0
  103. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_lifecycle/test_raw_client_lifecycle.py +3 -0
  104. foghttp-0.3.4/tests/client_lifecycle/test_sync_client_lifecycle.py +172 -0
  105. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_lifecycle/test_sync_close_race.py +2 -1
  106. foghttp-0.3.4/tests/client_lifecycle/test_sync_close_waits.py +127 -0
  107. foghttp-0.3.4/tests/client_options/test_raw_numeric_boundary.py +283 -0
  108. foghttp-0.3.4/tests/client_proxy/client_options.py +30 -0
  109. foghttp-0.3.4/tests/client_proxy/conftest.py +33 -0
  110. foghttp-0.3.4/tests/client_proxy/connect_proxy_server.py +256 -0
  111. foghttp-0.3.4/tests/client_proxy/environment.py +24 -0
  112. foghttp-0.3.4/tests/client_proxy/http_proxy_server.py +285 -0
  113. foghttp-0.3.4/tests/client_proxy/test_client_config.py +235 -0
  114. foghttp-0.3.4/tests/client_proxy/test_environment.py +194 -0
  115. foghttp-0.3.4/tests/client_proxy/test_http_proxy_transport.py +361 -0
  116. foghttp-0.3.4/tests/client_proxy/test_https_proxy_connect.py +613 -0
  117. foghttp-0.3.4/tests/client_proxy/test_no_proxy.py +92 -0
  118. foghttp-0.3.4/tests/client_proxy/test_proxy_models.py +72 -0
  119. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_transport/test_transport_adapter.py +91 -5
  120. foghttp-0.3.4/tests/conftest.py +7 -0
  121. {foghttp-0.3.3 → foghttp-0.3.4}/tests/fault_injection/responses.py +0 -2
  122. {foghttp-0.3.3 → foghttp-0.3.4}/tests/fault_injection/test_async_fault_injection.py +0 -1
  123. {foghttp-0.3.3 → foghttp-0.3.4}/tests/http_body_scenarios.py +0 -4
  124. {foghttp-0.3.3 → foghttp-0.3.4}/tests/redirect_helpers.py +0 -1
  125. {foghttp-0.3.3 → foghttp-0.3.4}/tests/request_builder/test_header_policy.py +1 -0
  126. foghttp-0.3.4/tests/response_decompression/__init__.py +0 -0
  127. foghttp-0.3.4/tests/support/async_http_server.py +64 -0
  128. foghttp-0.3.4/tests/support/http_routes.py +77 -0
  129. foghttp-0.3.4/tests/support/raw_responses.py +299 -0
  130. foghttp-0.3.4/tests/support/sync_http_server.py +281 -0
  131. {foghttp-0.3.3 → foghttp-0.3.4}/tests/test_async_redirects.py +1 -1
  132. {foghttp-0.3.3 → foghttp-0.3.4}/tests/test_client_options.py +0 -5
  133. {foghttp-0.3.3 → foghttp-0.3.4}/tests/test_raw_client.py +51 -4
  134. {foghttp-0.3.3 → foghttp-0.3.4}/tests/test_raw_client_errors.py +4 -0
  135. {foghttp-0.3.3 → foghttp-0.3.4}/tests/test_sync_redirects.py +1 -1
  136. {foghttp-0.3.3 → foghttp-0.3.4}/uv.lock +1 -1
  137. foghttp-0.3.3/foghttp/stream_response.py +0 -379
  138. foghttp-0.3.3/src/core/metrics.rs +0 -769
  139. foghttp-0.3.3/src/py/client/transport/tests.rs +0 -86
  140. foghttp-0.3.3/src/py/client/transport.rs +0 -530
  141. foghttp-0.3.3/tests/client_cancellation/test_async_lifecycle_debug.py +0 -463
  142. foghttp-0.3.3/tests/client_lifecycle/test_client_lifecycle.py +0 -457
  143. foghttp-0.3.3/tests/client_options/test_raw_numeric_boundary.py +0 -145
  144. foghttp-0.3.3/tests/conftest.py +0 -655
  145. {foghttp-0.3.3 → foghttp-0.3.4}/.github/workflows/ci.yml +0 -0
  146. {foghttp-0.3.3 → foghttp-0.3.4}/.github/workflows/release.yml +0 -0
  147. {foghttp-0.3.3 → foghttp-0.3.4}/.gitignore +0 -0
  148. {foghttp-0.3.3 → foghttp-0.3.4}/.pre-commit-config.yaml +0 -0
  149. {foghttp-0.3.3 → foghttp-0.3.4}/CODE_OF_CONDUCT.md +0 -0
  150. {foghttp-0.3.3 → foghttp-0.3.4}/CONTRIBUTING.md +0 -0
  151. {foghttp-0.3.3 → foghttp-0.3.4}/LICENSE +0 -0
  152. {foghttp-0.3.3 → foghttp-0.3.4}/docs/benchmarks.md +0 -0
  153. {foghttp-0.3.3 → foghttp-0.3.4}/docs/lifecycle.md +0 -0
  154. {foghttp-0.3.3 → foghttp-0.3.4}/docs/pyo3-boundary.md +0 -0
  155. {foghttp-0.3.3 → foghttp-0.3.4}/docs/streaming.md +0 -0
  156. {foghttp-0.3.3 → foghttp-0.3.4}/docs/telemetry.md +0 -0
  157. {foghttp-0.3.3 → foghttp-0.3.4}/docs/timeouts.md +0 -0
  158. {foghttp-0.3.3 → foghttp-0.3.4}/examples/async_json_fanout.py +0 -0
  159. {foghttp-0.3.3 → foghttp-0.3.4}/examples/async_lifecycle_debug.py +0 -0
  160. {foghttp-0.3.3 → foghttp-0.3.4}/examples/async_resource_limits.py +0 -0
  161. {foghttp-0.3.3 → foghttp-0.3.4}/examples/async_streaming.py +0 -0
  162. {foghttp-0.3.3 → foghttp-0.3.4}/examples/compressed_response.py +0 -0
  163. {foghttp-0.3.3 → foghttp-0.3.4}/examples/prepared_requests.py +0 -0
  164. {foghttp-0.3.3 → foghttp-0.3.4}/examples/redirects.py +0 -0
  165. {foghttp-0.3.3 → foghttp-0.3.4}/examples/request_builder_compatibility.py +0 -0
  166. {foghttp-0.3.3 → foghttp-0.3.4}/examples/sync_json_api.py +0 -0
  167. {foghttp-0.3.3 → foghttp-0.3.4}/examples/sync_streaming.py +0 -0
  168. {foghttp-0.3.3 → foghttp-0.3.4}/examples/telemetry_hooks.py +0 -0
  169. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/__init__.py +0 -0
  170. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/_client/__init__.py +0 -0
  171. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/_client/asyncio_futures.py +0 -0
  172. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/_client/constants.py +0 -0
  173. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/_client/core.py +0 -0
  174. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/_client/lifecycle_debug.py +0 -0
  175. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/_client/raw/__init__.py +0 -0
  176. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/_client/raw/errors.py +0 -0
  177. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/_client/raw/timeout_errors.py +0 -0
  178. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/_client/request_builder/__init__.py +0 -0
  179. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/_client/request_builder/builder.py +0 -0
  180. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/_client/request_builder/defaults.py +0 -0
  181. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/_client/request_builder/merge.py +0 -0
  182. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/_client/request_builder/models.py +0 -0
  183. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/_client/response.py +0 -0
  184. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/_client/runtime/__init__.py +0 -0
  185. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/_client/runtime/constants.py +0 -0
  186. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/_client/runtime/workers.py +0 -0
  187. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/_client/stats.py +0 -0
  188. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/_client/stream_context.py +0 -0
  189. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/_client/telemetry/__init__.py +0 -0
  190. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/_client/telemetry/clock.py +0 -0
  191. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/_client/telemetry/dispatcher.py +0 -0
  192. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/_client/telemetry/emission.py +0 -0
  193. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/_client/telemetry/request_context.py +0 -0
  194. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/_client/telemetry/request_events.py +0 -0
  195. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/_client/telemetry/responses.py +0 -0
  196. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/_client/telemetry/url.py +0 -0
  197. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/_client/tls.py +0 -0
  198. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/_redaction.py +0 -0
  199. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/_request_body.py +0 -0
  200. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/_response/__init__.py +0 -0
  201. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/_response/encoding.py +0 -0
  202. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/_response/status.py +0 -0
  203. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/_streaming/__init__.py +0 -0
  204. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/_streaming/text/__init__.py +0 -0
  205. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/_streaming/text/async_chunks.py +0 -0
  206. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/_streaming/text/iterators.py +0 -0
  207. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/_streaming/text/lines.py +0 -0
  208. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/_streaming/text/sync_chunks.py +0 -0
  209. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/_telemetry.py +0 -0
  210. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/_validation/__init__.py +0 -0
  211. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/_validation/numeric.py +0 -0
  212. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/body.py +0 -0
  213. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/errors/__init__.py +0 -0
  214. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/errors/base.py +0 -0
  215. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/errors/lifecycle.py +0 -0
  216. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/errors/response.py +0 -0
  217. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/errors/timeout.py +0 -0
  218. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/headers.py +0 -0
  219. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/lifecycle_debug.py +0 -0
  220. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/limits.py +0 -0
  221. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/methods.py +0 -0
  222. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/models.py +0 -0
  223. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/pool_diagnostics.py +0 -0
  224. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/py.typed +0 -0
  225. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/request.py +0 -0
  226. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/request_info.py +0 -0
  227. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/response.py +0 -0
  228. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/stats.py +0 -0
  229. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/status_codes/__init__.py +0 -0
  230. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/status_codes/client_error.py +0 -0
  231. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/status_codes/redirect.py +0 -0
  232. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/status_codes/server_error.py +0 -0
  233. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/status_codes/success.py +0 -0
  234. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/telemetry/__init__.py +0 -0
  235. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/telemetry/config.py +0 -0
  236. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/telemetry/errors.py +0 -0
  237. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/telemetry/events.py +0 -0
  238. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/telemetry/sinks.py +0 -0
  239. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/timeout_diagnostics.py +0 -0
  240. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/timeouts.py +0 -0
  241. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/tls.py +0 -0
  242. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/transport_state.py +0 -0
  243. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/transport_stats.py +0 -0
  244. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/types/__init__.py +0 -0
  245. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/types/http.py +0 -0
  246. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/types/request.py +0 -0
  247. {foghttp-0.3.3 → foghttp-0.3.4}/foghttp/url.py +0 -0
  248. {foghttp-0.3.3 → foghttp-0.3.4}/logo.png +0 -0
  249. {foghttp-0.3.3 → foghttp-0.3.4}/scripts/check_all_position.py +0 -0
  250. {foghttp-0.3.3 → foghttp-0.3.4}/scripts/install_wheel_smoke.py +0 -0
  251. {foghttp-0.3.3 → foghttp-0.3.4}/src/core/client/telemetry/mod.rs +0 -0
  252. {foghttp-0.3.3 → foghttp-0.3.4}/src/core/client/telemetry/tests.rs +0 -0
  253. {foghttp-0.3.3 → foghttp-0.3.4}/src/core/method.rs +0 -0
  254. {foghttp-0.3.3 → foghttp-0.3.4}/src/core/metrics/atomic.rs +0 -0
  255. {foghttp-0.3.3 → foghttp-0.3.4}/src/core/mod.rs +0 -0
  256. {foghttp-0.3.3 → foghttp-0.3.4}/src/core/numeric/mod.rs +0 -0
  257. {foghttp-0.3.3 → foghttp-0.3.4}/src/core/numeric/tests.rs +0 -0
  258. {foghttp-0.3.3 → foghttp-0.3.4}/src/core/response/body.rs +0 -0
  259. {foghttp-0.3.3 → foghttp-0.3.4}/src/core/response/budget.rs +0 -0
  260. {foghttp-0.3.3 → foghttp-0.3.4}/src/core/response/decompression.rs +0 -0
  261. {foghttp-0.3.3 → foghttp-0.3.4}/src/core/response/mod.rs +0 -0
  262. {foghttp-0.3.3 → foghttp-0.3.4}/src/core/tls/mod.rs +0 -0
  263. {foghttp-0.3.3 → foghttp-0.3.4}/src/core/tls/tests.rs +0 -0
  264. {foghttp-0.3.3 → foghttp-0.3.4}/src/core/url/constants.rs +0 -0
  265. {foghttp-0.3.3 → foghttp-0.3.4}/src/core/url/mod.rs +0 -0
  266. {foghttp-0.3.3 → foghttp-0.3.4}/src/core/url/origin.rs +0 -0
  267. {foghttp-0.3.3 → foghttp-0.3.4}/src/core/url/scheme.rs +0 -0
  268. {foghttp-0.3.3 → foghttp-0.3.4}/src/core/url/tests.rs +0 -0
  269. {foghttp-0.3.3 → foghttp-0.3.4}/src/lib.rs +0 -0
  270. {foghttp-0.3.3 → foghttp-0.3.4}/src/py/client/acquire/diagnostics.rs +0 -0
  271. {foghttp-0.3.3 → foghttp-0.3.4}/src/py/client/acquire/gate.rs +0 -0
  272. {foghttp-0.3.3 → foghttp-0.3.4}/src/py/client/acquire/mod.rs +0 -0
  273. {foghttp-0.3.3 → foghttp-0.3.4}/src/py/client/acquire/origin.rs +0 -0
  274. {foghttp-0.3.3 → foghttp-0.3.4}/src/py/client/acquire/pending.rs +0 -0
  275. {foghttp-0.3.3 → foghttp-0.3.4}/src/py/client/acquire/permit.rs +0 -0
  276. {foghttp-0.3.3 → foghttp-0.3.4}/src/py/client/acquire/telemetry.rs +0 -0
  277. {foghttp-0.3.3 → foghttp-0.3.4}/src/py/client/acquire/tests.rs +0 -0
  278. {foghttp-0.3.3 → foghttp-0.3.4}/src/py/client/async_requests/active.rs +0 -0
  279. {foghttp-0.3.3 → foghttp-0.3.4}/src/py/client/async_requests/callback.rs +0 -0
  280. {foghttp-0.3.3 → foghttp-0.3.4}/src/py/client/async_requests/mod.rs +0 -0
  281. {foghttp-0.3.3 → foghttp-0.3.4}/src/py/client/async_requests/registry.rs +0 -0
  282. {foghttp-0.3.3 → foghttp-0.3.4}/src/py/client/body.rs +0 -0
  283. {foghttp-0.3.3 → foghttp-0.3.4}/src/py/client/future.rs +0 -0
  284. {foghttp-0.3.3 → foghttp-0.3.4}/src/py/client/lifecycle/mod.rs +0 -0
  285. {foghttp-0.3.3 → foghttp-0.3.4}/src/py/client/lifecycle/tests.rs +0 -0
  286. {foghttp-0.3.3 → foghttp-0.3.4}/src/py/client/redirects/action.rs +0 -0
  287. {foghttp-0.3.3 → foghttp-0.3.4}/src/py/client/redirects/headers.rs +0 -0
  288. {foghttp-0.3.3 → foghttp-0.3.4}/src/py/client/redirects/method.rs +0 -0
  289. {foghttp-0.3.3 → foghttp-0.3.4}/src/py/client/redirects/mod.rs +0 -0
  290. {foghttp-0.3.3 → foghttp-0.3.4}/src/py/client/redirects/policy.rs +0 -0
  291. {foghttp-0.3.3 → foghttp-0.3.4}/src/py/client/redirects/status.rs +0 -0
  292. {foghttp-0.3.3 → foghttp-0.3.4}/src/py/client/redirects/tests.rs +0 -0
  293. {foghttp-0.3.3 → foghttp-0.3.4}/src/py/client/redirects/utils.rs +0 -0
  294. {foghttp-0.3.3 → foghttp-0.3.4}/src/py/client/runtime/constants.rs +0 -0
  295. {foghttp-0.3.3 → foghttp-0.3.4}/src/py/client/runtime/mod.rs +0 -0
  296. {foghttp-0.3.3 → foghttp-0.3.4}/src/py/client/runtime/tests.rs +0 -0
  297. {foghttp-0.3.3 → foghttp-0.3.4}/src/py/client/runtime/workers.rs +0 -0
  298. {foghttp-0.3.3 → foghttp-0.3.4}/src/py/client/streams/callback.rs +0 -0
  299. {foghttp-0.3.3 → foghttp-0.3.4}/src/py/client/streams/constants.rs +0 -0
  300. {foghttp-0.3.3 → foghttp-0.3.4}/src/py/client/streams/mod.rs +0 -0
  301. {foghttp-0.3.3 → foghttp-0.3.4}/src/py/client/streams/parts.rs +0 -0
  302. {foghttp-0.3.3 → foghttp-0.3.4}/src/py/client/streams/read.rs +0 -0
  303. {foghttp-0.3.3 → foghttp-0.3.4}/src/py/client/streams/registry.rs +0 -0
  304. {foghttp-0.3.3 → foghttp-0.3.4}/src/py/client/streams/response.rs +0 -0
  305. {foghttp-0.3.3 → foghttp-0.3.4}/src/py/client/streams/state.rs +0 -0
  306. {foghttp-0.3.3 → foghttp-0.3.4}/src/py/client/streams/state_tests.rs +0 -0
  307. {foghttp-0.3.3 → foghttp-0.3.4}/src/py/client/timeout_diagnostics.rs +0 -0
  308. {foghttp-0.3.3 → foghttp-0.3.4}/src/py/mod.rs +0 -0
  309. {foghttp-0.3.3 → foghttp-0.3.4}/src/py/pool_diagnostics.rs +0 -0
  310. {foghttp-0.3.3 → foghttp-0.3.4}/src/py/response.rs +0 -0
  311. {foghttp-0.3.3 → foghttp-0.3.4}/src/py/stats.rs +0 -0
  312. {foghttp-0.3.3 → foghttp-0.3.4}/src/py/transport_state.rs +0 -0
  313. {foghttp-0.3.3 → foghttp-0.3.4}/src/py/url.rs +0 -0
  314. {foghttp-0.3.3 → foghttp-0.3.4}/tests/__init__.py +0 -0
  315. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_cancellation/__init__.py +0 -0
  316. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_cancellation/conftest.py +0 -0
  317. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_cancellation/constants.py +0 -0
  318. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_cancellation/helpers.py +0 -0
  319. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_cancellation/test_async_cancellation.py +0 -0
  320. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_cancellation/test_async_telemetry.py +0 -0
  321. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_cancellation/test_asyncio_helpers.py +0 -0
  322. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_keepalive/__init__.py +0 -0
  323. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_keepalive/assertions.py +0 -0
  324. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_keepalive/conftest.py +0 -0
  325. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_keepalive/constants.py +0 -0
  326. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_keepalive/models.py +0 -0
  327. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_keepalive/server.py +0 -0
  328. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_keepalive/test_async_keepalive.py +0 -0
  329. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_keepalive/test_sync_keepalive.py +0 -0
  330. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_lifecycle/__init__.py +0 -0
  331. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_lifecycle/constants.py +0 -0
  332. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_options/__init__.py +0 -0
  333. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_options/test_numeric_validation.py +0 -0
  334. {foghttp-0.3.3/tests/client_resources → foghttp-0.3.4/tests/client_proxy}/__init__.py +0 -0
  335. {foghttp-0.3.3/tests/client_telemetry → foghttp-0.3.4/tests/client_resources}/__init__.py +0 -0
  336. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_resources/conftest.py +0 -0
  337. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_resources/constants.py +0 -0
  338. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_resources/helpers.py +0 -0
  339. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_resources/test_async_global_limits.py +0 -0
  340. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_resources/test_async_origin_limits.py +0 -0
  341. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_resources/test_async_pool_diagnostics.py +0 -0
  342. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_resources/test_async_response_body_limits.py +0 -0
  343. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_resources/test_async_transport_state.py +0 -0
  344. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_resources/test_diagnostic_snapshot_contract.py +0 -0
  345. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_resources/test_sync_global_limits.py +0 -0
  346. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_resources/test_sync_origin_limits.py +0 -0
  347. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_resources/test_sync_pool_diagnostics.py +0 -0
  348. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_resources/test_sync_response_body_limits.py +0 -0
  349. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_resources/test_sync_transport_state.py +0 -0
  350. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_streaming/__init__.py +0 -0
  351. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_streaming/conftest.py +0 -0
  352. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_streaming/constants.py +0 -0
  353. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_streaming/server.py +0 -0
  354. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_streaming/stream_readers.py +0 -0
  355. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_streaming/test_async_streaming.py +0 -0
  356. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_streaming/test_async_streaming_text_lines.py +0 -0
  357. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_streaming/test_streaming_text_decoding.py +0 -0
  358. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_streaming/test_sync_streaming.py +0 -0
  359. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_streaming/test_sync_streaming_text_lines.py +0 -0
  360. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_streaming/text_decoding_sources.py +0 -0
  361. {foghttp-0.3.3/tests/client_timeouts → foghttp-0.3.4/tests/client_telemetry}/__init__.py +0 -0
  362. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_telemetry/assertions.py +0 -0
  363. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_telemetry/conftest.py +0 -0
  364. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_telemetry/constants.py +0 -0
  365. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_telemetry/models.py +0 -0
  366. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_telemetry/test_async_stream_hooks.py +0 -0
  367. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_telemetry/test_async_stream_telemetry.py +0 -0
  368. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_telemetry/test_async_telemetry.py +0 -0
  369. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_telemetry/test_concurrent_delivery.py +0 -0
  370. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_telemetry/test_event_contract.py +0 -0
  371. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_telemetry/test_sync_stream_telemetry.py +0 -0
  372. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_telemetry/test_sync_telemetry.py +0 -0
  373. {foghttp-0.3.3/tests/client_tls → foghttp-0.3.4/tests/client_timeouts}/__init__.py +0 -0
  374. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_timeouts/conftest.py +0 -0
  375. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_timeouts/constants.py +0 -0
  376. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_timeouts/helpers.py +0 -0
  377. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_timeouts/test_async_timeouts.py +0 -0
  378. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_timeouts/test_sync_timeouts.py +0 -0
  379. {foghttp-0.3.3/tests/fault_injection → foghttp-0.3.4/tests/client_tls}/__init__.py +0 -0
  380. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_tls/assertions.py +0 -0
  381. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_tls/certificates.py +0 -0
  382. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_tls/conftest.py +0 -0
  383. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_tls/constants.py +0 -0
  384. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_tls/handshake_server.py +0 -0
  385. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_tls/models.py +0 -0
  386. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_tls/server.py +0 -0
  387. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_tls/test_async_tls.py +0 -0
  388. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_tls/test_async_tls_redirects.py +0 -0
  389. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_tls/test_sync_tls.py +0 -0
  390. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_tls/test_sync_tls_redirects.py +0 -0
  391. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_tls/test_tls_config.py +0 -0
  392. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_transport/__init__.py +0 -0
  393. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_transport/models.py +0 -0
  394. {foghttp-0.3.3 → foghttp-0.3.4}/tests/client_warning_actions.py +0 -0
  395. {foghttp-0.3.3/tests/network_errors → foghttp-0.3.4/tests/fault_injection}/__init__.py +0 -0
  396. {foghttp-0.3.3 → foghttp-0.3.4}/tests/fault_injection/conftest.py +0 -0
  397. {foghttp-0.3.3 → foghttp-0.3.4}/tests/fault_injection/constants.py +0 -0
  398. {foghttp-0.3.3 → foghttp-0.3.4}/tests/fault_injection/models.py +0 -0
  399. {foghttp-0.3.3 → foghttp-0.3.4}/tests/fault_injection/protocol.py +0 -0
  400. {foghttp-0.3.3 → foghttp-0.3.4}/tests/fault_injection/server.py +0 -0
  401. {foghttp-0.3.3 → foghttp-0.3.4}/tests/fault_injection/state.py +0 -0
  402. {foghttp-0.3.3 → foghttp-0.3.4}/tests/fault_injection/state_assertions.py +0 -0
  403. {foghttp-0.3.3 → foghttp-0.3.4}/tests/fault_injection/test_async_socket_shutdown.py +0 -0
  404. {foghttp-0.3.3 → foghttp-0.3.4}/tests/fault_injection/test_sync_fault_injection.py +0 -0
  405. {foghttp-0.3.3 → foghttp-0.3.4}/tests/fault_injection/test_sync_socket_shutdown.py +0 -0
  406. {foghttp-0.3.3 → foghttp-0.3.4}/tests/fault_injection/timeout_assertions.py +0 -0
  407. {foghttp-0.3.3 → foghttp-0.3.4}/tests/fault_injection/transport_waiters.py +0 -0
  408. {foghttp-0.3.3/tests/request_builder → foghttp-0.3.4/tests/network_errors}/__init__.py +0 -0
  409. {foghttp-0.3.3 → foghttp-0.3.4}/tests/network_errors/conftest.py +0 -0
  410. {foghttp-0.3.3 → foghttp-0.3.4}/tests/network_errors/constants.py +0 -0
  411. {foghttp-0.3.3 → foghttp-0.3.4}/tests/network_errors/helpers.py +0 -0
  412. {foghttp-0.3.3 → foghttp-0.3.4}/tests/network_errors/test_async_network_errors.py +0 -0
  413. {foghttp-0.3.3 → foghttp-0.3.4}/tests/network_errors/test_sync_network_errors.py +0 -0
  414. {foghttp-0.3.3 → foghttp-0.3.4}/tests/pyo3_boundary/__init__.py +0 -0
  415. {foghttp-0.3.3 → foghttp-0.3.4}/tests/pyo3_boundary/conftest.py +0 -0
  416. {foghttp-0.3.3 → foghttp-0.3.4}/tests/pyo3_boundary/constants.py +0 -0
  417. {foghttp-0.3.3 → foghttp-0.3.4}/tests/pyo3_boundary/gil_progress.py +0 -0
  418. {foghttp-0.3.3 → foghttp-0.3.4}/tests/pyo3_boundary/test_async_future_boundary.py +0 -0
  419. {foghttp-0.3.3 → foghttp-0.3.4}/tests/pyo3_boundary/test_sync_gil_boundary.py +0 -0
  420. {foghttp-0.3.3 → foghttp-0.3.4}/tests/pyo3_boundary/thread_worker.py +0 -0
  421. {foghttp-0.3.3/tests/response_decompression → foghttp-0.3.4/tests/request_builder}/__init__.py +0 -0
  422. {foghttp-0.3.3 → foghttp-0.3.4}/tests/request_builder/encoding_property_helpers.py +0 -0
  423. {foghttp-0.3.3 → foghttp-0.3.4}/tests/request_builder/test_base_url.py +0 -0
  424. {foghttp-0.3.3 → foghttp-0.3.4}/tests/request_builder/test_body.py +0 -0
  425. {foghttp-0.3.3 → foghttp-0.3.4}/tests/request_builder/test_default_headers.py +0 -0
  426. {foghttp-0.3.3 → foghttp-0.3.4}/tests/request_builder/test_default_params.py +0 -0
  427. {foghttp-0.3.3 → foghttp-0.3.4}/tests/request_builder/test_encoding_properties.py +0 -0
  428. {foghttp-0.3.3 → foghttp-0.3.4}/tests/request_builder/test_headers.py +0 -0
  429. {foghttp-0.3.3 → foghttp-0.3.4}/tests/request_builder/test_merge_contract.py +0 -0
  430. {foghttp-0.3.3 → foghttp-0.3.4}/tests/request_builder/test_no_mutation.py +0 -0
  431. {foghttp-0.3.3 → foghttp-0.3.4}/tests/request_builder/test_parity.py +0 -0
  432. {foghttp-0.3.3 → foghttp-0.3.4}/tests/request_builder/test_query_params.py +0 -0
  433. {foghttp-0.3.3 → foghttp-0.3.4}/tests/request_builder/test_shortcuts.py +0 -0
  434. {foghttp-0.3.3 → foghttp-0.3.4}/tests/request_factories.py +0 -0
  435. {foghttp-0.3.3 → foghttp-0.3.4}/tests/response_decompression/conftest.py +0 -0
  436. {foghttp-0.3.3 → foghttp-0.3.4}/tests/response_decompression/constants.py +0 -0
  437. {foghttp-0.3.3 → foghttp-0.3.4}/tests/response_decompression/helpers.py +0 -0
  438. {foghttp-0.3.3 → foghttp-0.3.4}/tests/response_decompression/payloads.py +0 -0
  439. {foghttp-0.3.3 → foghttp-0.3.4}/tests/response_decompression/server.py +0 -0
  440. {foghttp-0.3.3 → foghttp-0.3.4}/tests/response_decompression/test_async_response_decompression.py +0 -0
  441. {foghttp-0.3.3 → foghttp-0.3.4}/tests/response_decompression/test_sync_response_decompression.py +0 -0
  442. {foghttp-0.3.3 → foghttp-0.3.4}/tests/support/__init__.py +0 -0
  443. {foghttp-0.3.3 → foghttp-0.3.4}/tests/support/timeout_diagnostics.py +0 -0
  444. {foghttp-0.3.3 → foghttp-0.3.4}/tests/support/transport_stats.py +0 -0
  445. {foghttp-0.3.3 → foghttp-0.3.4}/tests/test_async_client.py +0 -0
  446. {foghttp-0.3.3 → foghttp-0.3.4}/tests/test_async_response.py +0 -0
  447. {foghttp-0.3.3 → foghttp-0.3.4}/tests/test_headers.py +0 -0
  448. {foghttp-0.3.3 → foghttp-0.3.4}/tests/test_public_api.py +0 -0
  449. {foghttp-0.3.3 → foghttp-0.3.4}/tests/test_query_params.py +0 -0
  450. {foghttp-0.3.3 → foghttp-0.3.4}/tests/test_redaction.py +0 -0
  451. {foghttp-0.3.3 → foghttp-0.3.4}/tests/test_request_model.py +0 -0
  452. {foghttp-0.3.3 → foghttp-0.3.4}/tests/test_response_encoding.py +0 -0
  453. {foghttp-0.3.3 → foghttp-0.3.4}/tests/test_response_flags.py +0 -0
  454. {foghttp-0.3.3 → foghttp-0.3.4}/tests/test_runtime_workers.py +0 -0
  455. {foghttp-0.3.3 → foghttp-0.3.4}/tests/test_sync_client.py +0 -0
  456. {foghttp-0.3.3 → foghttp-0.3.4}/tests/test_sync_response.py +0 -0
  457. {foghttp-0.3.3 → foghttp-0.3.4}/tests/test_transport_stats.py +0 -0
  458. {foghttp-0.3.3 → foghttp-0.3.4}/tests/test_url.py +0 -0
@@ -40,7 +40,9 @@ per-file-ignores =
40
40
  foghttp/request.py: WPS237
41
41
  foghttp/request_info.py: WPS237
42
42
  foghttp/response.py: WPS214, WPS237
43
- foghttp/stream_response.py: WPS201, WPS214, WPS237, WPS501
43
+ foghttp/stream_response/async_response.py: WPS214
44
+ foghttp/stream_response/base.py: WPS201, WPS237
45
+ foghttp/stream_response/sync_response.py: WPS501
44
46
  foghttp/url.py: WPS214, WPS237
45
47
  # Native resource adapters intentionally use try/finally-only cleanup paths.
46
48
  foghttp/_client/response.py: WPS501
@@ -110,7 +110,7 @@ dependencies = [
110
110
 
111
111
  [[package]]
112
112
  name = "foghttp"
113
- version = "0.3.3"
113
+ version = "0.3.4"
114
114
  dependencies = [
115
115
  "brotli",
116
116
  "bytes",
@@ -691,6 +691,7 @@ version = "1.52.2"
691
691
  source = "registry+https://github.com/rust-lang/crates.io-index"
692
692
  checksum = "110a78583f19d5cdb2c5ccf321d1290344e71313c6c37d43520d386027d18386"
693
693
  dependencies = [
694
+ "bytes",
694
695
  "libc",
695
696
  "mio",
696
697
  "pin-project-lite",
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "foghttp"
3
- version = "0.3.3"
3
+ version = "0.3.4"
4
4
  edition = "2021"
5
5
  license = "MIT"
6
6
  readme = "README.md"
@@ -60,6 +60,7 @@ features = [
60
60
  [dependencies.tokio]
61
61
  version = "1.41.1"
62
62
  features = [
63
+ "io-util",
63
64
  "rt-multi-thread",
64
65
  "sync",
65
66
  "time",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: foghttp
3
- Version: 0.3.3
3
+ Version: 0.3.4
4
4
  Classifier: Development Status :: 3 - Alpha
5
5
  Classifier: Framework :: AsyncIO
6
6
  Classifier: License :: OSI Approved :: MIT License
@@ -138,6 +138,8 @@ async with foghttp.AsyncClient() as client:
138
138
  token-like URL params, and buffered body bytes
139
139
  - normalized `URL` model with origin comparison and relative joins
140
140
  - GET/HEAD/POST redirects with final URL, history, and conservative replay policy
141
+ - HTTP proxy routing and HTTPS proxy `CONNECT` tunnelling through explicit
142
+ `proxy=` or `trust_env=True` when the proxy endpoint uses `http://`
141
143
  - HTTPS with default WebPKI roots, explicit custom CA certificates, and
142
144
  custom-only CA trust
143
145
  - graceful sync `close()` that waits for in-flight sync requests
@@ -164,6 +166,7 @@ async with foghttp.AsyncClient() as client:
164
166
  - [Timeout model](https://github.com/AmberFog/foghttp/blob/main/docs/timeouts.md)
165
167
  - [Telemetry contract](https://github.com/AmberFog/foghttp/blob/main/docs/telemetry.md)
166
168
  - [Response streaming](https://github.com/AmberFog/foghttp/blob/main/docs/streaming.md)
169
+ - [Proxy and trust_env](https://github.com/AmberFog/foghttp/blob/main/docs/proxies.md)
167
170
  - [TLS trust](https://github.com/AmberFog/foghttp/blob/main/docs/tls.md)
168
171
  - [Use cases](https://github.com/AmberFog/foghttp/blob/main/docs/use-cases.md)
169
172
  - [Redirects](https://github.com/AmberFog/foghttp/blob/main/docs/redirects.md)
@@ -175,9 +178,12 @@ async with foghttp.AsyncClient() as client:
175
178
 
176
179
  FogHTTP is currently focused on controlled HTTP workloads. Buffered responses
177
180
  are the broadest supported path; sync and async response streaming are available
178
- as bytes/text/line context-managed APIs. Streaming uploads, cookies, auth helpers,
179
- proxy support, multipart uploads, HTTP/2, automatic `Accept-Encoding`
180
- negotiation, streaming decompression, strict connection-level pool limits,
181
+ as bytes/text/line context-managed APIs. HTTP proxy routing and HTTPS proxy
182
+ `CONNECT` tunnelling are available through `proxy=` and `trust_env=True` when
183
+ the proxy endpoint itself uses `http://`.
184
+ Streaming uploads, cookies, auth helpers, multipart uploads,
185
+ HTTP/2, automatic `Accept-Encoding` negotiation, streaming decompression,
186
+ strict connection-level pool limits,
181
187
  per-request connect timeout reconfiguration, and request-body write timeout
182
188
  semantics are planned for later versions. Response body read timeout is
183
189
  available for buffered and streaming response bodies. Socket lifecycle telemetry
@@ -102,6 +102,8 @@ async with foghttp.AsyncClient() as client:
102
102
  token-like URL params, and buffered body bytes
103
103
  - normalized `URL` model with origin comparison and relative joins
104
104
  - GET/HEAD/POST redirects with final URL, history, and conservative replay policy
105
+ - HTTP proxy routing and HTTPS proxy `CONNECT` tunnelling through explicit
106
+ `proxy=` or `trust_env=True` when the proxy endpoint uses `http://`
105
107
  - HTTPS with default WebPKI roots, explicit custom CA certificates, and
106
108
  custom-only CA trust
107
109
  - graceful sync `close()` that waits for in-flight sync requests
@@ -128,6 +130,7 @@ async with foghttp.AsyncClient() as client:
128
130
  - [Timeout model](https://github.com/AmberFog/foghttp/blob/main/docs/timeouts.md)
129
131
  - [Telemetry contract](https://github.com/AmberFog/foghttp/blob/main/docs/telemetry.md)
130
132
  - [Response streaming](https://github.com/AmberFog/foghttp/blob/main/docs/streaming.md)
133
+ - [Proxy and trust_env](https://github.com/AmberFog/foghttp/blob/main/docs/proxies.md)
131
134
  - [TLS trust](https://github.com/AmberFog/foghttp/blob/main/docs/tls.md)
132
135
  - [Use cases](https://github.com/AmberFog/foghttp/blob/main/docs/use-cases.md)
133
136
  - [Redirects](https://github.com/AmberFog/foghttp/blob/main/docs/redirects.md)
@@ -139,9 +142,12 @@ async with foghttp.AsyncClient() as client:
139
142
 
140
143
  FogHTTP is currently focused on controlled HTTP workloads. Buffered responses
141
144
  are the broadest supported path; sync and async response streaming are available
142
- as bytes/text/line context-managed APIs. Streaming uploads, cookies, auth helpers,
143
- proxy support, multipart uploads, HTTP/2, automatic `Accept-Encoding`
144
- negotiation, streaming decompression, strict connection-level pool limits,
145
+ as bytes/text/line context-managed APIs. HTTP proxy routing and HTTPS proxy
146
+ `CONNECT` tunnelling are available through `proxy=` and `trust_env=True` when
147
+ the proxy endpoint itself uses `http://`.
148
+ Streaming uploads, cookies, auth helpers, multipart uploads,
149
+ HTTP/2, automatic `Accept-Encoding` negotiation, streaming decompression,
150
+ strict connection-level pool limits,
145
151
  per-request connect timeout reconfiguration, and request-body write timeout
146
152
  semantics are planned for later versions. Response body read timeout is
147
153
  available for buffered and streaming response bodies. Socket lifecycle telemetry
@@ -67,8 +67,8 @@ The following areas are especially security-sensitive in FogHTTP:
67
67
  - URL credentials, token-like query parameters, or secrets in repr/error output
68
68
  - sensitive header redaction
69
69
  - request or response body leakage in diagnostics
70
- - SSRF-related behavior in redirects, URL normalization, proxy support, or
71
- future environment-driven configuration
70
+ - SSRF-related behavior in redirects, URL normalization, proxy support,
71
+ `trust_env` environment configuration, or future environment-driven behavior
72
72
  - header smuggling or unsafe manual framing headers
73
73
  - decompression, buffering, and response-body memory limits
74
74
  - denial of service through connection, request, pending queue, runtime, or
@@ -118,8 +118,9 @@ The following are usually out of scope unless they demonstrate a concrete
118
118
  FogHTTP vulnerability:
119
119
 
120
120
  - attacks that require arbitrary code execution in the caller process
121
- - reports about unsupported features such as proxy support, cookie jar behavior,
122
- multipart uploads, or HTTP/2 unless the current code exposes unsafe behavior
121
+ - reports about unsupported features such as proxy transport behavior, cookie
122
+ jar behavior, multipart uploads, or HTTP/2 unless the current code exposes
123
+ unsafe behavior
123
124
  - denial-of-service reports that ignore documented response and request limits
124
125
  - issues caused only by intentionally disabling security in user application
125
126
  code outside FogHTTP
@@ -74,6 +74,7 @@ try to keep public interfaces stable and avoid unnecessary breaking changes.
74
74
  - [Telemetry contract](./telemetry.md)
75
75
  - [Response streaming](./streaming.md)
76
76
  - [TLS trust](./tls.md)
77
+ - [Proxy and trust_env](./proxies.md)
77
78
  - [Use cases](./use-cases.md)
78
79
  - [Redirects](./redirects.md)
79
80
  - [Limitations](./limitations.md)
@@ -123,13 +124,17 @@ try to keep public interfaces stable and avoid unnecessary breaking changes.
123
124
  and `dump_pool_diagnostics()`
124
125
  - opt-in async lifecycle debug mode for active request snapshots and strict
125
126
  leak checks
127
+ - HTTP proxy routing and HTTPS `CONNECT` tunnelling through explicit `proxy=` or
128
+ `trust_env=True` (`HTTP_PROXY` / `HTTPS_PROXY` / `ALL_PROXY`) when the proxy
129
+ endpoint uses `http://`, with target-host TLS validation for tunnelled HTTPS
126
130
  - default per-response and aggregate buffered response body limits
127
131
  - grouped HTTP status constants and reusable HTTP method constants
128
132
 
129
133
  ## Not Yet
130
134
 
131
135
  FogHTTP does not yet implement streaming uploads, cookies, multipart uploads,
132
- proxy support, `trust_env`, HTTP/2, automatic `Accept-Encoding` negotiation,
133
- streaming decompression, or advanced authentication helpers. Disabling TLS
134
- verification is intentionally not supported. See [Limitations](./limitations.md)
135
- for details.
136
+ HTTP/2, automatic `Accept-Encoding` negotiation, streaming decompression, or
137
+ advanced authentication helpers. `trust_env` supports HTTP proxy routing, HTTPS
138
+ `CONNECT` tunnelling through `http://` proxy endpoints, and `SSL_CERT_FILE`.
139
+ Disabling TLS verification is intentionally not supported. See
140
+ [Limitations](./limitations.md) for details.
@@ -38,6 +38,10 @@ try to keep public interfaces stable and avoid unnecessary breaking changes.
38
38
  - GET/HEAD/POST redirects
39
39
  - HTTPS with default WebPKI roots, explicit custom CA certificate files, and
40
40
  custom-only CA trust through `TLSConfig(trust_webpki_roots=False)`
41
+ - plain HTTP proxy routing and HTTPS proxy `CONNECT` through explicit `proxy=`
42
+ or `trust_env=True` when the proxy endpoint uses `http://`, plus
43
+ `SSL_CERT_FILE`; see
44
+ [Proxy and trust_env](./proxies.md)
41
45
  - async request cancellation that aborts the in-flight Rust request
42
46
  - global active request limit, per-origin active request limit, pending acquire
43
47
  limit, request stats, and stuck request pool diagnostics
@@ -56,7 +60,7 @@ try to keep public interfaces stable and avoid unnecessary breaking changes.
56
60
  - reusable HTTP method constants through `foghttp.methods`
57
61
  - HTTP/1.1 over HTTP and HTTPS
58
62
 
59
- ## Not Implemented Yet
63
+ ## Current Gaps And Constraints
60
64
 
61
65
  | Feature | Current behavior |
62
66
  |---|---|
@@ -65,13 +69,16 @@ try to keep public interfaces stable and avoid unnecessary breaking changes.
65
69
  | Multipart uploads | Not available |
66
70
  | `files=` | Reserved in the body matrix; not available yet |
67
71
  | Cookie jar | `cookies=True` is rejected |
68
- | Proxy support | `trust_env=True` is rejected |
72
+ | Plain HTTP proxy routing | Available for `http://` targets through explicit `proxy=` or `trust_env=True` environment config |
73
+ | HTTPS proxy `CONNECT` | Available for `https://` targets through explicit `proxy=` or `trust_env=True` when the proxy endpoint itself uses `http://`; TLS is validated against the target host |
74
+ | TLS-to-proxy endpoints | `https://proxy.example:443` proxy endpoint URLs are rejected; TLS-to-proxy is not implemented yet |
75
+ | Environment proxy redirects | Same-origin redirects can continue; cross-origin redirects under `trust_env=True` proxy policy fail closed until per-hop environment proxy recomputation is implemented |
69
76
  | Auth helpers | Use manual headers for simple cases |
70
77
  | Disabling TLS verification | Not available by design; use `TLSConfig` with explicit CA certificates |
71
78
  | OS trust store integration | Not available; FogHTTP uses bundled WebPKI roots unless `trust_webpki_roots=False` is set |
72
79
  | HTTP/2 | Not available |
73
80
  | automatic `Accept-Encoding` negotiation | Not implemented; send `Accept-Encoding` manually when you want compressed responses |
74
- | transport-managed request headers | Safe API rejects manual `Host`, `Content-Length`, `Transfer-Encoding`, `TE`, `Trailer`, `Connection`, `Upgrade`, `Keep-Alive`, and `Proxy-Connection` |
81
+ | transport-managed request headers | Safe API rejects manual `Host`, `Content-Length`, `Transfer-Encoding`, `TE`, `Trailer`, `Connection`, `Upgrade`, `Keep-Alive`, `Proxy-Connection`, and `Proxy-Authorization` |
75
82
  | request body source conflicts | Only one body source can be passed today: `json=`, `data=`, or `content=` |
76
83
  | true active connection-level limits | `max_active_requests_per_origin` limits buffered request slots; socket lifecycle telemetry is observable, but FogHTTP does not yet expose separate physical connection limits |
77
84
  | per-request connect timeout changes | `Timeouts.connect` configures the Rust connector from client-level settings when transport state is created; per-request `timeout.connect` does not reconfigure the connector |
@@ -101,7 +108,7 @@ Wait before using FogHTTP when:
101
108
 
102
109
  - you need transparent streaming decompression
103
110
  - you upload large files
104
- - you need proxy behavior from environment variables
111
+ - you need SOCKS, PAC, WPAD, or platform proxy discovery
105
112
  - you rely on cookies across requests
106
113
  - you need multipart form-data or large uploads
107
114
  - you need per-request connect timeout reconfiguration or request-body write
@@ -0,0 +1,202 @@
1
+ # Proxy and trust_env
2
+
3
+ FogHTTP supports plain HTTP proxy routing for `http://` target URLs and HTTPS
4
+ proxy tunnelling for `https://` target URLs via HTTP `CONNECT`.
5
+
6
+ For `https://` targets, FogHTTP opens a `CONNECT` tunnel to the proxy and then
7
+ performs the TLS handshake against the **target** host over that tunnel, so the
8
+ certificate is validated for the target origin, not the proxy. If the tunnel
9
+ cannot be established — proxy authentication failure, a non-2xx `CONNECT`
10
+ status, or the proxy closing the tunnel early — FogHTTP raises `RequestError`
11
+ instead of silently falling back to a direct connection.
12
+
13
+ ## Explicit Proxy
14
+
15
+ Use client-level `proxy=` when all requests from that client should use the
16
+ same HTTP proxy endpoint. Both `http://` and `https://` targets are routed
17
+ through the proxy: plain HTTP uses absolute-form, HTTPS is tunnelled via
18
+ `CONNECT`:
19
+
20
+ ```python
21
+ import foghttp
22
+
23
+ with foghttp.Client(proxy="http://proxy.internal:8080") as client:
24
+ plain = client.get("http://api.internal/items")
25
+ secure = client.get("https://api.internal/items") # tunnelled via CONNECT
26
+
27
+ print(plain.status_code, secure.status_code)
28
+ ```
29
+
30
+ The same option is available on `AsyncClient`.
31
+
32
+ Proxy endpoint URLs must currently use the `http://` scheme. HTTPS target URLs
33
+ are still supported through that proxy via `CONNECT`, but TLS-to-proxy
34
+ endpoints such as `https://proxy.internal:443` are not implemented yet and are
35
+ rejected when client configuration is created.
36
+
37
+ An empty endpoint path and `/` are treated as the same proxy endpoint. Paths,
38
+ queries, and fragments other than `/` are rejected.
39
+
40
+ FogHTTP sends proxied HTTP requests in absolute-form:
41
+
42
+ ```http
43
+ GET http://api.internal/items HTTP/1.1
44
+ Host: api.internal
45
+ ```
46
+
47
+ The `Host` header remains the target origin host. It is not replaced with the
48
+ proxy host.
49
+
50
+ ## HTTPS CONNECT Tunnelling
51
+
52
+ For `https://` targets, FogHTTP sends a `CONNECT target-host:port` request to
53
+ the proxy and, once the proxy answers `200`, performs the TLS handshake through
54
+ the tunnel:
55
+
56
+ ```http
57
+ CONNECT api.internal:443 HTTP/1.1
58
+ Host: api.internal:443
59
+ ```
60
+
61
+ TLS is validated against the **target** host using the same `TLSConfig` rules as
62
+ a direct connection; the proxy never terminates TLS and cannot impersonate the
63
+ target. A failed tunnel (`CONNECT` non-2xx, proxy auth failure, or early close)
64
+ maps to a stable `RequestError`, releases the request slot, and does not return
65
+ a poisoned connection to the pool. The tunnelled request itself is sent in
66
+ origin-form, exactly like a direct HTTPS request.
67
+
68
+ Connection and pool telemetry for HTTPS CONNECT is keyed by the target origin
69
+ whose TLS session is tunnelled. FogHTTP does not yet expose separate proxy
70
+ endpoint connection telemetry.
71
+
72
+ `Timeouts.connect` bounds the whole connect phase, including the `CONNECT`
73
+ handshake, so a proxy that accepts the socket but never answers `CONNECT` fails
74
+ with a connect timeout instead of hanging until the total deadline. This uses
75
+ the client-level connector timeout; per-request `timeout.connect` does not
76
+ reconfigure the connector yet. Request cancellation during tunnel setup aborts
77
+ the attempt and releases the slot.
78
+
79
+ ## Proxy Authentication
80
+
81
+ Proxy credentials can be passed as userinfo in the proxy URL:
82
+
83
+ ```python
84
+ username = load_proxy_username()
85
+ password = load_proxy_password()
86
+ proxy = f"http://{username}:{password}@proxy.internal:8080"
87
+
88
+ with foghttp.Client(proxy=proxy) as client:
89
+ response = client.get("http://api.internal/items")
90
+ ```
91
+
92
+ FogHTTP keeps the canonical proxy endpoint without userinfo and manages
93
+ `Proxy-Authorization` as a transport-owned credential. For plain HTTP proxying
94
+ it is sent as an absolute-form request header; for HTTPS it is sent only on the
95
+ `CONNECT` request to the proxy and never on the tunnelled request to the target
96
+ origin. In both cases the header is not part of `Request.headers`, response
97
+ history, or user-facing request metadata.
98
+
99
+ Manual `Proxy-Authorization` headers are rejected by the safe public API.
100
+
101
+ Proxy credentials are redacted in debug-facing representations and should not
102
+ be logged directly.
103
+
104
+ ## trust_env
105
+
106
+ `trust_env=False` remains the default.
107
+
108
+ With `trust_env=True`, FogHTTP snapshots supported environment variables when
109
+ the client is created:
110
+
111
+ | Variable | Current behavior |
112
+ |---|---|
113
+ | `HTTP_PROXY` / `http_proxy` | Routes plain HTTP target URLs through the selected HTTP proxy endpoint. Uppercase `HTTP_PROXY` is ignored when `REQUEST_METHOD` is set to avoid HTTPoxy-style CGI leakage. |
114
+ | `HTTPS_PROXY` / `https_proxy` | Tunnels `https://` target URLs through the selected HTTP proxy endpoint via `CONNECT`. |
115
+ | `ALL_PROXY` / `all_proxy` | Fallback proxy when no scheme-specific proxy is set. Routes plain HTTP targets and tunnels `https://` targets via `CONNECT`. |
116
+ | `NO_PROXY` / `no_proxy` | Bypass rules for environment-derived proxy decisions. Explicit `proxy=` wins over `NO_PROXY`. |
117
+ | `SSL_CERT_FILE` / `ssl_cert_file` | Converted to `TLSConfig(ca_certificates=(...))` if `tls=` is not passed explicitly. |
118
+ | `SSL_CERT_DIR` | Ignored. Directory trust-store loading is not implemented. |
119
+
120
+ Lowercase proxy variables win over uppercase variants for the same setting.
121
+ Scheme-specific proxy variables win over `ALL_PROXY`.
122
+
123
+ HTTP and HTTPS proxies are routed independently: plain-HTTP targets use the
124
+ HTTP-scheme proxy (`HTTP_PROXY`/`ALL_PROXY`) in absolute-form, and HTTPS targets
125
+ use the HTTPS-scheme proxy (`HTTPS_PROXY`/`ALL_PROXY`) via `CONNECT`. They may
126
+ point at the same or at different HTTP proxy endpoints. The proxy endpoint URL
127
+ itself must still use `http://`.
128
+
129
+ Environment variables are not read on every request.
130
+
131
+ ## Redirects With Proxy Policy
132
+
133
+ Explicit `proxy=` is a stable client-level policy. HTTP redirects from one
134
+ `http://` origin to another `http://` origin continue through the same proxy,
135
+ and a redirect from a proxied `http://` request to an `https://` target upgrades
136
+ to a `CONNECT` tunnel through the same proxy.
137
+
138
+ Environment-derived proxy routing can change on each URL because `NO_PROXY`,
139
+ scheme-specific proxy variables and `ALL_PROXY` are evaluated against the
140
+ target origin. Rust follows redirects internally, and this foundation release
141
+ does not yet recompute trusted-environment proxy decisions per redirect hop.
142
+ For that reason, same-origin redirects can continue, but cross-origin redirects
143
+ under environment proxy policy fail closed instead of reusing the initial proxy
144
+ decision. This includes `http://` to `http://` cross-origin redirects that
145
+ would likely use the same configured proxy; per-hop environment proxy
146
+ recomputation is planned separately.
147
+
148
+ ## NO_PROXY Rules
149
+
150
+ FogHTTP supports a focused `NO_PROXY` subset:
151
+
152
+ - wildcard `*`
153
+ - exact hosts
154
+ - domain suffixes such as `example.com`, `.example.com`, or `*.example.com`
155
+ matching both the apex host and subdomains, but not lookalikes such as
156
+ `badexample.com`
157
+ - optional ports such as `example.com:8443`; ports must be in the `1..65535`
158
+ range
159
+ - `localhost`
160
+ - IPv4 addresses
161
+ - bracketed IPv6 addresses such as `[::1]` and `[::1]:8080`
162
+ - comma-separated values with surrounding whitespace
163
+
164
+ CIDR rules such as `10.0.0.0/8` are not supported yet and are rejected instead
165
+ of being silently treated as hostname rules.
166
+
167
+ Bracketed `NO_PROXY` hosts are IPv6-only. Bracketed DNS names, `localhost`
168
+ and IPv4 addresses are rejected instead of being reinterpreted as normal host
169
+ rules.
170
+
171
+ Domain rules use strict label boundaries:
172
+
173
+ | Rule | Matches apex | Matches subdomains | Does not match |
174
+ |---|---:|---:|---|
175
+ | `example.com` | yes | yes | `badexample.com` |
176
+ | `.example.com` | yes | yes | `badexample.com` |
177
+ | `*.example.com` | yes | yes | `badexample.com` |
178
+
179
+ Invalid ports and malformed bracketed IPv6 rules are rejected when the client
180
+ configuration is created. FogHTTP rejects the whole environment configuration
181
+ instead of silently ignoring malformed `NO_PROXY` tokens. Empty comma-separated
182
+ tokens are ignored.
183
+
184
+ ## TLS Environment Boundary
185
+
186
+ Explicit `tls=` always wins over `SSL_CERT_FILE`.
187
+
188
+ `SSL_CERT_FILE` is snapshotted when the client config is created. The
189
+ certificate file itself is read and validated later, when the Rust transport is
190
+ created.
191
+
192
+ FogHTTP intentionally does not expose a `verify=False` compatibility mode and
193
+ does not honor environment variables that disable certificate verification.
194
+ Use explicit `TLSConfig` for custom CA bundles and custom-only trust.
195
+
196
+ ## Not Implemented Yet
197
+
198
+ - SOCKS5/SOCKS5h
199
+ - TLS-to-proxy endpoints (`https://proxy.example:443`)
200
+ - PAC/WPAD or platform/browser proxy discovery
201
+ - per-route proxy policies
202
+ - proxy retry policy
@@ -529,8 +529,9 @@ with foghttp.Client() as client:
529
529
  FogHTTP treats authority, framing, and hop-by-hop request headers as
530
530
  transport-managed. The safe API rejects manual `Host`, `Content-Length`,
531
531
  `Transfer-Encoding`, `TE`, `Trailer`, `Connection`, `Upgrade`, `Keep-Alive`,
532
- and `Proxy-Connection` headers. Use semantic headers such as `Accept`,
533
- `Authorization`, `Content-Type`, and application-specific `X-*` headers.
532
+ `Proxy-Connection`, and `Proxy-Authorization` headers. Use semantic headers
533
+ such as `Accept`, `Authorization`, `Content-Type`, and application-specific
534
+ `X-*` headers.
534
535
 
535
536
  Debug-facing representations and `HTTPStatusError` messages redact sensitive
536
537
  header values, URL credentials, common token query or fragment parameters, and
@@ -147,6 +147,25 @@ following the downgrade.
147
147
  Future streaming bodies will use an explicit replayability model because
148
148
  non-replayable streams must not be resent automatically.
149
149
 
150
+ ## Proxy Policy
151
+
152
+ Redirects interact with proxy routing because a redirect target can change the
153
+ proxy decision.
154
+
155
+ With explicit `proxy=`, FogHTTP treats the proxy as a stable client-level
156
+ policy. HTTP redirects to another `http://` origin continue through the same
157
+ proxy. Redirects to `https://` upgrade to a `CONNECT` tunnel through the same
158
+ proxy.
159
+
160
+ With `trust_env=True`, proxy decisions depend on the target URL, `NO_PROXY`,
161
+ scheme-specific proxy variables, and `ALL_PROXY`. This foundation release does
162
+ not yet recompute trusted-environment proxy decisions for each redirect hop
163
+ inside Rust. Same-origin redirects can continue, but cross-origin redirects
164
+ under environment proxy policy fail closed instead of reusing the initial
165
+ proxy/direct decision. This strict rule also applies when both HTTP origins
166
+ would likely use the same configured proxy; per-hop environment proxy
167
+ recomputation is planned separately.
168
+
150
169
  ## Redirect Limit
151
170
 
152
171
  `max_redirects` defaults to `20`. If the limit is exceeded, FogHTTP raises
@@ -25,7 +25,7 @@ the current FogHTTP API. The same flow is available as a runnable example in
25
25
  | `files` | Reserved | Planned for multipart uploads. Not accepted yet. |
26
26
  | `auth` | Planned | Use explicit `Authorization` headers for simple static tokens. |
27
27
  | cookies/session jar | Planned | `cookies=True` is rejected today. |
28
- | proxy / `trust_env` | Planned | `trust_env=True` is rejected today. |
28
+ | proxy / `trust_env` | Supported | HTTP proxy routing and HTTPS `CONNECT` tunnelling through client-level `proxy=` or `trust_env=True` when the proxy endpoint uses `http://`. |
29
29
  | `timeout` | Partly supported | Per-request `pool`, `read`, and `total` timeouts are supported. Per-request `connect` does not reconfigure the connector. `write` is reserved. |
30
30
  | `follow_redirects` | Supported | Client-level setting. GET/HEAD/POST redirects use conservative security rules. |
31
31
  | prepared request | Supported | Use `build_request()` and `send()`. Building a request does not create transport state. |
@@ -192,7 +192,6 @@ Current intentional gaps:
192
192
  - no `files=` multipart uploads yet
193
193
  - no cookie jar
194
194
  - no `auth=` helper
195
- - no proxy or `trust_env` behavior
196
195
  - no streaming request body API yet
197
196
  - no streaming decompression helpers yet
198
197
  - no disabling TLS verification
@@ -82,9 +82,14 @@ only an internal or regulated CA bundle.
82
82
 
83
83
  ## Native Roots And Environment
84
84
 
85
- FogHTTP does not load operating-system trust stores today. It also does not read
86
- TLS settings from `trust_env`. The active trust boundary is always the explicit
87
- `TLSConfig` plus bundled WebPKI roots when `trust_webpki_roots=True`.
85
+ FogHTTP does not load operating-system trust stores today. With
86
+ `trust_env=True`, `SSL_CERT_FILE` is mapped to
87
+ `TLSConfig(ca_certificates=(...))` only when no explicit `tls=` is passed.
88
+ The environment path is snapshotted at client config creation; the certificate
89
+ file is read and validated later, when the Rust transport is created.
90
+ `SSL_CERT_DIR` and environment-driven TLS verification disabling are not used.
91
+ The active trust boundary is always explicit `TLSConfig`, env-derived
92
+ `SSL_CERT_FILE`, and bundled WebPKI roots when `trust_webpki_roots=True`.
88
93
 
89
94
  ## Unsupported Unsafe Modes
90
95
 
@@ -97,6 +102,8 @@ internal trust replacement until a dedicated pinning API exists.
97
102
  - Custom certificates must be PEM files containing CA certificates.
98
103
  - Certificate files are read when the Rust transport is created.
99
104
  - The same `TLSConfig` works with `Client` and `AsyncClient`.
100
- - Operating-system trust stores and `trust_env` proxy/TLS behavior are not used
101
- today.
105
+ - Operating-system trust stores are not used today.
106
+ - `trust_env=True` supports `SSL_CERT_FILE`, plain HTTP proxy routing, and HTTPS
107
+ proxy tunnelling via `CONNECT` through `http://` proxy endpoints with
108
+ target-host certificate validation.
102
109
  - Disabling certificate verification is intentionally not supported.
@@ -284,7 +284,7 @@ except foghttp.HTTPStatusError as exc:
284
284
  | Streaming uploads | Not implemented |
285
285
  | Multipart files | Not implemented |
286
286
  | Cookies/session jar | Not implemented |
287
- | Proxy and `trust_env` | Not implemented |
287
+ | Proxy routing | HTTP proxy routing and HTTPS `CONNECT` tunnelling through `http://` proxy endpoints are available; SOCKS, PAC, TLS-to-proxy endpoints and platform proxy discovery are not implemented |
288
288
  | HTTP/2 | Not implemented |
289
289
  | Cookie jar and auth helper integration | Not implemented; cross-origin redirects still strip sensitive headers and drop body replay |
290
290
  | Unbounded buffered large downloads | `max_response_body_size` defaults to 10 MiB and `max_buffered_response_bytes` defaults to 100 MiB for buffered fail-fast protection; use `stream()` for incremental byte downloads |
@@ -18,6 +18,7 @@ uv run examples/async_resource_limits.py
18
18
  uv run examples/async_lifecycle_debug.py
19
19
  uv run examples/async_streaming.py
20
20
  uv run examples/compressed_response.py
21
+ uv run examples/http_proxy.py
21
22
  uv run examples/redirects.py
22
23
  uv run examples/prepared_requests.py
23
24
  uv run examples/request_builder_compatibility.py
@@ -40,6 +41,10 @@ uv run examples/telemetry_hooks.py
40
41
  streaming with explicit context-managed cleanup.
41
42
  - [compressed_response.py](./compressed_response.py): manual
42
43
  `Accept-Encoding` negotiation with transparent buffered response decoding.
44
+ - [http_proxy.py](./http_proxy.py): direct request by default, or HTTP proxy
45
+ routing / HTTPS `CONNECT` tunnelling with
46
+ `FOGHTTP_HTTP_PROXY=http://proxy:port`; set `FOGHTTP_PROXY_TARGET_URL` to
47
+ choose the target URL.
43
48
  - [redirects.py](./redirects.py): GET and POST redirects, final URL, and
44
49
  history.
45
50
  - [prepared_requests.py](./prepared_requests.py): build, inspect, adjust, and
@@ -53,6 +58,7 @@ uv run examples/telemetry_hooks.py
53
58
  ## Limitations To Keep In Mind
54
59
 
55
60
  FogHTTP supports sync and async response streaming for bytes, text, and lines,
56
- but uploads are still buffered. Do not use these examples as templates for large
57
- uploads, multipart forms, cookie sessions, proxy-heavy clients, or streaming
58
- decompression yet.
61
+ plus plain HTTP proxy routing and HTTPS proxy `CONNECT` through `http://` proxy
62
+ endpoints. Uploads are still buffered. Do not use these examples as templates
63
+ for large uploads, multipart forms, cookie sessions, SOCKS/PAC proxy clients,
64
+ TLS-to-proxy endpoints, or streaming decompression yet.
@@ -0,0 +1,34 @@
1
+ # /// script
2
+ # requires-python = ">=3.11"
3
+ # dependencies = [
4
+ # "foghttp",
5
+ # ]
6
+ #
7
+ # [tool.uv.sources]
8
+ # foghttp = { path = "../", editable = true }
9
+ # ///
10
+
11
+ from os import environ
12
+
13
+ import foghttp
14
+
15
+
16
+ DEFAULT_TARGET_URL = "https://httpbin.org/get"
17
+
18
+
19
+ def main() -> None:
20
+ proxy = environ.get("FOGHTTP_HTTP_PROXY") or None
21
+ target_url = environ.get("FOGHTTP_PROXY_TARGET_URL", DEFAULT_TARGET_URL)
22
+
23
+ with foghttp.Client(proxy=proxy) as client:
24
+ response = client.get(target_url)
25
+ response.raise_for_status()
26
+
27
+ print("proxy:", proxy or "direct")
28
+ print("target:", target_url)
29
+ print("status:", response.status_code)
30
+ print("request:", response.request.method, response.request.url)
31
+
32
+
33
+ if __name__ == "__main__":
34
+ main()