commit_hash
stringlengths
40
40
author
stringlengths
1
57
date
timestamp[s]date
2010-07-26 04:45:09
2026-04-14 18:21:10
message
stringlengths
8
1.39M
diff
stringlengths
68
51.2k
files_changed
int64
1
136
insertions
int64
0
2.35k
deletions
int64
0
1.9k
cb1ea341c3c0995fe709405865d1722cefbb1439
Nikolay Kim
2018-08-29T03:32:01
make new public
diff --git a/src/service/fn_service.rs b/src/service/fn_service.rs index 28a7df8..6eee6c9 100644 --- a/src/service/fn_service.rs +++ b/src/service/fn_service.rs @@ -85,7 +85,7 @@ where F: Fn(Req) -> Fut + Clone, Fut: IntoFuture<Item = Resp, Error = Err>, { - fn new(f: F) -> Self { + pub fn new(f: F) ->...
1
1
1
f689f6500aa4f87cd73c66a0dddc08704ba76e92
Nikolay Kim
2018-08-29T03:29:56
export more service types
diff --git a/src/service/mod.rs b/src/service/mod.rs index c86d5a3..7cfca59 100644 --- a/src/service/mod.rs +++ b/src/service/mod.rs @@ -9,8 +9,8 @@ mod map_err; mod map_init_err; pub use self::and_then::{AndThen, AndThenNewService}; -pub use self::fn_service::FnService; -pub use self::fn_state_service::FnStateServ...
1
2
2
10d2c675966b9ec05ffa73ee5238706286d7ac5c
Nikolay Kim
2018-08-28T23:24:36
better Connector impl
diff --git a/examples/basic.rs b/examples/basic.rs index e7c92c0..4e2039c 100644 --- a/examples/basic.rs +++ b/examples/basic.rs @@ -64,14 +64,16 @@ fn main() { // bind socket address and start workers. By default server uses number of // available logical cpu as threads count. actix net start separate /...
4
98
59
6ec5e958acfa5ad1c338933b6df6d2df618df40f
Nikolay Kim
2018-08-28T17:39:27
add .map service combinator
diff --git a/src/service/map.rs b/src/service/map.rs new file mode 100644 index 0000000..865b2e2 --- /dev/null +++ b/src/service/map.rs @@ -0,0 +1,171 @@ +use std::marker; + +use futures::{Async, Future, Poll}; +use tower_service::{NewService, Service}; + +/// `Map` service combinator +pub struct Map<A, F, R> { + a:...
3
182
1
71d725d2501f61ccc5496753bf0a05efb0ae79fe
Nikolay Kim
2018-08-28T04:53:20
add Connector helper method
diff --git a/src/connector.rs b/src/connector.rs index 786e476..4ea2871 100644 --- a/src/connector.rs +++ b/src/connector.rs @@ -2,7 +2,7 @@ use std::collections::VecDeque; use std::io; use std::net::SocketAddr; -use futures::{Async, Future, Poll, future::ok}; +use futures::{future::ok, Async, Future, Poll}; use t...
2
7
7
f9b9031af2a5ff9245867e872ce0be3b5925ca6e
Nikolay Kim
2018-08-28T03:32:49
add clone impls
diff --git a/src/connector.rs b/src/connector.rs index 5752228..786e476 100644 --- a/src/connector.rs +++ b/src/connector.rs @@ -2,7 +2,7 @@ use std::collections::VecDeque; use std::io; use std::net::SocketAddr; -use futures::{Async, Future, Poll}; +use futures::{Async, Future, Poll, future::ok}; use tokio; use t...
2
28
1
ddfe1322a1a7854e8cd3088c732d99c421f3a393
Nikolay Kim
2018-08-27T21:29:01
use same Request for OpensslConnector service as for connector
diff --git a/src/ssl/openssl.rs b/src/ssl/openssl.rs index e1de2db..319740d 100644 --- a/src/ssl/openssl.rs +++ b/src/ssl/openssl.rs @@ -1,7 +1,7 @@ use std::io; use std::marker::PhantomData; -use futures::{future, future::FutureResult, Async, Poll}; +use futures::{future, future::FutureResult, Async, Poll, Future}...
1
28
5
c69d675113ae6b08bc679305389b94aa24943cdb
Nikolay Kim
2018-08-27T21:20:41
Connector::Response returns addr and tcp stream
diff --git a/examples/ssl.rs b/examples/ssl.rs index f95ff83..04ebe22 100644 --- a/examples/ssl.rs +++ b/examples/ssl.rs @@ -43,7 +43,7 @@ fn main() { .unwrap(); let num = Arc::new(AtomicUsize::new(0)); - let openssl = ssl::OpensslService::new(builder); + let openssl = ssl::OpensslAcceptor::new(bu...
4
27
25
3dbaef3ec1437c5ffa4f13b241841251c587f0f1
Nikolay Kim
2018-08-25T21:46:05
move config to generic type
diff --git a/src/configurable.rs b/src/configurable.rs index 8bce29b..df6dec1 100644 --- a/src/configurable.rs +++ b/src/configurable.rs @@ -12,7 +12,7 @@ use service::{AndThen, FnService, MapErr}; /// accepts new TCP streams, obtains a new `Service` value using the /// `NewConfigurableService` trait, and uses that n...
1
89
76
89b8da724b9347dd4846bd58bb5b6d1825400df5
Nikolay Kim
2018-08-25T16:02:14
split service mod
diff --git a/src/configurable.rs b/src/configurable.rs index 6be5c24..8bce29b 100644 --- a/src/configurable.rs +++ b/src/configurable.rs @@ -110,19 +110,18 @@ where Fut: IntoFuture<Item = S, Error = Err>, { fn new(f: F) -> Self { - Fn2NewConfigurableService{ + Fn2NewConfigurableService { ...
11
918
848
0eae4d84b1879896678a786e1b1f1835aaafe992
Nikolay Kim
2018-08-24T20:18:05
fix and and then new service
diff --git a/src/configurable.rs b/src/configurable.rs index 0a6e5f6..6be5c24 100644 --- a/src/configurable.rs +++ b/src/configurable.rs @@ -90,6 +90,79 @@ where } } +pub struct Fn2NewConfigurableService<F, S, Err, Fut, Cfg> +where + S: Service, + F: Fn(Cfg) -> Fut, + Fut: IntoFuture<Item = S, Error = ...
3
82
5
f2ef824011158e6b807c94d652a11c694568f11e
Nikolay Kim
2018-08-24T05:12:10
add NewConfigurableService trait
diff --git a/src/configurable.rs b/src/configurable.rs new file mode 100644 index 0000000..0a6e5f6 --- /dev/null +++ b/src/configurable.rs @@ -0,0 +1,459 @@ +use std::marker; + +use futures::{future, future::FutureResult, Async, Future, IntoFuture, Poll}; +use tower_service::Service; + +use service::{AndThen, FnService...
3
466
5
aba9b09450e66b0f491bdf9a3803c4aca2dcce21
Nikolay Kim
2018-08-24T03:52:31
export ConnectorError
diff --git a/src/lib.rs b/src/lib.rs index 8ae11af..4b19d34 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -59,7 +59,7 @@ pub mod ssl; mod worker; mod connector; -pub use connector::Connector; +pub use connector::{Connector, ConnectorError}; pub use server::Server; pub use service::{IntoNewService, IntoService, NewS...
1
1
1
234c76f8bce2a61c11cdcd4088a511046e801e6e
Nikolay Kim
2018-08-24T03:47:41
add connector
diff --git a/Cargo.toml b/Cargo.toml index fc62d9d..d5b06ff 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -49,12 +49,13 @@ net2 = "0.2" bytes = "0.4" futures = "0.1" slab = "0.4" +tokio = "0.1" tokio-io = "0.1" tokio-tcp = "0.1" tokio-timer = "0.2" tokio-reactor = "0.1" - tower-service = "0.1" +trust-dns-resolver...
3
222
1
a5a026b5c4c69ab212d6a79557038c1b3a624dc4
Nikolay Kim
2018-08-23T22:42:34
remove custom NewService and cleanups
diff --git a/examples/basic.rs b/examples/basic.rs index 5dd95b4..e7c92c0 100644 --- a/examples/basic.rs +++ b/examples/basic.rs @@ -20,7 +20,7 @@ use openssl::ssl::{SslAcceptor, SslFiletype, SslMethod}; use tokio_io::{AsyncRead, AsyncWrite}; use tokio_openssl::SslAcceptorExt; -use actix_net::{IntoNewService, NewSe...
9
93
293
1261ecbce035e810baa1e5c7363d142038197fe7
Nikolay Kim
2018-08-23T20:39:13
fix examples
diff --git a/examples/basic.rs b/examples/basic.rs index 001dcf2..5dd95b4 100644 --- a/examples/basic.rs +++ b/examples/basic.rs @@ -61,32 +61,35 @@ fn main() { let num = Arc::new(AtomicUsize::new(0)); - // configure service pipeline - let srv = - // service for converting incoming TcpStream to a ...
3
37
30
d97f78afbe225e071356ceda30f6a8ee08bdc58b
Nikolay Kim
2018-08-23T20:16:14
use factory function instead of NewService for service registration
diff --git a/src/server.rs b/src/server.rs index 6f129ac..efdd554 100644 --- a/src/server.rs +++ b/src/server.rs @@ -19,7 +19,7 @@ use actix::{ use super::accept::{AcceptLoop, AcceptNotify, Command}; use super::server_config::{Config, ServerConfig}; use super::server_service::{ServerNewService, ServerServiceFactory}...
2
18
30
2818540d699d52b88ec42d6f93ae6d4aba19d3d7
Nikolay Kim
2018-08-23T01:18:11
fix error mapping in MapErrNewService
diff --git a/src/service.rs b/src/service.rs index 0cf5ca4..18ec9cf 100644 --- a/src/service.rs +++ b/src/service.rs @@ -390,7 +390,8 @@ pub struct AndThen<A, B> { impl<A, B> AndThen<A, B> where A: Service, - B: Service<Request = A::Response, Error = A::Error>, + A::Error: Into<B::Error>, + B: Service<R...
1
30
20
c7543e722867ecbb6e4007a801bd7e5e2858a5ed
Nikolay Kim
2018-08-22T18:36:56
add Server::configure helper
diff --git a/src/server.rs b/src/server.rs index c3ba427..6f129ac 100644 --- a/src/server.rs +++ b/src/server.rs @@ -135,6 +135,38 @@ impl<C: Config> Server<C> { self } + /// Run external configuration as part of the server building + /// process + /// + /// This function is useful for movin...
1
32
0
26f472649af023ffe59f5f60af0cb4a8bec2b8c9
Nikolay Kim
2018-08-22T18:12:06
default impl for fork method
diff --git a/src/server_config.rs b/src/server_config.rs index 199f712..0d333c0 100644 --- a/src/server_config.rs +++ b/src/server_config.rs @@ -2,7 +2,9 @@ use std::sync::{atomic::AtomicUsize, Arc}; pub trait Config: Send + Clone + Default + 'static { - fn fork(&self) -> Self; + fn fork(&self) -> Self { + ...
1
3
1
0f8cd0f44da8edf871328ca29a489d02a67c5a47
Nikolay Kim
2018-08-22T03:42:43
better FnNewService definition
diff --git a/examples/basic.rs b/examples/basic.rs index 0650a07..1b60cdf 100644 --- a/examples/basic.rs +++ b/examples/basic.rs @@ -68,19 +68,13 @@ fn main() { SslAcceptorExt::accept_async(&acceptor, stream) .map_err(|e| io::Error::new(io::ErrorKind::Other, e)) }) - // con...
2
13
17
b8c8dbc90a1e1cedf8fa8219e374d068f7a6af92
Nikolay Kim
2018-08-22T00:08:23
add new service configuration
diff --git a/examples/basic.rs b/examples/basic.rs index 43e2bf4..0650a07 100644 --- a/examples/basic.rs +++ b/examples/basic.rs @@ -20,8 +20,7 @@ use openssl::ssl::{SslAcceptor, SslFiletype, SslMethod}; use tokio_io::{AsyncRead, AsyncWrite}; use tokio_openssl::SslAcceptorExt; -use actix_net::service::{IntoNewServi...
9
245
105
2cbcc2116842a105bc5ac7d97f6c900b413f318a
Nikolay Kim
2018-08-21T05:21:23
fix worker shutdown
diff --git a/examples/basic.rs b/examples/basic.rs index fd21320..43e2bf4 100644 --- a/examples/basic.rs +++ b/examples/basic.rs @@ -1,4 +1,5 @@ //! simple composite service +//! build: cargo run --example basic --features "ssl" //! to test: curl https://127.0.0.1:8443/ -k extern crate actix; extern crate actix_net...
6
83
50
ac70f06c4fea7cbb567ffc63a5ebdfdc7512f1ce
Nikolay Kim
2018-08-21T04:34:47
add basic example
diff --git a/examples/basic.rs b/examples/basic.rs new file mode 100644 index 0000000..fd21320 --- /dev/null +++ b/examples/basic.rs @@ -0,0 +1,95 @@ +//! simple composite service +//! to test: curl https://127.0.0.1:8443/ -k +extern crate actix; +extern crate actix_net; +extern crate futures; +extern crate openssl; +e...
3
135
20
36ed2307ceccd2f57ada8dbb60c696cb8424eae1
Nikolay Kim
2018-08-21T03:48:42
add .map_init_err() new service combinator
diff --git a/src/service.rs b/src/service.rs index 5d26b2b..3e65a8e 100644 --- a/src/service.rs +++ b/src/service.rs @@ -20,6 +20,11 @@ pub trait NewServiceExt: NewService { where Self: Sized, F: Fn(Self::Error) -> E; + + fn map_init_err<F, E>(self, f: F) -> MapInitErr<Self, F, E> + where +...
1
98
10
8faf373a9962d1d91fac9f4114eba64a89670f49
Nikolay Kim
2018-08-21T03:41:40
add .map_err() service combinator
diff --git a/src/service.rs b/src/service.rs index f680d3c..5d26b2b 100644 --- a/src/service.rs +++ b/src/service.rs @@ -15,6 +15,11 @@ pub trait NewServiceExt: NewService { Error = Self::Error, InitError = Self::InitError, >; + + fn map_err<F, E>(self, f: F) -> MapErrNewService<Se...
1
172
0
c9f1faceca283c9149911d525dde77d00ee176a5
Jason Lingle
2020-05-27T01:46:48
Upgrade edition to 2018.
diff --git a/Cargo.toml b/Cargo.toml index f0263f4..53203a7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,6 +9,7 @@ documentation = "https://docs.rs/rusty-fork" keywords = ["testing", "process", "fork"] categories = ["development-tools::testing"] exclude = ["/gen-readme.sh", "/readme-*.md"] +edition = "2018" des...
6
16
24
27e53d3c506783adac36b23e01324f0fb286b559
Roy Ben Abraham
2020-03-17T13:52:16
Added --report-time flag
diff --git a/src/cmdline.rs b/src/cmdline.rs index b033173..ab86055 100644 --- a/src/cmdline.rs +++ b/src/cmdline.rs @@ -42,6 +42,7 @@ static KNOWN_FLAGS: &[(&str, FlagType)] = &[ ("--logfile", FlagType::Drop(true)), ("--nocapture", FlagType::Drop(true)), ("--test-threads", FlagType::Drop(true)), + ("...
1
1
0
219c39526a8fe3e610bb3e6206b917a25ae88395
jr
2019-09-02T19:27:09
Specify full paths to macros in rusty_fork_test
diff --git a/src/fork_test.rs b/src/fork_test.rs index c95e8cc..f1cb836 100644 --- a/src/fork_test.rs +++ b/src/fork_test.rs @@ -90,8 +90,8 @@ macro_rules! rusty_fork_test { supervise_fn; $crate::fork( - rusty_fork_test_name!($test_name), - rusty_fork_id!(),...
1
2
2
a47357fb695c3f1ac934e1715873bf4b328e5337
Jason Lingle
2019-04-10T04:12:28
Version 0.2.2.
diff --git a/Cargo.toml b/Cargo.toml index 7044d65..f0263f4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rusty-fork" -version = "0.2.1" +version = "0.2.2" authors = ["Jason Lingle"] license = "MIT/Apache-2.0" readme = "README.md"
1
1
1
0e643d27c6d1167f26e9013a7f6a8820292f71ce
Igor Gnatenko
2019-04-08T15:26:24
chore: Update wait-timeout to 0.2 Closes: https://github.com/AltSysrq/rusty-fork/issues/2 Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
diff --git a/Cargo.toml b/Cargo.toml index 105908c..7044d65 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,7 +22,7 @@ travis-ci = { repository = "AltSysrq/rusty-fork" } fnv = "1.0" quick-error = "1.2" tempfile = "3.0" -wait-timeout = { version = "0.1.4", optional = true } +wait-timeout = { version = "0.2", optional...
2
3
20
9a120211791f0a480f50d7d697ff970bb09dc25a
Igor Gnatenko
2018-10-06T19:00:06
Exclude unneeded files from crates.io
diff --git a/Cargo.toml b/Cargo.toml index 30c8c3c..105908c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,6 +8,7 @@ repository = "https://github.com/altsysrq/rusty-fork" documentation = "https://docs.rs/rusty-fork" keywords = ["testing", "process", "fork"] categories = ["development-tools::testing"] +exclude = ["/g...
1
1
0
f95a2b4b15ee99d1d748eca7cc50d69937bee77a
Jason Lingle
2018-02-27T14:57:41
Improve documentation.
diff --git a/src/error.rs b/src/error.rs index e630d53..021d061 100644 --- a/src/error.rs +++ b/src/error.rs @@ -17,6 +17,8 @@ quick_error! { pub enum Error { /// An unknown flag was encountered when examining the current /// process's argument list. + /// + /// The string is the fl...
4
11
2
6c24de3480234bf9824f7558b4ebc70f9132e845
Jason Lingle
2018-02-27T06:48:32
Reduce instantiations of `fork()` by `rusty_fork_test!`.
diff --git a/src/fork_test.rs b/src/fork_test.rs index e3541fb..c9c230e 100644 --- a/src/fork_test.rs +++ b/src/fork_test.rs @@ -12,7 +12,7 @@ //! Some functionality in this module is useful to other implementors and //! unlikely to change. This subset is documented and considered stable. -use std::process::Child; ...
1
20
4
39f6d2492ca83a7a99991c0222103ab06f141eb4
Jason Lingle
2018-02-27T06:39:20
Test that the env var flag definitions work.
diff --git a/src/cmdline.rs b/src/cmdline.rs index 9bb6ca6..b033173 100644 --- a/src/cmdline.rs +++ b/src/cmdline.rs @@ -237,4 +237,21 @@ mod test { e => panic!("Unexpected error: {}", e), } } + + // Subprocess so we can change the environment without affecting other + // tests + rus...
2
18
3
0c06d05fec00c8fab11806a9ff539c6d6c7fce8c
Jason Lingle
2018-02-27T06:34:38
Add library-level documentation.
diff --git a/Cargo.toml b/Cargo.toml index 9ae0d72..521461b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rusty-fork" -version = "0.0.1" +version = "0.1.0" authors = ["Jason Lingle"] license = "MIT/Apache-2.0" readme = "README.md" diff --git a/src/error.rs b/src/error.rs index e863e19....
3
112
1
f8fab7108e5d87ec8c0f2b6c280df45bffef9d8f
Jason Lingle
2018-02-27T06:06:21
Prevent instantiation of `fork_impl` in client code.
diff --git a/src/fork.rs b/src/fork.rs index b8a1400..e5cb558 100644 --- a/src/fork.rs +++ b/src/fork.rs @@ -91,6 +91,26 @@ where CHILD : FnOnce () { let fork_id = id_str(fork_id); + + // Erase the generics so we don't instantiate the actual implementation for + // every single test + let mut return...
2
20
2
e7a7e5bbcfe1c0b2addc93a5b2ddc9670c90f2c4
Jason Lingle
2018-02-27T05:11:05
Rename to rusty-fork.
diff --git a/Cargo.toml b/Cargo.toml index 7e40523..d381ec9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,11 +1,11 @@ [package] -name = "fork-test" +name = "rusty-fork" version = "0.0.1" authors = ["Jason Lingle"] license = "MIT/Apache-2.0" readme = "README.md" -repository = "https://github.com/altsysrq/fork-test...
6
33
33
b65dffb6b8bcea6457dcf96be5e28648ff822a9c
Jason Lingle
2018-02-26T04:48:14
Switch to a sound way of duplicating file handles. It now works reliably on Windows. It's unclear how capturing was working at all on FreeBSD before since the file handle should have been prematurely closed.
diff --git a/src/fork.rs b/src/fork.rs index ffb6b05..83400e9 100644 --- a/src/fork.rs +++ b/src/fork.rs @@ -159,8 +159,8 @@ where .arg(test_name) .env(OCCURS_ENV, &occurs) .stdin(process::Stdio::null()) - .stdout(stdio_of_file(&file)) - .stderr(stdio_of_file...
1
2
20
d926ead60df6c5a4ba2f9b186ba0f9342041626f
Jason Lingle
2018-02-26T04:12:23
Initial functional code. On Unix at least, still need to test Windows.
diff --git a/Cargo.toml b/Cargo.toml index 2773e8b..7e40523 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,5 +22,8 @@ travis-ci = { repository = "AltSysrq/fork-test" } default = [] [dependencies] +fnv = "1.0.6" +quick-error = "1.2.1" +tempfile = "2.2.0" [dev-dependencies] diff --git a/src/cmdline.rs b/src/cmdli...
6
667
0
4507466ab947c36fa3d1ebdd4ea84e03654cbc90
Martin Algesten
2025-11-22T19:07:58
Handle 1xx beyond 100-continue
diff --git a/src/client/await100.rs b/src/client/await100.rs index 524d296..b5cb60d 100644 --- a/src/client/await100.rs +++ b/src/client/await100.rs @@ -34,17 +34,29 @@ impl Call<Await100> { match try_parse_response::<0>(input) { Ok(v) => match v { Some((input_used, response)) => ...
5
346
17
ba8f38f569aaee6e823177e04d1bdc40f1087130
Martin Algesten
2025-11-22T09:08:12
Handle unsolicited 100-continue
diff --git a/src/client/recvresp.rs b/src/client/recvresp.rs index 9297a99..36c3395 100644 --- a/src/client/recvresp.rs +++ b/src/client/recvresp.rs @@ -36,13 +36,18 @@ impl Call<RecvResponse> { None => return Ok((0, None)), }; - if response.status() == StatusCode::CONTINUE && self.inner....
2
40
5
042109caadac44aff18b20c9af952bc16d59a47e
Martin Algesten
2025-11-22T09:12:03
Fix clippy
diff --git a/src/body.rs b/src/body.rs index 039c94d..a9c9d1e 100644 --- a/src/body.rs +++ b/src/body.rs @@ -13,19 +13,14 @@ pub(crate) struct BodyWriter { ended: bool, } -#[derive(Debug, Clone, Copy)] +#[derive(Debug, Clone, Copy, Default)] enum SenderMode { + #[default] None, Sized(u64), Ch...
2
4
14
62e56a6bde3db5f5b7ccf50224627b87ce74999d
42triangles
2025-09-29T08:49:53
Use package.exclude to remove unneeded scripts & data for deployment
diff --git a/Cargo.toml b/Cargo.toml index 57ce1d9..417a7d6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,6 +7,7 @@ description = "ureq support crate" keywords = ["http", "server", "web"] license = "MIT OR Apache-2.0" repository = "https://github.com/algesten/ureq-proto" +exclude = ["/cargo_deny.sh", "/deny.toml", ...
1
1
0
26a57f3c5946fc5531746b4fcfac7c475347c9ed
Martin Algesten
2025-09-07T08:24:50
client: initial slash if query after host
diff --git a/src/client/mod.rs b/src/client/mod.rs index ae77239..4a36e73 100644 --- a/src/client/mod.rs +++ b/src/client/mod.rs @@ -1397,4 +1397,25 @@ mod tests { panic!("Expected SendBody state") }; } + + #[test] + fn query_no_slash() { + let req = Request::get("http://foo.test...
2
27
1
46ae6da626e29af394b820cdd8cd96528dc06baf
Joe
2025-08-27T16:37:57
Fix GET with request header Content-Length: 0
diff --git a/src/body.rs b/src/body.rs index 450a4da..039c94d 100644 --- a/src/body.rs +++ b/src/body.rs @@ -64,7 +64,11 @@ impl BodyWriter { } pub fn has_body(&self) -> bool { - matches!(self.mode, SenderMode::Sized(_) | SenderMode::Chunked) + match self.mode { + SenderMode::Sized(...
3
39
2
09d7ad6189c3083d8b85bf307e2d02717e8a1f2a
Martin Algesten
2025-08-17T07:07:26
Fix warning if only feature = "client"
diff --git a/src/body.rs b/src/body.rs index 5a6da89..450a4da 100644 --- a/src/body.rs +++ b/src/body.rs @@ -54,6 +54,7 @@ impl BodyWriter { } } + #[cfg(feature = "server")] pub fn body_mode(&self) -> BodyMode { match self.mode { SenderMode::None => BodyMode::NoBody,
1
1
0
28af5ab0fe7f1c0dbfee163bd5c5c656c59b9ec7
Joe
2025-07-31T12:49:18
CONNECT: impl, Force send/recv, Host header, close-delimited, cleanups
diff --git a/src/body.rs b/src/body.rs index f995dba..5a6da89 100644 --- a/src/body.rs +++ b/src/body.rs @@ -54,6 +54,14 @@ impl BodyWriter { } } + pub fn body_mode(&self) -> BodyMode { + match self.mode { + SenderMode::None => BodyMode::NoBody, + SenderMode::Sized(n) => ...
16
346
141
c2c4b3ab291f5f33ac0900de152755268794a6cd
Joe
2025-07-31T11:00:56
Server response framing (CRLF)
diff --git a/src/server/sendres.rs b/src/server/sendres.rs index bf15285..b80fd14 100644 --- a/src/server/sendres.rs +++ b/src/server/sendres.rs @@ -101,11 +101,8 @@ fn try_write_prelude_part( let all = response.headers(); let skipped = all.skip(*index); - if header_count > 0 { - ...
1
4
9
2efcec58605acc6b2c128da6bc0e520651fc418a
Joe
2025-07-29T15:43:43
CONNECT groundwork + client tests
diff --git a/src/body.rs b/src/body.rs index bc169bd..f995dba 100644 --- a/src/body.rs +++ b/src/body.rs @@ -267,9 +267,7 @@ impl BodyReader { ) -> Result<Self, Error> { use crate::ext::MethodExt; - let is_head = method == Method::HEAD; - - if is_head { + if !method.allow_response_b...
7
197
13
27f2289be860c27f4ea7a70c8cbdc6e06baa8bd7
Joe
2025-07-29T13:29:35
stop panic upon invalid uri character
diff --git a/src/parser.rs b/src/parser.rs index 7353073..773e160 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -190,14 +190,16 @@ pub fn try_parse_request<const N: usize>( builder = builder.header(h.name, h.value); } - let request = builder.body(()).expect("a valid response"); + let request =...
1
10
2
8f966f4de98515aecf55f0a1cbaa544440a0f02a
Martin Algesten
2025-06-15T15:03:37
Call<RecvBody>::is_ended_chunked for abruptly closed chunk ends
diff --git a/src/body.rs b/src/body.rs index 05a4d76..bc169bd 100644 --- a/src/body.rs +++ b/src/body.rs @@ -460,6 +460,14 @@ impl BodyReader { } } + #[cfg(feature = "client")] + pub fn is_ended_chunked(&self) -> bool { + match self { + BodyReader::Chunked(v) => v.is_ending() || ...
3
35
0
ad70f8eb16c939d60b6d618e119756e9229442d3
Martin Algesten
2025-05-20T20:10:47
clippy fixes
diff --git a/src/body.rs b/src/body.rs index 12e753c..05a4d76 100644 --- a/src/body.rs +++ b/src/body.rs @@ -173,14 +173,10 @@ pub(crate) fn calculate_max_input(output_len: usize) -> usize { let chunks = output_len / DEFAULT_CHUNK_AND_OVERHEAD; let remaining = output_len % DEFAULT_CHUNK_AND_OVERHEAD; - l...
1
4
8
c4dbb548fe43bf79a4392f3aa01d72f8cf9a2f24
Martin Algesten
2025-04-13T12:59:49
Fix bug in setting cookie on redirect request
diff --git a/src/client/amended.rs b/src/client/amended.rs index 5869d8b..93bffa3 100644 --- a/src/client/amended.rs +++ b/src/client/amended.rs @@ -30,23 +30,17 @@ use crate::Error; /// is out of scope, but the user must be able to set it. /// 7. `User-Agent` header. /// 8. `Accept` header. -/// 9. Changing ...
3
43
42
744cce4a125831c513261c773daec61085390e03
Martin Algesten
2025-04-04T09:08:47
Fix clippy
diff --git a/src/client/amended.rs b/src/client/amended.rs index 5e0b0ad..5869d8b 100644 --- a/src/client/amended.rs +++ b/src/client/amended.rs @@ -27,7 +27,7 @@ use crate::Error; /// which closes the connection). /// 5. `Transfer-Encoding: chunked` header when the content length for a body is unknown. /// 6. ...
2
2
2
c54c03f979266bb8943f2011382894e9a53a9d04
Martin Algesten
2025-03-16T20:54:02
Fix warning for feature client
diff --git a/src/body.rs b/src/body.rs index 81b7d25..12e753c 100644 --- a/src/body.rs +++ b/src/body.rs @@ -223,6 +223,7 @@ pub(crate) enum BodyReader { /// Chunked transfer encoding Chunked(Dechunker), /// Expect remote to close at end of body. + #[cfg(feature = "client")] CloseDelimited, } ...
1
9
1
33f8202c4591f94dc841141368dc1708f43caec4
Martin Algesten
2025-03-16T20:44:20
Fix logic for expect-100 header
diff --git a/src/server/recvreq.rs b/src/server/recvreq.rs index a37c13a..50b24c3 100644 --- a/src/server/recvreq.rs +++ b/src/server/recvreq.rs @@ -132,10 +132,12 @@ impl Reply<RecvRequest> { let has_request_body = self.inner.state.reader.as_ref().unwrap().has_body(); - if self.inner.expect_100 { -...
2
42
4
5385e35f4922fc7f1ae72a53c6b00ef2d39f5029
Martin Algesten
2025-03-16T20:30:06
Decision logic for request body
diff --git a/src/body.rs b/src/body.rs index ba0e5e2..81b7d25 100644 --- a/src/body.rs +++ b/src/body.rs @@ -252,6 +252,14 @@ impl BodyReader { } } + pub fn has_body(&self) -> bool { + match self { + BodyReader::NoBody => false, + BodyReader::LengthDelimited(v) if *v == 0...
3
77
21
bcde63323edd55784bd260f12e5c3733f33555d3
Martin Algesten
2025-03-16T20:03:55
Server body requirement work
diff --git a/src/body.rs b/src/body.rs index 9199c87..ba0e5e2 100644 --- a/src/body.rs +++ b/src/body.rs @@ -266,14 +266,14 @@ impl BodyReader { let mode = if http10 { Self::CloseDelimited } else { - Self::LengthDelimited(0) + Self::NoBody ...
6
101
18
89188e2fcf4a9a75a937026f72832ee1497a4767
Martin Algesten
2025-03-16T19:10:54
client/server feature
diff --git a/Cargo.toml b/Cargo.toml index 7b47202..59b0cd3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,6 +12,9 @@ repository = "https://github.com/algesten/ureq-proto" rust-version = "1.71.1" [features] +default = ["client", "server"] +client = [] +server = [] [dependencies] base64 = { version = "0.22.1", ...
10
94
47
15ec6ec846131f08355927accc31839b7ba2d027
Martin Algesten
2025-03-16T18:12:37
Remove B type state var
diff --git a/src/client/amended.rs b/src/client/amended.rs index 0624049..5e0b0ad 100644 --- a/src/client/amended.rs +++ b/src/client/amended.rs @@ -33,29 +33,26 @@ use crate::Error; /// 9. Changing the `Method` when following redirects. /// 10. Changing the `Uri` when following redirect. /// -pub(crate) struct Ame...
13
101
143
2579abe47c1cd5c2348d7914313977dd0169f657
Martin Algesten
2025-03-16T12:05:17
Remove client/flow
diff --git a/src/client/flow/mod.rs b/src/client/flow/mod.rs deleted file mode 100644 index e64e3fc..0000000 --- a/src/client/flow/mod.rs +++ /dev/null @@ -1,40 +0,0 @@ -//! HTTP/1.1 client protocol state machine implementation. -//! -//! This module implements a state machine for handling HTTP/1.1 requests and respons...
1
0
40
a4e17c6234b0132ff9fa56b76d234d0eef902c80
Martin Algesten
2025-03-13T21:39:46
Fix broken logic for skip_method_body_check
diff --git a/src/client/amended.rs b/src/client/amended.rs index 976410e..7fcc690 100644 --- a/src/client/amended.rs +++ b/src/client/amended.rs @@ -229,7 +229,9 @@ impl<Body> AmendedRequest<Body> { wanted_mode }; - if !skip_method_body_check { + let enforce_body_method = !allow_no...
2
3
3
7ef5f71ce90968f42b10f7f8c89ba0559344b7a9
Martin Algesten
2025-03-13T06:10:16
allow_non_standard_methods -> skip_method_body_check
diff --git a/src/client/call.rs b/src/client/call.rs index 34e4250..810f5ad 100644 --- a/src/client/call.rs +++ b/src/client/call.rs @@ -267,6 +267,7 @@ impl<B> Call<WithoutBody, B> { /// Must be set before calling write() pub fn allow_non_standard_methods(&mut self, v: bool) { self.state.allow_non_s...
1
2
0
aeaa6303dcd8fe1d017333f9b3580d2dd973ede5
Martin Algesten
2025-02-27T20:03:09
Fix http response missing version
diff --git a/src/parser.rs b/src/parser.rs index b8b3704..662e454 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -94,10 +94,9 @@ pub fn try_parse_partial_response<const N: usize>( }; let version = { - let v = res.version.ok_or(Error::MissingResponseVersion)?; - match v { - 0 => V...
1
3
4
36cff7eb0491c67c82e77c631a4324c4406e9514
Martin Algesten
2025-02-25T19:13:23
Allow non-standard methods
diff --git a/src/client/amended.rs b/src/client/amended.rs index d924e6f..976410e 100644 --- a/src/client/amended.rs +++ b/src/client/amended.rs @@ -165,11 +165,14 @@ impl<Body> AmendedRequest<Body> { &self, wanted_mode: BodyWriter, skip_method_body_check: bool, + allow_non_standard_me...
4
83
4
b2421c08ef6ac4e421f040a610a9d3393b7ae23b
Martin Algesten
2025-02-25T18:42:56
Append non-standard port to host header
diff --git a/src/client/call.rs b/src/client/call.rs index 4d1814e..1c2db7b 100644 --- a/src/client/call.rs +++ b/src/client/call.rs @@ -6,9 +6,11 @@ use std::marker::PhantomData; use base64::prelude::BASE64_STANDARD; use base64::Engine; -use http::{header, HeaderName, HeaderValue, Method, Request, Response, Status...
3
60
5
9baabb24e22bf69911d58c240d46a3ac762701ba
Martin Algesten
2025-02-09T15:19:14
Error is non_exhaustive
diff --git a/src/error.rs b/src/error.rs index d836e75..c10f27b 100644 --- a/src/error.rs +++ b/src/error.rs @@ -5,6 +5,7 @@ use http::{Method, Version}; /// Error type for ureq-proto #[derive(Debug, PartialEq, Eq)] #[allow(missing_docs)] +#[non_exhaustive] pub enum Error { BadHeader(String), UnsupportedV...
1
1
0
4f076bd42a258c5697880cf49b509389b4c00b04
Martin Algesten
2025-01-27T21:27:47
allow_partial_redirect as argument
diff --git a/src/client/call.rs b/src/client/call.rs index dbc6c4e..4d1814e 100644 --- a/src/client/call.rs +++ b/src/client/call.rs @@ -471,36 +471,45 @@ impl<B> Call<RecvResponse, B> { /// /// Once the response headers are succesfully read, use [`Call::into_body()`] to proceed /// reading the response ...
5
55
32
9d35f53e80875aeb2bb80804422b8aca98574aaa
Martin Algesten
2025-01-27T06:35:13
Use more header constants
diff --git a/src/body.rs b/src/body.rs index c72a08c..2a1442e 100644 --- a/src/body.rs +++ b/src/body.rs @@ -1,7 +1,7 @@ use std::fmt; use std::io::Write; -use http::{HeaderName, HeaderValue, Method}; +use http::{header, HeaderName, HeaderValue, Method}; use crate::chunk::Dechunker; use crate::util::{compare_lo...
3
11
11
b7a4adc3a2ed52239d95ebe07d8d2e19ad0534ac
Martin Algesten
2025-01-27T06:23:50
Reduce and test stack usage
diff --git a/src/client/amended.rs b/src/client/amended.rs index 11f7755..d924e6f 100644 --- a/src/client/amended.rs +++ b/src/client/amended.rs @@ -5,11 +5,9 @@ use http::{header, HeaderMap, HeaderName, HeaderValue, Method, Request, Uri, Ver use crate::body::BodyWriter; use crate::ext::MethodExt; -use crate::util:...
4
43
15
c80eff0a638dbf04a151a89acebcd59ed756f343
Martin Algesten
2025-01-25T06:50:23
Remve url dependency
diff --git a/Cargo.lock b/Cargo.lock index 0cafcb2..e3ad7a8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -14,32 +14,12 @@ version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" -[[package]] -name = "displaydoc" ...
4
162
376
8893b5a948455fefb71783212629f18862a3ef60
Martin Algesten
2025-01-06T22:28:04
Fix try_parse_request to include uri
diff --git a/src/parser.rs b/src/parser.rs index 74b5000..68778cf 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -176,7 +176,9 @@ pub fn try_parse_request<const N: usize>( Method::from_bytes(v.as_bytes()).map_err(|_| Error::RequestInvalidMethod)? }; - let mut builder = Request::builder().version(v...
1
3
1
938d43ce3a9e0fb9446639b8a05c6e0b3afef655
Martin Algesten
2025-01-04T08:15:35
Allow overriding URI auth
diff --git a/src/client/amended.rs b/src/client/amended.rs index 44bb996..076c37e 100644 --- a/src/client/amended.rs +++ b/src/client/amended.rs @@ -202,6 +202,12 @@ impl<Body> AmendedRequest<Body> { req_host_header = true; } + let mut req_auth_header = false; + if let Some(h) = se...
3
33
1
4062333b8d59baa6945d85635515980540b8eca9
Martin Algesten
2025-01-04T08:11:57
Use more constants for headers
diff --git a/src/client/amended.rs b/src/client/amended.rs index a73042a..44bb996 100644 --- a/src/client/amended.rs +++ b/src/client/amended.rs @@ -1,6 +1,6 @@ use std::mem; -use http::{HeaderMap, HeaderName, HeaderValue, Method, Request, Uri, Version}; +use http::{header, HeaderMap, HeaderName, HeaderValue, Method...
1
8
8
3a9e78a8957f0f91f1f38fd76b5f671131012464
Martin Algesten
2025-01-03T22:49:49
Code formatting
diff --git a/src/client/call.rs b/src/client/call.rs index 52a4990..a45bb66 100644 --- a/src/client/call.rs +++ b/src/client/call.rs @@ -847,7 +847,8 @@ mod test { assert_eq!( s, - "POST /page HTTP/1.1\r\nhost: f.test\r\ntransfer-encoding: chunked\r\n\r\n5\r\nhallo\r\n0\r\n\r\n" + ...
1
13
5
52c2d9285d22a1218e7cc74dac5c1a5f5e8d880f
Martin Algesten
2025-01-03T22:47:45
Use constants for http header names
diff --git a/src/client/call.rs b/src/client/call.rs index 3607d45..52a4990 100644 --- a/src/client/call.rs +++ b/src/client/call.rs @@ -118,7 +118,7 @@ impl<State, B> Call<State, B> { // We need an owned value to set the host header. let host = HeaderValue::from_s...
4
20
13
06fb9da38be18cdd231368938412d6e8a23aa31f
Martin Algesten
2025-01-03T22:46:54
Add BASIC auth from URI
diff --git a/Cargo.lock b/Cargo.lock index c54da8f..d6dbde9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,6 +2,12 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a83...
4
81
3
aa9ec8568a5cf292bfb99584bc7c99ac5612200c
Martin Algesten
2025-01-03T22:05:49
Basic auth from URI provided username/password
diff --git a/src/client/call.rs b/src/client/call.rs index 14fac46..8e493dc 100644 --- a/src/client/call.rs +++ b/src/client/call.rs @@ -934,4 +934,19 @@ mod test { assert_eq!(err, Error::BodyContentAfterFinish); } + + #[test] + fn username_password_uri() { + let req = Request::get("http://...
1
15
0
8c51429e8c712f725625782d04de36ae8ba526ba
Martin Algesten
2025-01-03T22:13:28
Bump deps (url to 2.5.3)
diff --git a/Cargo.lock b/Cargo.lock index 501cc9f..c54da8f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "bytes" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366...
2
31
31
1c89c8cb667d0477b893369941adc0956064cd30
Martin Algesten
2025-01-03T22:11:44
Fix clippy
diff --git a/src/lib.rs b/src/lib.rs index 6c05ba4..992ecb4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -8,6 +8,8 @@ #![warn(clippy::all)] #![allow(clippy::uninlined_format_args)] #![deny(missing_docs)] +// I don't think elided lifetimes help in understanding the code. +#![allow(clippy::needless_lifetimes)] #[mac...
1
2
0
f6c8ce987991c4b67d7e9a72a01809cbd89e1916
Martin Algesten
2024-11-22T09:43:09
calculate_output_overhead() -> calculate_max_input()
diff --git a/src/body.rs b/src/body.rs index ef0541e..c72a08c 100644 --- a/src/body.rs +++ b/src/body.rs @@ -26,7 +26,11 @@ impl Default for SenderMode { } } -const DEFAULT_CHUNK_SIZE: usize = 10 * 1024; +// This is 0x2800 in hex. +pub(crate) const DEFAULT_CHUNK_SIZE: usize = 10 * 1024; +// 4 is 0x2800 and the ...
3
86
29
94cccd3c152a51199f5fe779db95e707e4e66187
Martin Algesten
2024-11-22T09:42:40
Call analyze_request() when entering Flow<SendBody>
diff --git a/src/client/flow.rs b/src/client/flow.rs index 3d9fde1..ebbdb81 100644 --- a/src/client/flow.rs +++ b/src/client/flow.rs @@ -301,17 +301,19 @@ impl<B> Flow<B, SendRequest> { /// /// Returns `None` if the entire request has not been sent. It is guaranteed that if /// `can_proceed()` returns `t...
6
33
28
0db86b342dfc6c2a189332e2090322d7867ca1bb
Martin Algesten
2024-11-09T13:24:23
Allow stop reading on chunk boundary
diff --git a/src/body.rs b/src/body.rs index d9450a7..ef0541e 100644 --- a/src/body.rs +++ b/src/body.rs @@ -322,11 +322,16 @@ impl BodyReader { Ok(Self::CloseDelimited) } - pub fn read(&mut self, src: &[u8], dst: &mut [u8]) -> Result<(usize, usize), Error> { + pub fn read( + &mut self, + ...
5
141
6
91a1d0a76663b1aaf6f212b7c91ce985d8fd1c10
Martin Algesten
2024-11-06T13:51:17
Document everything
diff --git a/src/body.rs b/src/body.rs index d3221d9..d9450a7 100644 --- a/src/body.rs +++ b/src/body.rs @@ -193,6 +193,7 @@ pub(crate) enum BodyReader { CloseDelimited, } +/// Kind of body #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum BodyMode { /// No body is expected either due to the status o...
7
269
6
b5d6ab913d17188ccd457084e302afc405665a30
Martin Algesten
2024-10-18T18:51:10
MSRV 1.67
diff --git a/Cargo.toml b/Cargo.toml index 5fbab7e..b90a8b1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,7 @@ license = "MIT OR Apache-2.0" repository = "https://github.com/algesten/hoot" # MSRV -rust-version = "1.61" +rust-version = "1.67" [features]
1
1
1
12741d00b4ccab6339e5fbdb6b52cb65d4e477c8
Martin Algesten
2024-10-13T19:16:17
send_body_despite_method escape hatch
diff --git a/hoot/src/client/amended.rs b/hoot/src/client/amended.rs index a74a2e7..aeb6e4b 100644 --- a/hoot/src/client/amended.rs +++ b/hoot/src/client/amended.rs @@ -176,7 +176,11 @@ impl<Body> AmendedRequest<Body> { Ok(uri) } - pub fn analyze(&self, wanted_mode: BodyWriter) -> Result<RequestInfo,...
5
81
8
0bf234b41c1b6664050fb803a938e6ce625d0fef
Martin Algesten
2024-10-12T17:24:33
Update ArrayVec
diff --git a/hoot/src/util.rs b/hoot/src/util.rs index fe7349b..233e903 100644 --- a/hoot/src/util.rs +++ b/hoot/src/util.rs @@ -160,6 +160,11 @@ impl<T, const N: usize> ArrayVec<T, N> { self.arr[self.len] = value; self.len += 1; } + + pub fn truncate(&mut self, len: usize) { + assert!(...
1
15
1
eb042c8ab74d4fc48f5a8b8d74f2a666d6e98872
Martin Algesten
2024-10-12T17:21:40
Remove dependeny on tinyvec
diff --git a/Cargo.lock b/Cargo.lock index 582b80e..ddae85c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -30,7 +30,6 @@ dependencies = [ "http", "httparse", "log", - "tinyvec", "url", ] diff --git a/hoot/Cargo.toml b/hoot/Cargo.toml index 8762eb7..08e22f8 100644 --- a/hoot/Cargo.toml +++ b/hoot/Cargo.toml @@ ...
6
64
41
a1ab518db8a21f4736b68ae31348a374cd0ec4d3
Martin Algesten
2024-09-29T16:48:38
smallvec -> tinyvec and remove thiserror
diff --git a/Cargo.lock b/Cargo.lock index e596737..f3fa43b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -30,8 +30,7 @@ dependencies = [ "http", "httparse", "log", - "smallvec", - "thiserror", + "tinyvec", "url", ] @@ -80,66 +79,11 @@ version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.i...
5
88
136
5a7b0f32536e4081d1a361e44f0323e8dd5ecf08
Martin Algesten
2024-08-31T16:59:42
Expose original request headers
diff --git a/hoot/src/client/amended.rs b/hoot/src/client/amended.rs index b3f14b0..13fb5d8 100644 --- a/hoot/src/client/amended.rs +++ b/hoot/src/client/amended.rs @@ -1,6 +1,6 @@ use std::mem; -use http::{HeaderName, HeaderValue, Method, Request, Uri, Version}; +use http::{HeaderMap, HeaderName, HeaderValue, Metho...
2
9
1
2ee6396b717694d3e43b8e2f94f4e1223e3c7164
Martin Algesten
2024-08-12T07:21:22
Fix docsrs
diff --git a/Cargo.lock b/Cargo.lock index 833512f..7330374 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -25,7 +25,7 @@ dependencies = [ [[package]] name = "hoot" -version = "0.2.0" +version = "0.2.1" dependencies = [ "http", "httparse", diff --git a/hoot/Cargo.toml b/hoot/Cargo.toml index e0a8b35..0e7cb65 1006...
2
2
6
e4adf2ade47ef305200aab9b2c273fba357be209
Martin Algesten
2024-08-12T07:14:42
Fix test
diff --git a/hoot/src/client/test/state_recv_response.rs b/hoot/src/client/test/state_recv_response.rs index 0cc8866..d339173 100644 --- a/hoot/src/client/test/state_recv_response.rs +++ b/hoot/src/client/test/state_recv_response.rs @@ -13,7 +13,7 @@ const RESPONSE: &[u8] = b"\ #[test] fn receive_incomplete_response(...
1
1
1
f997661a043a518326b7553740a74a43295eea8c
Martin Algesten
2024-07-27T07:59:36
Partial redirect responses
diff --git a/hoot/src/client/call.rs b/hoot/src/client/call.rs index c1b52d4..dfff92e 100644 --- a/hoot/src/client/call.rs +++ b/hoot/src/client/call.rs @@ -5,7 +5,7 @@ use std::marker::PhantomData; use http::{HeaderName, HeaderValue, Method, Request, Response, StatusCode, Version}; use crate::body::{BodyReader, Bo...
2
79
2
8fe59fd208cb30dd09c2b3a16de617de7d23514c
Martin Algesten
2024-07-25T20:08:05
Clippy fixes
diff --git a/hoot/src/client/call.rs b/hoot/src/client/call.rs index 027a2b5..c1b52d4 100644 --- a/hoot/src/client/call.rs +++ b/hoot/src/client/call.rs @@ -200,7 +200,7 @@ impl Phase { } } -impl<'a, B> Call<WithoutBody, B> { +impl<B> Call<WithoutBody, B> { /// Write the request to the output buffer /...
6
19
21
f4e07e641cbd65f81d018b52c0b19a5f0c76cdf6
Martin Algesten
2024-07-25T20:01:43
More debug
diff --git a/Cargo.lock b/Cargo.lock index 0f4af07..833512f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -29,6 +29,7 @@ version = "0.2.0" dependencies = [ "http", "httparse", + "log", "smallvec", "thiserror", "url", @@ -67,6 +68,12 @@ version = "1.0.10" source = "registry+https://github.com/rust-lang/crates....
7
93
8
cf0e3a04dfba6eefe70279324c82a544f7f3ad42
Martin Algesten
2024-07-24T15:29:29
Do not expect location url to be valid
diff --git a/hoot/src/client/amended.rs b/hoot/src/client/amended.rs index 705afaf..b3f14b0 100644 --- a/hoot/src/client/amended.rs +++ b/hoot/src/client/amended.rs @@ -162,7 +162,10 @@ impl<Body> AmendedRequest<Body> { .join(location) .map_err(|_| Error::BadLocationHeader(location.to_string()...
1
4
1
da5cd85ff75a2b168dc2251f927617b4e31862de
Martin Algesten
2024-07-23T19:32:41
Provide bad location header in error
diff --git a/hoot/src/client/amended.rs b/hoot/src/client/amended.rs index b249216..705afaf 100644 --- a/hoot/src/client/amended.rs +++ b/hoot/src/client/amended.rs @@ -158,7 +158,9 @@ impl<Body> AmendedRequest<Body> { pub fn new_uri_from_location(&self, location: &str) -> Result<Uri, Error> { let base = ...
3
10
4
53b6760becd5694fcf0902d4402409e1c461f0d5
Martin Algesten
2024-07-23T19:32:27
Trim chunk len
diff --git a/hoot/src/chunk.rs b/hoot/src/chunk.rs index b07d328..5fc6f06 100644 --- a/hoot/src/chunk.rs +++ b/hoot/src/chunk.rs @@ -78,12 +78,11 @@ impl Dechunker { let maybe_meta = src.iter().take(100).position(|c| *c == b';'); let len_end = maybe_meta.unwrap_or(SANITY_CHECK + 1).min(i); - ...
1
4
5
b08bf2108fbe9d0c4da5d47e140fb9e65733cca9
Martin Algesten
2024-07-23T16:04:15
transfer-encoding chunked skip trailers
diff --git a/hoot/src/chunk.rs b/hoot/src/chunk.rs index 87a48d7..b07d328 100644 --- a/hoot/src/chunk.rs +++ b/hoot/src/chunk.rs @@ -9,9 +9,11 @@ pub(crate) enum Dechunker { Chunk(usize), CrLf, Ending, + Trailer, Ended, } +#[derive(Debug)] struct Pos { index_in: usize, index_out: us...
1
38
4