SOPA Protest in Google App Engine

Just for trivia, this is how I implemented the SOPA protest page yesterday.

class Sopa(webapp.RequestHandler):
  """Handler for 503 protest Sopa response."""
  def get(self):
    self.response.set_status(503, 'Service Unavailable')
      '<p><b>503: Service Unavailable</b></p>' +
      '<p> is not available today in protest with ' +
      'the <a href=\"\>>Stop Online Piracy Act ' +

This would work for any simple Python wsgi Google App Engine application

def main():
  application = webapp.WSGIApplication([('\.*', Sopa)], debug = False)
Written on January 19, 2012