OCaml HTML5 parser/serialiser based on Python's JustHTML
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Suppress TLS tracing in connection pool after first TLS handshake

The previous fix only suppressed TLS tracing in one.ml (one-shot
requests), but session-based requests go through conpool which makes
TLS connections separately. Add the same suppression mechanism to
conpool to ensure TLS debug hexdumps are suppressed for pooled
connections as well.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

+18
+18
ocaml-conpool/lib/conpool.ml
··· 15 15 module Stats = Stats 16 16 module Cmd = Cmd 17 17 18 + (* Track whether TLS tracing has been suppressed *) 19 + let tls_tracing_suppressed = ref false 20 + 21 + (* Suppress TLS tracing debug output (hexdumps) unless explicitly enabled *) 22 + let suppress_tls_tracing () = 23 + if not !tls_tracing_suppressed then begin 24 + tls_tracing_suppressed := true; 25 + match List.find_opt (fun s -> Logs.Src.name s = "tls.tracing") (Logs.Src.list ()) with 26 + | Some tls_src -> 27 + (* Only suppress if currently at Debug level *) 28 + (match Logs.Src.level tls_src with 29 + | Some Logs.Debug -> Logs.Src.set_level tls_src (Some Logs.Warning) 30 + | _ -> ()) 31 + | None -> () 32 + end 33 + 18 34 (** {1 Error Types} *) 19 35 20 36 type error = ··· 178 194 Domain_name.(host_exn (of_string_exn (Endpoint.host endpoint))) 179 195 in 180 196 let tls = Tls_eio.client_of_flow ~host tls_config socket in 197 + (* Suppress TLS tracing after first connection creates the source *) 198 + suppress_tls_tracing (); 181 199 Log.info (fun m -> 182 200 m "TLS connection established to %a" Endpoint.pp endpoint); 183 201 ((tls :> connection), Some tls)