For example, if I test a view at `/my-view/` that redirects to
`https://example.com`, the test client will instead redirect to `/my-
view/`.
Presumably this isn't intended behaviour but feel free to correct me.
--
Ticket URL: <https://code.djangoproject.com/ticket/32790>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* owner: nobody => tomhamiltonstubber
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/32790#comment:1>
Comment (by tomhamiltonstubber):
PR https://github.com/django/django/pull/14457
--
Ticket URL: <https://code.djangoproject.com/ticket/32790#comment:2>
* stage: Unreviewed => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/32790#comment:3>
* stage: Ready for checkin => Unreviewed
Comment:
You shouldn't accept or mark as RFC your own tickets/PRs.
--
Ticket URL: <https://code.djangoproject.com/ticket/32790#comment:4>
* 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>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/32790#comment:6>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"1e5aa8e1c79252cc810af21294a6e945d11d37b3" 1e5aa8e1]:
{{{
#!CommitTicketReference repository=""
revision="1e5aa8e1c79252cc810af21294a6e945d11d37b3"
Fixed #32790 -- Ensured test Client handles redirects to domain indexes
without a specified trailing slash.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/32790#comment:7>