Canonicalize unknown. (#69)
diff --git a/src/plugin/plugin_pdo.rs b/src/plugin/plugin_pdo.rs
index 7cf1fa9..1f31b56 100644
--- a/src/plugin/plugin_pdo.rs
+++ b/src/plugin/plugin_pdo.rs
@@ -291,7 +291,7 @@
"oci" => "1521", // Oracle
"sqlsrv" => "1433",
"pgsql" => "5432",
- _ => "unknown",
+ _ => "0",
};
let ss = data_source.split(';');
diff --git a/src/request.rs b/src/request.rs
index ec8d0a5..c8c325b 100644
--- a/src/request.rs
+++ b/src/request.rs
@@ -116,14 +116,14 @@
.and_then(z_val_to_string)
.map(|port| format!("localhost:{}", port))
})
- .unwrap_or_else(|| "UNKNOWN".to_string());
+ .unwrap_or_else(|| "unknown:0".to_string());
let uri = server
.get("REQUEST_URI")
.and_then(z_val_to_string)
.or_else(|| server.get("PHP_SELF").and_then(z_val_to_string))
.or_else(|| server.get("SCRIPT_NAME").and_then(z_val_to_string))
- .unwrap_or_else(|| "/UNKNOWN".to_string());
+ .unwrap_or_else(|| "/unknown".to_string());
Ok(Url::parse(&format!("{}://{}{}", scheme, addr, uri))?)
}
@@ -256,12 +256,12 @@
.and_then(z_val_to_string)
.map(|port| format!("localhost:{}", port))
})
- .unwrap_or_else(|| "UNKNOWN".to_string());
+ .unwrap_or_else(|| "unknown:0".to_string());
let uri = server
.get("request_uri")
.and_then(z_val_to_string)
- .unwrap_or_else(|| "/UNKNOWN".to_string());
+ .unwrap_or_else(|| "/unknown".to_string());
let query = server
.get("query_string")