feat: handle subset of urlendcoded
This commit is contained in:
parent
d7421324dc
commit
5f2109787f
1 changed files with 17 additions and 6 deletions
|
@ -26,7 +26,14 @@ impl URL {
|
|||
Some(key) => key.to_string(),
|
||||
None => continue,
|
||||
};
|
||||
let value = key_value.next().unwrap_or("").to_string();
|
||||
let value = key_value
|
||||
.next()
|
||||
.unwrap_or("")
|
||||
.to_string()
|
||||
.replace("+", " ")
|
||||
.replace("%20", " ")
|
||||
.replace("%23", "#")
|
||||
.replace("%2C", ",");
|
||||
query.insert(key, value);
|
||||
}
|
||||
|
||||
|
@ -94,7 +101,11 @@ impl Request {
|
|||
None => return RequestStatus::MalformedHTTP(stream),
|
||||
};
|
||||
|
||||
RequestStatus::Ok(Request { stream, method, url })
|
||||
RequestStatus::Ok(Request {
|
||||
stream,
|
||||
method,
|
||||
url,
|
||||
})
|
||||
}
|
||||
|
||||
pub fn mut_stream(self) -> TcpStream {
|
||||
|
|
Loading…
Reference in a new issue