Move genesis/snapshot archive download into Rust (#5515)

This commit is contained in:
Michael Vines
2019-08-14 19:25:22 -07:00
committed by GitHub
parent fd443d85c4
commit 9f6c9c428b
12 changed files with 169 additions and 115 deletions

View File

@@ -70,8 +70,8 @@ impl RequestMiddleware for RpcRequestMiddleware {
fn on_request(&self, request: hyper::Request<hyper::Body>) -> RequestMiddlewareAction {
trace!("request uri: {}", request.uri());
match request.uri().path() {
"/snapshot.tgz" => self.get("snapshot.tgz"),
"/genesis.tgz" => self.get("genesis.tgz"),
"/snapshot.tar.bz2" => self.get("snapshot.tar.bz2"),
"/genesis.tar.bz2" => self.get("genesis.tar.bz2"),
_ => RequestMiddlewareAction::Proceed {
should_continue_on_invalid_cors: false,
request,