refactor(header): Host header internals made private
This allows us to improve the performance. For now, a Cow is used internally, so clients can set the host to a static value and no longer need copies. Later, we can change it to also possibly have a MemSlice. BREAKING CHANGE: The fields of the `Host` header are no longer available. Use the getter methods instead.
This commit is contained in:
@@ -43,10 +43,7 @@ impl Origin {
|
||||
pub fn new<S: Into<String>, H: Into<String>>(scheme: S, hostname: H, port: Option<u16>) -> Origin{
|
||||
Origin {
|
||||
scheme: scheme.into(),
|
||||
host: Host {
|
||||
hostname: hostname.into(),
|
||||
port: port
|
||||
}
|
||||
host: Host::new(hostname.into(), port),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user