#32790: Django test client redirecting to URLs without a trailing slash
redirects
instead to the current view
-------------------------------------+-------------------------------------
Reporter: Tom Hamilton | Owner: Tom
Stubber | Hamilton Stubber
Type: Bug | Status: assigned
Component: Testing framework | Version: 3.2
Severity: Normal | Resolution:
Keywords: Test client | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):
* stage: Unreviewed => Accepted
Comment:
I think this is probably valid. I su
[https://datatracker.ietf.org/doc/html/rfc2616#section-3.2.2 RFC 2616
(HTTP/1.1) has this for an HTTP URL]:
{{{
http_URL = "http:" "//" host [ ":" port ] [ abs_path [ "?" query ]]
}}}
It then says:
> If the abs_path is not present in the URL, it MUST be given as "/" when
used as a Request-URI for a resource.
i.e. the client MUST treat `https://example.com` as
`https://example.com/`.
(Inclined towards thinking this should probably apply to the `Location`
headers **set by the server** too, but the test client can't control for
that.)
--
Ticket URL: <https://code.djangoproject.com/ticket/32790#comment:5>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/076.5a0d03f4518f620be1d18a5bf500660d%40djangoproject.com.