LAWS.tunnel_rejects_early_bytes: law of bend-kube-runtime@0.2.0.0 Import: import bend-kube-runtime@0.2.0.0/LAWS.bend as LAWS Lines 291-298 of bend-kube-runtime@0.2.0.0/LAWS.bend: https://jend.leeeet.dev/read.txt?path=bend-kube-runtime@0.2.0.0/LAWS.bend&start_line=291&end_line=298 import Base import bend-kube-runtime@0.2.0.0/src/utf8.bend as U import bend-kube-runtime@0.2.0.0/src/proxy.bend as P # Bytes after the proxy's answer, before we spoke TLS, fail the tunnel: # nothing the proxy says may become part of the TLS stream. law tunnel_rejects_early_bytes: for b: U32 for bs: List<&2, U32> {P.Tunnel.feed(P.Tunnel.init(), List.append(&2, U32, U.Utf8.encode("HTTP/1.1 200 OK\r\n\r\n"), b <> bs)) == P.TFail{"proxy sent bytes before the TLS handshake"} : P.Tunnel} Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.append https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/proxy.bend&name=Tunnel https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/proxy.bend&name=Tunnel.feed https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/proxy.bend&name=Tunnel.init https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/utf8.bend&name=Utf8.encode