Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#10401 closed (duplicate)

Very long URL cause django error.

Reported by: bigmonkey.bigmonkey@… Owned by: nobody
Component: HTTP handling Version: 1.0
Severity: Keywords: handler404
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


I have configed the right handler404 for pages mismatching all the regular expressions in and it often worked fine.

However when I entered a very long URLs with characters more than 250, the folloing error information would be listed:
Traceback (most recent call last):

File "/var/lib/python-support/python2.5/django/core/servers/", line 277, in run

self.result = application(self.environ, self.start_response)

File "/var/lib/python-support/python2.5/django/core/servers/", line 634, in call

return self.application(environ, start_response)

File "/var/lib/python-support/python2.5/django/core/handlers/", line 239, in call

response = self.get_response(request)

File "/var/lib/python-support/python2.5/django/core/handlers/", line 67, in get_response

response = middleware_method(request)

File "/var/lib/python-support/python2.5/django/middleware/", line 125, in process_request

cache_key = get_cache_key(request, self.key_prefix)

File "/var/lib/python-support/python2.5/django/utils/", line 163, in get_cache_key

headerlist = cache.get(cache_key, None)

File "/var/lib/python-support/python2.5/django/core/cache/backends/", line 25, in get

val = self._cache.get(smart_str(key))

File "/var/lib/python-support/python2.5/", line 619, in get


File "/var/lib/python-support/python2.5/", line 886, in check_key


MemcachedKeyLengthError: Key length is > 250

The above exception should be handled and be taken by handler404.

Moreover, I test, when I checked, it gave me the right 404 page.

But, When I visited

My platform is FreeBSD 6.2, python 2.5.2, django 1.0.2.

Change History (2)

comment:1 Changed 7 years ago by jacob

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #10016

comment:2 Changed 7 years ago by bigmonkey.bigmonkey@…

Oh, I am sorry to take a duplicate ticket.

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