diff --git a/bin/src/command/requests.rs b/bin/src/command/requests.rs index a7f7e6a71..c9fbe3939 100644 --- a/bin/src/command/requests.rs +++ b/bin/src/command/requests.rs @@ -220,12 +220,12 @@ fn set_logging_level(server: &mut Server, client: &mut ClientSession, logging_fi let (directives, errors) = logging::parse_logging_spec(&logging_filter); if !errors.is_empty() { client.finish_failure(format!( - "Error parsing logging filter:\n {}", + "Error parsing logging filter:\n- {}", errors .iter() .map(logging::LogSpecParseError::to_string) .collect::>() - .join("\n ") + .join("\n- ") )); return; } diff --git a/bin/src/util.rs b/bin/src/util.rs index 9586122d0..a3ae645bd 100644 --- a/bin/src/util.rs +++ b/bin/src/util.rs @@ -162,9 +162,10 @@ pub unsafe fn get_executable_path() -> Result { Ok(path_str) } + #[cfg(target_os = "macos")] extern "C" { - pub fn _NSGetExecutablePath(buf: *mut c_char, size: *mut u32) -> i32; + pub fn _NSGetExecutablePath(buf: *mut libc::c_char, size: *mut u32) -> i32; } #[cfg(target_os = "macos")] diff --git a/bin/src/worker.rs b/bin/src/worker.rs index 17385ec0e..7d5b0394d 100644 --- a/bin/src/worker.rs +++ b/bin/src/worker.rs @@ -10,11 +10,8 @@ use std::{ process::Command, }; -#[cfg(target_os = "macos")] -use libc::c_char; use libc::pid_t; -#[cfg(target_os = "freebsd")] -use libc::{sysctl, CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, PATH_MAX}; + use mio::net::UnixStream; use nix::{ errno::Errno, diff --git a/command/examples/bench_logger.rs b/command/examples/bench_logger.rs index 0cc77a345..0519ab329 100644 --- a/command/examples/bench_logger.rs +++ b/command/examples/bench_logger.rs @@ -2,12 +2,13 @@ //! You can change the number of logs, log target, log filter and if they are colored with env //! variables. +#[macro_use] +extern crate sozu_command_lib; + use std::time::Instant; use rand::{rngs::StdRng, Rng, RngCore, SeedableRng}; -#[macro_use] -extern crate sozu_command_lib; use sozu_command_lib::logging::setup_logging; struct LogLine { diff --git a/command/src/command.proto b/command/src/command.proto index b38cbd6b2..83d4d2d07 100644 --- a/command/src/command.proto +++ b/command/src/command.proto @@ -751,7 +751,7 @@ message HttpEndpoint { optional string authority = 2; optional string path = 3; // warning: this should be a u16 but protobuf only has uint32. - // Make sure the value never exceeds u16 bounds. + // Make sure the value never exceeds u16 bounds. optional uint32 status = 4; optional string reason = 5; } diff --git a/lib/src/protocol/pipe.rs b/lib/src/protocol/pipe.rs index 5ff708f5d..2b59ae8c7 100644 --- a/lib/src/protocol/pipe.rs +++ b/lib/src/protocol/pipe.rs @@ -10,15 +10,13 @@ use sozu_command::{ use crate::{ backends::Backend, pool::Checkout, - protocol::SessionState, + protocol::{http::parser::Method, SessionState}, socket::{stats::socket_rtt, SocketHandler, SocketResult, TransportProtocol}, sozu_command::ready::Ready, timer::TimeoutContainer, L7Proxy, ListenerHandler, Protocol, Readiness, SessionMetrics, SessionResult, StateResult, }; -use super::http::parser::Method; - #[derive(PartialEq, Eq)] pub enum SessionStatus { Normal,