Removed Py2 svn-package settings, and added a patch for request_profiler.

- Legacy-Id: 17665
This commit is contained in:
Henrik Levkowetz 2020-04-20 17:51:47 +00:00
parent a99a4a3d3a
commit 8ec63ca0e1
2 changed files with 26 additions and 2 deletions

View file

@ -995,8 +995,8 @@ TRAC_CREATE_ADHOC_WIKIS = [
]
SVN_PACKAGES = [
"/usr/lib/python2.7/dist-packages/svn",
"/usr/lib/python2.7/dist-packages/libsvn",
"/usr/lib/python/dist-packages/svn",
"/usr/lib/python3.6/dist-packages/libsvn",
]
TRAC_ENV_OPTIONS = [
@ -1064,6 +1064,7 @@ SILENCED_SYSTEM_CHECKS = [
CHECKS_LIBRARY_PATCHES_TO_APPLY = [
'patch/fix-django-unicode-comparison-bug.patch',
'patch/fix-unidecode-argument-warning.patch',
'patch/fix-request-profiler-streaming-length.patch',
]
if DEBUG:
try:

View file

@ -0,0 +1,23 @@
--- request_profiler/models.py.old 2020-04-20 13:39:17.844147379 +0200
+++ request_profiler/models.py 2020-04-20 13:39:50.749093653 +0200
@@ -181,7 +181,7 @@
"""Extract values from HttpRequest and store locally."""
self.request = request
self.http_method = request.method
- self.request_uri = request.path
+ self.request_uri = request.path[:200]
self.query_string = request.META.get("QUERY_STRING", "")
self.http_user_agent = request.META.get("HTTP_USER_AGENT", "")[:400]
# we care about the domain more than the URL itself, so truncating
@@ -206,7 +206,10 @@
"""Extract values from HttpResponse and store locally."""
self.response = response
self.response_status_code = response.status_code
- self.response_content_length = len(response.content)
+ if hasattr(response, 'content'):
+ self.response_content_length = len(response.content)
+ else:
+ self.response_content_length = -1
return self
def stop(self):