From f598ece34290ebbfca8d246c0829c0310f728108 Mon Sep 17 00:00:00 2001
From: Colin Davis
or http://robohash.org/620050a4db5104bae758cd75171d64ca?gravatar=hashed
Both traditional and new Stealthy (https) robots are available.
+We've also conditioned our robots to accept commands either via params or directories-
For instance http://127.0.0.1:8080/set_set3/bgset_bg1/3.14159?size=500x500
Finally, the Blueprints are available to build your own robotic factory.
diff --git a/webfront.py b/webfront.py index a3be2ca..5c5192d 100755 --- a/webfront.py +++ b/webfront.py @@ -230,16 +230,16 @@ class ImgHandler(tornado.web.RequestHandler): args[k] = args[k][0] else: args[k] = "" - + + # IF, and Only IF, there is an arg in the list, should we interpret slashes as params split = string.split('/') - if len(split) > 0: - string = split[0] - if len(split) > 1: - for str in split[1::]: + for str in split: b = str.encode('ascii','ignore').split('_') if len(b) == 2: - args[b[0]] = b[1] + if b[0] in ['gravatar','ignoreext','size','set','bgset']: + args[b[0]] = b[1] + string = split[len(split)-1] colors = ['blue','brown','green','grey','orange','pink','purple','red','white','yellow'] sets = ['set1','set2','set3']