Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2870)

Unified Diff: chrome/common/extensions/docs/server2/app_engine_handler.py

Issue 15009006: Docserver: refactor Servlet, ObjectStore, and ServerInstance architecture to (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cduvall, redirect fix Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/docs/server2/app_engine_handler.py
diff --git a/chrome/common/extensions/docs/server2/app_engine_handler.py b/chrome/common/extensions/docs/server2/app_engine_handler.py
new file mode 100644
index 0000000000000000000000000000000000000000..941e8344a19d54002d57849e294f46998e28f83b
--- /dev/null
+++ b/chrome/common/extensions/docs/server2/app_engine_handler.py
@@ -0,0 +1,20 @@
+# Copyright 2013 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+from appengine_wrappers import webapp
+from handler import Handler
+from servlet import Request
+
+class AppEngineHandler(webapp.RequestHandler):
+ '''Top-level handler for AppEngine requests. Just converts them into our
+ internal Servlet architecture.
+ '''
+ def get(self):
+ request = Request(self.request.path,
+ self.request.url[:-len(self.request.path)],
+ self.request.headers)
+ response = Handler(request).Get()
+ self.response.out.write(response.content.ToString())
+ self.response.headers.update(response.headers)
+ self.response.status = response.status

Powered by Google App Engine
This is Rietveld 408576698