Commit 43d0a1e578f1f25e7d62906e470f49c399626775

Authored by don ago
1 parent 8033a25c88
Exists in master

지집

Showing 1 changed file with 3 additions and 1 deletions Side-by-side Diff

app/SendLog.scala View file @ 43d0a1e
1 1 import java.io.OutputStreamWriter
2 2 import java.net.URI
  3 +import java.util.zip.GZIPOutputStream
3 4  
4 5 import org.apache.commons.lang.time
5 6 import org.apache.commons.lang.time.StopWatch
6 7  
... ... @@ -62,10 +63,11 @@
62 63 url = new java.net.URL("http://localhost:8081/log")
63 64 httpcon = url.openConnection.asInstanceOf[java.net.HttpURLConnection]
64 65 httpcon.setRequestMethod("POST")
  66 + httpcon.setRequestProperty("Content-Encoding", "gzip");
65 67  
66 68 httpcon.setDoOutput(true)
67 69 httpcon.setDoInput(true)
68   - out = httpcon.getOutputStream
  70 + out = new GZIPOutputStream(httpcon.getOutputStream)
69 71 w = new OutputStreamWriter(out)
70 72  
71 73 cur_line = 0