Opened 13 years ago

Closed 13 years ago

#392 closed defect (fixed)

django sets up memcache incorrectly when arguments are given

Reported by: adrian@… Owned by: Jacob
Component: Core (Cache system) Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


If your settings file is specifying a cache backend and giving arguments after the '?' you will see errors like this:

MemCache: connect: Name or service not known. Marking dead.

This is because the '' is not trimmed correctly when there is a '?' in CACHE_BACKEND. Here is a patch:

Index: django/core/
--- django/core/        (revision 544)
+++ django/core/        (working copy)
@@ -243,7 +243,7 @@
     qpos = rest.find('?')
     if qpos != -1:
         params = dict(parse_qsl(rest[qpos+1:]))
-        host = rest[:qpos]
+        host = rest[2:qpos]
         params = {}
     if host.endswith('/'):

Change History (1)

comment:1 Changed 13 years ago by Adrian Holovaty

Resolution: fixed
Status: newclosed

Fixed in [598].

Note: See TracTickets for help on using tickets.
Back to Top