aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-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();