mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-02 02:35:31 +00:00
aquatic_http: prococol module: parse Request from path
This commit is contained in:
parent
d5b82bcf70
commit
fb6caf7343
2 changed files with 13 additions and 15 deletions
|
|
@ -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, '?');
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue