diff options
author | Vitaly Takmazov | 2015-12-29 01:13:10 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2015-12-29 01:13:10 +0300 |
commit | 76030dc1a021cc9fb83bdd65aa21b8f2580fc24b (patch) | |
tree | d68b0e640cc384bde390d1ace6fe6234864dc619 /src/main/java/com | |
parent | cd699d5726740300f2b477d9d95b1df68eb77c56 (diff) |
push: fix sendWNS
Diffstat (limited to 'src/main/java/com')
-rw-r--r-- | src/main/java/com/juick/PushComponent.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/com/juick/PushComponent.java b/src/main/java/com/juick/PushComponent.java index 84f91d9b..a813f1a2 100644 --- a/src/main/java/com/juick/PushComponent.java +++ b/src/main/java/com/juick/PushComponent.java @@ -263,6 +263,8 @@ public class PushComponent implements ServletContextListener, Stream.StreamListe boolean ret = false; try { HttpURLConnection conn = (HttpURLConnection) new URL(url).openConnection(); + conn.setDoInput(true); + conn.setDoOutput(true); OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream()); conn.setRequestProperty("Content-Type", "text/xml; charset=utf-8"); @@ -273,8 +275,6 @@ public class PushComponent implements ServletContextListener, Stream.StreamListe conn.setRequestProperty("X-WNS-Type", "wns/toast"); // todo: mb use "wns/badge" or "wns/tile" conn.setUseCaches(false); - conn.setDoInput(true); - conn.setDoOutput(true); conn.setRequestMethod("POST"); conn.connect(); |