You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the generated code for String responses (Pod::read_namespaced_pod_log, etc) returns Ok(&buf[..valid_up_to]) in case of truncated utf-8, but Err in the case of invalid utf-8 anywhere in the buffer.
However, it's useful to return Ok(&buf[..valid_up_to]) even in the case of invalid utf-8, and only return the Err if valid_up_to is 0. This way the caller gets as much of the parsed response as possible, rather than a variable amount depending on how they happened to chunk their response buffer.
The text was updated successfully, but these errors were encountered:
Currently the generated code for
String
responses (Pod::read_namespaced_pod_log
, etc) returnsOk(&buf[..valid_up_to])
in case of truncated utf-8, butErr
in the case of invalid utf-8 anywhere in the buffer.However, it's useful to return
Ok(&buf[..valid_up_to])
even in the case of invalid utf-8, and only return theErr
ifvalid_up_to
is 0. This way the caller gets as much of the parsed response as possible, rather than a variable amount depending on how they happened to chunk their response buffer.The text was updated successfully, but these errors were encountered: