mirror of
https://github.com/TrustTunnel/TrustTunnel.git
synced 2026-04-26 20:36:02 +00:00
Pull request 176: Fix busy loop in http1_codec
Squashed commit of the following:
commit 467d684adb
Author: Zhavoronkov Aleksei <a.zhavoronkov@adguard.com>
Date: Thu Mar 5 10:55:16 2026 +0300
Fix busy loop in http1_codec
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
# CHANGELOG
|
||||
|
||||
- [Fix] HTTP/1.1 codec busy loop when receiving partial request headers.
|
||||
|
||||
## 1.0.13
|
||||
|
||||
- [Fix] Change deep-link format from `tt://` to `tt://?`. For backward compatibility, `tt://` is still supported.
|
||||
|
||||
@@ -188,6 +188,11 @@ where
|
||||
let _ = self.upload_tx.reserve().await;
|
||||
}
|
||||
self.transport_stream.read_buf(&mut buffer).await?;
|
||||
} else if matches!(self.state, State::WaitingRequest(_)) {
|
||||
let bytes_read = self.transport_stream.read_buf(&mut buffer).await?;
|
||||
if bytes_read == 0 {
|
||||
buffer.clear();
|
||||
}
|
||||
}
|
||||
Ok(buffer)
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user