aquatic_http: prococol module: parse Request from path

This commit is contained in:
Joakim Frostegård 2020-07-02 22:53:03 +02:00
parent d5b82bcf70
commit fb6caf7343
2 changed files with 13 additions and 15 deletions

View file

@ -142,10 +142,8 @@ pub enum Request {
impl Request {
pub fn from_http(http: httparse::Request) -> Option<Self> {
log::debug!("path: {:?}", http.path);
let path = http.path?;
pub fn from_http_get_path(path: &str) -> Option<Self> {
log::debug!("path: {:?}", path);
let mut split_parts= path.splitn(2, '?');