Pewarta Proxy

📋 Server Request & Proxy Logs

Loading active proxy settings...
Developed by Khairul Adha (adhexa.id)
Mengambil log server...

⚙️ Pengaturan Proxy Target

Skip to content
Prev Previous commit
Next Next commit
Remove special handling of rustls "buffer full" errors
First of all, existing code does not really work and this leads to an
infinite loop: #7891

Second, this should never happen when rustls used properly (wrt
wants_read() and wants_write()) and thus all such errors are
implementation bugs that must be properly fixed.
  • Loading branch information
im-0 committed May 21, 2026
commit bc2dbf98f69e0168debc052a64dfb9a91251edd4
16 changes: 6 additions & 10 deletions crates/stdlib/src/ssl/compat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1740,11 +1740,6 @@ pub(super) fn ssl_read(
// Successfully read and processed TLS data
// Continue loop to try reading plaintext
}
Err(SslError::Io(ref io_err)) if io_err.to_string().contains("message buffer full") => {
// This case should be rare now that ssl_read_tls_records handles buffer full
// Just continue loop to try again
continue;
}
Err(e) => {
// Other errors - check for buffered plaintext before propagating
match try_read_plaintext(conn, buf)? {
Expand Down Expand Up @@ -2020,21 +2015,22 @@ fn ssl_read_tls_records(
}
Ok(n) => {
offset += n;
if offset < bytes_data.len() {
conn.process_new_packets().map_err(SslError::from_rustls)?;
}
}
Err(e) => {
return Err(SslError::Io(e));
}
}
} else {
offset += read_bytes;
if offset < bytes_data.len() {
conn.process_new_packets().map_err(SslError::from_rustls)?;
}
}
}
Err(e) => {
// Check if it's a buffer full error (unlikely but handle it)
if e.to_string().contains("buffer full") {
conn.process_new_packets().map_err(SslError::from_rustls)?;
continue;
}
// Real error - propagate it
return Err(SslError::Io(e));
}
Expand Down