I was thinking of a "Note" box with a text like:
"Django discourages mixing HTTP and HTTPS on the same domain. Therefore,
`build_absolute_uri` will always generate an absolute URI with the same
scheme the current request has."
--
Ticket URL: <https://code.djangoproject.com/ticket/24460>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* component: Uncategorized => HTTP handling
* needs_tests: => 0
* version: 1.7 => master
* easy: 0 => 1
* keywords: => build_absolute_uri
* needs_docs: => 1
* type: Uncategorized => Cleanup/optimization
--
Ticket URL: <https://code.djangoproject.com/ticket/24460#comment:1>
* component: HTTP handling => Documentation
* stage: Unreviewed => Accepted
Comment:
As we discussed, this seems like a good idea to me. I would change it to
passive tense though, as the "Django recommends ..." looks a little odd to
me. Site also seems more appropriate than domain to me. So I suggest:
`Mixing HTTP and HTTPS on the same site is discouraged.`
--
Ticket URL: <https://code.djangoproject.com/ticket/24460#comment:2>
Comment (by bpeschier):
I agree with Erik, otherwise the question "why does Django discourage it?"
arises quickly. Referencing some documentation about why it is a bad idea
might be a nice addition.
--
Ticket URL: <https://code.djangoproject.com/ticket/24460#comment:3>
Comment (by rednaw):
I couldn't find a good website where they explain the disadvantages
clearly, and I think the explanation is maybe a bit too much to add in
this part of the documentation. It could maybe be added somewhere else and
linked to it, but I wouldn't know a good spot right of the top of my head
now.
--
Ticket URL: <https://code.djangoproject.com/ticket/24460#comment:4>
Comment (by rednaw):
Created a pull request for this:
https://github.com/django/django/pull/4278
--
Ticket URL: <https://code.djangoproject.com/ticket/24460#comment:5>
* needs_docs: 1 => 0
* has_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/24460#comment:6>
* status: new => assigned
* owner: nobody => rednaw
--
Ticket URL: <https://code.djangoproject.com/ticket/24460#comment:7>
* needs_better_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/24460#comment:8>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"794c3f74c32062d0f2ad021cb2af0e530b40730d"]:
{{{
#!CommitTicketReference repository=""
revision="794c3f74c32062d0f2ad021cb2af0e530b40730d"
Fixed #24460 -- Extended HttpRequest.build_absolute_uri documentation
Added explanation on why build_absolute_uri always enforces the
request's scheme.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/24460#comment:9>