#34694 closed Bug (worksforme)

trailing slash is not appending

Reported by: davidhdpro Owned by: nobody
Component: Core (URLs) Version: 4.2
Severity: Normal Keywords: trailing slash
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Up to version 4.1.9 all is good,
but with 4.2 and higher if there is no slash in the end of URL - 404 returned
Slash not being appended even though CommonMiddleware is set in settings.py and APPEND_SLASH = True has no effect too

Change History (4)

comment:1 by Mariusz Felisiak, 17 months ago

Resolution: worksforme
Status: newclosed

Thanks for the report, however it works for me. Please use one of support channels where folks will help you debug your issue.

comment:2 by Muhammad Soban Javed, 13 months ago

I am also facing this issue. Not appearing on dev env but facing this on production and staging instance.

[2023-11-01 17:31:26 +0000] [22] [INFO] GET /heartbeat
[2023-11-01 17:31:26 +0000] [22] [ERROR] Error handling request /heartbeat
Traceback (most recent call last):
  File "/edx/app/venvs/venv/lib/python3.8/site-packages/django/core/handlers/exception.py", line 55, in inner
    response = get_response(request)
  File "/edx/app/venvs/venv/lib/python3.8/site-packages/django/core/handlers/base.py", line 181, in _get_response
    callback, callback_args, callback_kwargs = self.resolve_request(request)
  File "/edx/app/venvs/venv/lib/python3.8/site-packages/django/core/handlers/base.py", line 313, in resolve_request
    resolver_match = resolver.resolve(request.path_info)
  File "/edx/app/venvs/venv/lib/python3.8/site-packages/newrelic/hooks/framework_django.py", line 605, in wrapper
    return _wrapped(*args, **kwargs)
  File "/edx/app/venvs/venv/lib/python3.8/site-packages/newrelic/hooks/framework_django.py", line 593, in _wrapped
    result = wrapped(path)
  File "/edx/app/venvs/venv/lib/python3.8/site-packages/django/urls/resolvers.py", line 702, in resolve
    raise Resolver404({"tried": tried, "path": new_path})
django.urls.exceptions.Resolver404: {'tried': [[<URLPattern 'heartbeat/' [name='heartbeat']>], 'path': 'heartbeat'}

comment:3 by Muhammad Soban Javed, 13 months ago

Resolution: worksforme
Status: closednew

comment:4 by Natalia Bidart, 13 months ago

Resolution: worksforme
Status: newclosed

Hello, thanks for your interest in making Django better.

As before, I can't reproduce your issue, but a quick search on the internet returned this result that may be useful for you:

If you need further support, please refer to the User Support channels for further assistance.

Thank you!

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