Skip to content

Commit 8ec63ca

Browse files
committed
Removed Py2 svn-package settings, and added a patch for request_profiler.
- Legacy-Id: 17665
1 parent a99a4a3 commit 8ec63ca

File tree

2 files changed

+26
-2
lines changed

2 files changed

+26
-2
lines changed

ietf/settings.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -995,8 +995,8 @@ def skip_unreadable_post(record):
995995
]
996996

997997
SVN_PACKAGES = [
998-
"/usr/lib/python2.7/dist-packages/svn",
999-
"/usr/lib/python2.7/dist-packages/libsvn",
998+
"/usr/lib/python/dist-packages/svn",
999+
"/usr/lib/python3.6/dist-packages/libsvn",
10001000
]
10011001

10021002
TRAC_ENV_OPTIONS = [
@@ -1064,6 +1064,7 @@ def skip_unreadable_post(record):
10641064
CHECKS_LIBRARY_PATCHES_TO_APPLY = [
10651065
'patch/fix-django-unicode-comparison-bug.patch',
10661066
'patch/fix-unidecode-argument-warning.patch',
1067+
'patch/fix-request-profiler-streaming-length.patch',
10671068
]
10681069
if DEBUG:
10691070
try:
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
--- request_profiler/models.py.old 2020-04-20 13:39:17.844147379 +0200
2+
+++ request_profiler/models.py 2020-04-20 13:39:50.749093653 +0200
3+
@@ -181,7 +181,7 @@
4+
"""Extract values from HttpRequest and store locally."""
5+
self.request = request
6+
self.http_method = request.method
7+
- self.request_uri = request.path
8+
+ self.request_uri = request.path[:200]
9+
self.query_string = request.META.get("QUERY_STRING", "")
10+
self.http_user_agent = request.META.get("HTTP_USER_AGENT", "")[:400]
11+
# we care about the domain more than the URL itself, so truncating
12+
@@ -206,7 +206,10 @@
13+
"""Extract values from HttpResponse and store locally."""
14+
self.response = response
15+
self.response_status_code = response.status_code
16+
- self.response_content_length = len(response.content)
17+
+ if hasattr(response, 'content'):
18+
+ self.response_content_length = len(response.content)
19+
+ else:
20+
+ self.response_content_length = -1
21+
return self
22+
23+
def stop(self):

0 commit comments

Comments
 (0)