start working on exec subcommand
This commit is contained in:
parent
e8b8dc2976
commit
41f8e8f2ab
@ -121,7 +121,8 @@ pub enum RequestError {
|
||||
StreamIOError(#[from] std::io::Error),
|
||||
// #[error("Received invalid UTF-8 in request")]
|
||||
// InvalidUtf8,
|
||||
// MalformedHttpRequest,
|
||||
#[error("HTTP request malformed")]
|
||||
BadRequest,
|
||||
#[error("HTTP request too large")]
|
||||
RequestTooLarge,
|
||||
#[error("Error accessing credentials: {0}")]
|
||||
|
@ -103,6 +103,11 @@ impl Handler {
|
||||
println!("{}", std::str::from_utf8(&buf).unwrap());
|
||||
}
|
||||
|
||||
let path = buf.split(|&c| &[c] == b" ")
|
||||
.skip(1)
|
||||
.next()
|
||||
.ok_or(RequestError::BadRequest(buf))?;
|
||||
|
||||
Ok(buf)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user