Skip to content

Commit

Permalink
handle non-bzip
Browse files Browse the repository at this point in the history
  • Loading branch information
howardchung committed Feb 25, 2024
1 parent 3db0f60 commit 614a8c1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
#curl localhost:5600 --data-binary "@/datadrive/odota-parser/7355186741_1742953546.dem"
#curl localhost:5600 --data-binary "@/datadrive/odota-parser/7437280975_580771917.dem"

curl localhost:5600/blob?replay_url=http://replay273.valve.net/570/7598355161_711705904.dem.bz2
curl localhost:5600/blob?replay_url=http://replay223.valve.net/570/1416146420_785306176.dem.bz2
3 changes: 3 additions & 0 deletions src/main/java/opendota/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ public void handle(HttpExchange t) throws IOException {
// Corrupted replay, don't retry
status = 200;
}
if (error.toString().contains("bunzip2: (stdin) is not a bzip2 file.")) {
// Tried to unzip a non-bz2 file
}
t.sendResponseHeaders(status, 0);
t.getResponseBody().close();
} else {
Expand Down

0 comments on commit 614a8c1

Please sign in to comment.