jondot / cottonballs

Your own mock, fluffy version of GCM for testing purposes
12 stars 11 forks source link

It's not working with https #1

Open sheetaldeshpande opened 11 years ago

sheetaldeshpande commented 11 years ago
  1. Setup cottonballs
  2. Updated host file ccording to documentation i.e. 127.0.0.1 android.googleapis.com
  3. Using postman POST: https://android.googleapis.com/gcm/send

{ "registration_ids" : ["APA91bHpPg5OHGQswCT3FMv4MkdEbm2J2WEzuf69HlMljPvi_7htN3dlaZXCYReGGwDvtnoxw_TsaX0mY63x_htxdFrPvlWbnxUhIEKtbARAjCrbSXueIk6W66dw6zUBvEaSufZf4hSa_XQu5WpfzzYYmKy8OPFZyA", "ssghgshgsshg"], "data" : { "message":"Hello World from Watson!!" } }

We get response status 0.

mrugenmike commented 11 years ago

Yes I am facing same issue, and I am using the GCM client library as provided by google, which basically tries to make a HTTPS call to the endpoint https://android.googleapis.com/gcm/send to basically send a Multicast request. The cottonballs responds on the same call but with HTTP protocol, it is really not understood what happens, as response is expected from the HTTPS binding and not HTTP binding. Changing the GCMS library is not possible as it doesn't allow to send request to another URLs or using another protocols.

jondot commented 11 years ago

Hi, since cottonballs was built for performance testing, HTTPS/SSL was secondary - however there is support for it. did you follow the instructions regarding setting up SSL in the README?