Remove too simplistic url parse
This commit is contained in:
@@ -20,6 +20,7 @@ pub mod status;
|
||||
pub mod streamext;
|
||||
|
||||
pub const APP_JSON: &'static str = "application/json";
|
||||
pub const APP_JSON_LINES: &'static str = "application/jsonlines";
|
||||
pub const APP_OCTET: &'static str = "application/octet-stream";
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
@@ -726,24 +727,6 @@ impl FromStr for AggKind {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn query_params(q: Option<&str>) -> std::collections::BTreeMap<String, String> {
|
||||
let mut map = std::collections::BTreeMap::new();
|
||||
match q {
|
||||
Some(k) => {
|
||||
for par in k.split("&") {
|
||||
let mut u = par.split("=");
|
||||
if let Some(t1) = u.next() {
|
||||
if let Some(t2) = u.next() {
|
||||
map.insert(t1.into(), t2.into());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
None => {}
|
||||
}
|
||||
map
|
||||
}
|
||||
|
||||
pub trait ToNanos {
|
||||
fn to_nanos(&self) -> u64;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user