How to implement GCM HTTP server in Python while avoiding my server's IP being blacklisted by Google?
问题 I'm using Apache, WSGI (mod_wsgi) and Python, to implement a GCM HTTP server as describe in the Android Developer website: developer.android.com/google/gcm/server.html At first the code I've implemented on the server side to handle message sending to GCM was as the following: def send_to_gcm(data): url = 'https://android.googleapis.com/gcm/send' no = 1 while True: try: request = Request(url=url, data=json.dumps(data)) request.add_header('Authorization','key=AIzXXX') request.add_header(