Compare commits
	
		
			1 Commits
		
	
	
		
			v0.4.5
			...
			41f8e8f2ab
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					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)
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user