rdegges/django-twilio — pull request #20 by madflo (2013-02-24 11:02:05+00:00)
Title: uses Django's own build_absolute_uri method, even when proxified

As discussed in the issue #13, the test introduced in the PR #17 does not work with my production env where request.META['REQUEST_URI'] is non-existent.

Django already has the relevant information built in request.build_absolute_uri() - at least in Django 1.4.x :

https://github.com/django/django/blob/stable/1.4.x/django/http/__init__.py

- the http/https is already handled by ``HttpRequest.is_secure()``
- the host/domain name is provided by ``HttpRequest.get_host()`` and it's
already proxy-compatible with HTTP_X_FORWARDED_HOST
- the document path is processed by ``HttpRequest.path``

I would suggest that we go back to the standard Django way of computing the original url.