# $Id$ # $URL$ def main(Body='', arguments={}, Headers={}, *args, **kwargs): if Body: arguments = parse_qs(Body) recordId = arguments.get('recordId', [None])[0] value = int(arguments.get('value', [0])[0]) if recordId and value: do.rateRecord(recordId, value) cookie = any.addRecordToList(Headers, recordId) yield "HTTP/1.0 302 Found\r\n" if cookie: yield cookie yield '\r\n' yield "Location: %s\r\n\r\n" % Headers.get('Referer', '/')