# HG changeset patch # User Jeff Hammel # Date 1350427334 25200 # Node ID 65d0a115386456101d6f02ec66cebe79170d783f # Parent 0a7bf7e708883b1c1c2fc325928d0407da9f5013 a stub that sorta does something diff -r 0a7bf7e70888 -r 65d0a1153864 dogdish/dispatcher.py --- a/dogdish/dispatcher.py Wed Oct 10 16:31:28 2012 -0700 +++ b/dogdish/dispatcher.py Tue Oct 16 15:42:14 2012 -0700 @@ -2,6 +2,7 @@ """ dogdish +https://bugzilla.mozilla.org/show_bug.cgi?id=800118 """ import sys @@ -34,7 +35,7 @@ body = """ - + """ @@ -43,8 +44,20 @@ return request.method == 'GET' def __call__(self): + body = self.body + query = {} + dogfood_id = self.request.GET.get('dogfood_id') + if dogfood_id: + query['dogfood_id'] = dogfood_id + + # build query string + if query: + query = '?' + '&'.join(['%s=%s' % (key, value) for key, value in query.items()]) + else: + query = '' + return Response(content_type='text/xml', - body=self.body) + body=body % query) class Dispatcher(object): @@ -83,6 +96,7 @@ app = Dispatcher() + print "http://localhost:%s/" % options.port server = simple_server.make_server(host='0.0.0.0', port=options.port, app=app) server.serve_forever()