aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2015-12-29 01:13:10 +0300
committerGravatar Vitaly Takmazov2015-12-29 01:13:10 +0300
commit76030dc1a021cc9fb83bdd65aa21b8f2580fc24b (patch)
treed68b0e640cc384bde390d1ace6fe6234864dc619 /src/main/java
parentcd699d5726740300f2b477d9d95b1df68eb77c56 (diff)
push: fix sendWNS
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/com/juick/PushComponent.java4
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();