Commits

Matthew Schinckel committed 4991f87

Clickatell will ping with an empty request on callback URL change.
This can be caught early, and just return OK.

Comments (0)

Files changed (2)

 
 setup(
     name = "django-sms-gateway",
-    version = "0.1",
+    version = "0.1.1",
     description = "django generic sms through gateway",
     url = "http://bitbucket.org/schinckel/django-sms-gateway",
     author = "Matthew Schinckel",
 @csrf_exempt
 def update_delivery_status(request):
     logger.debug("Status update received. %s" % request.GET)
-
+    
+    # If this request was 'empty', it was a ping test by the server.
+    if not request.GET:
+        return HttpResponse("OK")
+        
     data = {}
     for k,v in request.GET.items():
         if isinstance(v, list) and len(v) == 1: