Skip to content

Commit

Permalink
Merge branch 'fuzz'
Browse files Browse the repository at this point in the history
  • Loading branch information
Byron committed Oct 15, 2023
2 parents 47a1241 + 7226391 commit c5a7e66
Show file tree
Hide file tree
Showing 10 changed files with 203 additions and 36 deletions.
174 changes: 159 additions & 15 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ default = ["max"]
## Everything, all at once.
##
## As fast as possible, tracing, with TUI progress, progress line rendering with auto-configuration, all transports based on their most mature implementation (HTTP), all `ein` tools, CLI colors and local-time support, JSON output, regex support for rev-specs.
## Can be amended with the `http-client-curl-rustls` feature to avoid `openssl` as backend.
max = ["max-control", "fast", "gitoxide-core-blocking-client", "http-client-curl"]

## Like `max`, but only Rust is allowed.
Expand Down Expand Up @@ -150,6 +151,8 @@ gitoxide-core-tools-archive = ["gitoxide-core/archive"]
gitoxide-core-blocking-client = ["gitoxide-core/blocking-client"]
## Support synchronous 'http' and 'https' transports (e.g. for clone, fetch and push) using **curl**.
http-client-curl = ["gix/blocking-http-transport-curl"]
## Implies `http-client-curl` and configures `curl` to use the `rust-tls` backend.
http-client-curl-rustls = ["gix/blocking-http-transport-curl-rustls"]
## Support synchronous 'http' and 'https' transports (e.g. for clone, fetch and push) using **reqwest**.
http-client-reqwest = ["gix/blocking-http-transport-reqwest-rust-tls"]

Expand Down
2 changes: 2 additions & 0 deletions gix-transport/src/client/async_io/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ impl<'a> RequestWriter<'a> {
///
/// Doing so will also write the message type this instance was initialized with.
pub async fn into_read(mut self) -> std::io::Result<Box<dyn ExtendedBufRead + Unpin + 'a>> {
use futures_lite::AsyncWriteExt;
self.write_message(self.on_into_read).await?;
self.writer.inner_mut().flush().await?;
Ok(self.reader)
}

Expand Down
2 changes: 2 additions & 0 deletions gix-transport/src/client/blocking_io/request.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use std::io;
use std::io::Write;

use crate::client::{ExtendedBufRead, MessageKind, WriteMode};

Expand Down Expand Up @@ -60,6 +61,7 @@ impl<'a> RequestWriter<'a> {
/// Doing so will also write the message type this instance was initialized with.
pub fn into_read(mut self) -> std::io::Result<Box<dyn ExtendedBufRead + Unpin + 'a>> {
self.write_message(self.on_into_read)?;
self.writer.inner_mut().flush()?;
Ok(self.reader)
}

Expand Down
Binary file added gix-url/tests/fixtures/fuzzed/very-long6.url
Binary file not shown.
Loading

0 comments on commit c5a7e66

Please sign in to comment.