AGPUSH-1074: fix simple-push version payload sending #410
AGPUSH-1074: fix simple-push version payload sending #410
Conversation
@matzew @sebastienblanc mind to test this? |
3044f49
to
0e0cd75
Compare
conn.setRequestProperty("Accept", "application/x-www-form-urlencoded"); | ||
conn.setRequestProperty("Content-Length", "" + bytes.length); | ||
conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); | ||
conn.setRequestProperty("Accept", "*/*"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
which server, ours or Mozilla, did require the UPS to be updated ?
@lfryc which server, ours or Mozilla, did require the UPS to be updated ? |
@@ -103,12 +104,15 @@ protected HttpURLConnection put(String url, String body) throws IOException { | |||
conn.setDoOutput(true); | |||
conn.setUseCaches(false); | |||
conn.setFixedLengthStreamingMode(bytes.length); | |||
conn.setRequestProperty("Accept", "application/x-www-form-urlencoded"); | |||
conn.setRequestProperty("Content-Length", "" + bytes.length); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps using String.valueOf(bytes.length)
or Integer.toString(bytes.length)
would make the code more readable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's do Integer.toString()
, since that also what the String.valueOf(int)
is calling into
Also tested against "our" SPS server using this client https://github.com/aerogear/aerogear-js-cookbook/tree/master/simplepush-unifiedpush-example |
@matzew I was using FFOS device, so Mozilla Push |
0e0cd75
to
9630679
Compare
Thanks for testing guys, I've amended the commit, ready to merge? |
@sebastienblanc I believe your issues with composing are related to https://issues.jboss.org/browse/AGPUSH-1072 |
merging... |
@lfryc mind doing a rebase ? I am getting merge conflicts |
https://issues.jboss.org/browse/AGPUSH-1074