[edge] Tests first: QC repros for 1xx, auth timeout, name resolution, Upgrade tokens, Remote-* stripping (red)
This commit is contained in:
@@ -121,7 +121,20 @@ impl Echo {
|
||||
self.requests.lock().unwrap().clear();
|
||||
}
|
||||
|
||||
/// Every answer says in `x-sent-content-type` which Content-Type it carried (or `none`),
|
||||
/// so the diff harness can tell what the engines added.
|
||||
async fn handle(&self, req: Request<Incoming>) -> Response<Body> {
|
||||
let mut resp = self.answer(req).await;
|
||||
let sent = resp
|
||||
.headers()
|
||||
.get("content-type")
|
||||
.cloned()
|
||||
.unwrap_or_else(|| hyper::header::HeaderValue::from_static("none"));
|
||||
resp.headers_mut().insert("x-sent-content-type", sent);
|
||||
resp
|
||||
}
|
||||
|
||||
async fn answer(&self, req: Request<Incoming>) -> Response<Body> {
|
||||
let (parts, body) = req.into_parts();
|
||||
let body = body
|
||||
.collect()
|
||||
|
||||
Reference in New Issue
Block a user