src/api2/admin/datastore/h2upload.rs: test if version < 2
We can only upgrade http 1.x connections.
This commit is contained in:
parent
45cdce069e
commit
96e95fc179
@ -39,6 +39,10 @@ fn upgrade_h2upload(
|
||||
bail!("invalid protocol name");
|
||||
}
|
||||
|
||||
if parts.version >= http::version::Version::HTTP_2 {
|
||||
bail!("unexpected http version '{:?}' (expected version < 2)", parts.version);
|
||||
}
|
||||
|
||||
rt::spawn(
|
||||
req_body
|
||||
.on_upgrade()
|
||||
|
Loading…
Reference in New Issue
Block a user