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

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

Issue 14125010: Docserver: Add support for viewing docs with a codereview patch applied (Closed) Base URL: https://src.chromium.org/svn/trunk/src/
Patch Set: add executable bits for tests 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/servlet.py
diff --git a/chrome/common/extensions/docs/server2/servlet.py b/chrome/common/extensions/docs/server2/servlet.py
index 9618bbddb1fe0ffdaf3329a748063f515046d99f..f9af7447f0e64df91b08e2d324e9055ebb7c301c 100644
--- a/chrome/common/extensions/docs/server2/servlet.py
+++ b/chrome/common/extensions/docs/server2/servlet.py
@@ -100,6 +100,11 @@ class Response(object):
def SetStatus(self, status):
self.status = status
+ def GetRedirect(self):
+ if self.headers.get('Location') is None:
+ return (None, None)
+ return (self.headers.get('Location'), self.status == 301)
+
def __repr__(self):
return 'Response(content=%s bytes, status=%s, headers=%s entries)' % (
len(self.content), self.status, len(self.headers.keys()))

Powered by Google App Engine
This is Rietveld 408576698