quicwg / qlog

The IETF I-D documents for the qlog format
Other
77 stars 12 forks source link

Logging non-UTF-8 reasons #411

Closed hlandau closed 3 weeks ago

hlandau commented 3 months ago

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.

hlandau commented 3 months ago

This is related to this implementation issue: https://github.com/openssl/openssl/pull/23807

LPardue commented 3 months ago

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 .