Split response body type into own function (#566)
This allows removing the hack where we create a Response with an empty `reader`, then immediately mutate it to set the real reader. It also happens to allow us to get rid of 3 fields of Response that were only used to pass information to `stream_to_reader`. I've tried to keep the structure and logic of the body calculation as close to the same as possible, for ease of review and to avoid introducing bugs. I think there are some followup fixes we can make to the logic, which will be made easier by having it in a self contained function.
This commit is contained in:
committed by
GitHub
parent
cf687381bd
commit
d8225b22ed
@@ -109,10 +109,6 @@ impl Unit {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn is_head(&self) -> bool {
|
||||
self.method.eq_ignore_ascii_case("head")
|
||||
}
|
||||
|
||||
pub fn resolver(&self) -> ArcResolver {
|
||||
self.agent.state.resolver.clone()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user