Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

AGPUSH-1074: fix simple-push version payload sending #410

Conversation

lfryc
Copy link
Contributor

@lfryc lfryc commented Oct 21, 2014

@lfryc
Copy link
Contributor Author

lfryc commented Oct 21, 2014

@matzew @sebastienblanc mind to test this?

@lfryc lfryc force-pushed the AGPUSH-1074-simplepush-fix-version-payload branch from 3044f49 to 0e0cd75 Compare October 21, 2014 16:44
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", "*/*");
Copy link
Contributor

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 ?

@matzew
Copy link
Contributor

matzew commented Oct 29, 2014

@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);
Copy link
Contributor

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?

Copy link
Contributor

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

@sebastienblanc
Copy link
Member

Tested with FFOS ChuckPush app and 👍
chcuk

On a side note, I had to test it through cURL as the compose message seems to be broken for SPS.

@sebastienblanc
Copy link
Member

Also tested against "our" SPS server using this client https://github.com/aerogear/aerogear-js-cookbook/tree/master/simplepush-unifiedpush-example
👍

@lfryc
Copy link
Contributor Author

lfryc commented Oct 30, 2014

@matzew I was using FFOS device, so Mozilla Push

@lfryc lfryc force-pushed the AGPUSH-1074-simplepush-fix-version-payload branch from 0e0cd75 to 9630679 Compare October 30, 2014 16:59
@lfryc
Copy link
Contributor Author

lfryc commented Oct 30, 2014

Thanks for testing guys, I've amended the commit, ready to merge?

@lfryc
Copy link
Contributor Author

lfryc commented Oct 30, 2014

@sebastienblanc I believe your issues with composing are related to https://issues.jboss.org/browse/AGPUSH-1072

@matzew
Copy link
Contributor

matzew commented Oct 30, 2014

merging...

@matzew
Copy link
Contributor

matzew commented Oct 30, 2014

@lfryc mind doing a rebase ? I am getting merge conflicts

@matzew
Copy link
Contributor

matzew commented Oct 30, 2014

landed in 859b121 and 8f7b133

@matzew matzew closed this Oct 30, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants