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

Side by Side Diff: chrome/common/extensions/docs/server2/servlet.py

Issue 14273035: Docserver: refactor the Handler/ServerInstance relationship into a servlet (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 class Servlet(object):
6 def __init__(self, path, request, response):
7 self._path = path
8 self._request = request
9 self._response = response
10
11 def Get(self):
12 raise NotImplemented()
13
14 def Redirect(self, url):
15 if not url.startswith('/'):
16 url = '/%s' % url
17 self._response.status = 302
18 self._response.headers['Location'] = url
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698