[tor-commits] [bridgedb/master] Fix Accept-Lang: header log message to actually log the top five LC codes.

isis at torproject.org isis at torproject.org
Tue Feb 4 00:28:48 UTC 2014


commit 6b585fcbac636c035424f77c8a5f1f41a64bb474
Author: Isis Lovecruft <isis at torproject.org>
Date:   Tue Jan 28 17:25:45 2014 +0000

    Fix Accept-Lang: header log message to actually log the top five LC codes.
---
 lib/bridgedb/HTTPServer.py |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/bridgedb/HTTPServer.py b/lib/bridgedb/HTTPServer.py
index ddac918..65702ba 100644
--- a/lib/bridgedb/HTTPServer.py
+++ b/lib/bridgedb/HTTPServer.py
@@ -527,7 +527,7 @@ def setLocaleFromRequestHeader(request):
     localedir = os.path.join(os.path.dirname(__file__), 'i18n/')
     langs = headers.parseAcceptLanguage(header)
     ## XXX the 'Accept-Language' header is potentially identifying
-    logging.debug("Client Accept-Language (top 5): %s" % langs[:4])
+    logging.debug("Client Accept-Language (top 5): %s" % langs[:5])
 
     try:
         language = gettext.translation("bridgedb", localedir=localedir,





More information about the tor-commits mailing list