qlog
qlog copied to clipboard
Logging non-UTF-8 reasons
Similarly to the ALPN string issue, we define the CONNECTION_CLOSE
reason string here as text: https://github.com/quicwg/qlog/blob/57b679678b44d80234a0e10a08e53fe5ef9e7532/draft-ietf-quic-qlog-quic-events.md?plain=1#L313
The problem here is that RFC 9000 only says the reason string SHOULD be UTF-8. It could be arbitrary, or binary data, even if that is a bad idea.
It should be possible to log a reason string which an implementation sees which does not appear to be valid UTF-8.
This is related to this implementation issue: https://github.com/openssl/openssl/pull/23807
Agree, I just had to implement this and cast to the bytes to a lossy utf8. Let's make it possible in the spec to capture raw bytes .