#32580: Document that HttpRequest.get_host() can raise DisallowedHost
-------------------------------------+-------------------------------------
               Reporter:  Chris      |          Owner:  nobody
  Jerdonek                           |
                   Type:             |         Status:  new
  Cleanup/optimization               |
              Component:  HTTP       |        Version:  3.1
  handling                           |
               Severity:  Normal     |       Keywords:  HttpRequest
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 The Django docs currently don't mention that `HttpRequest.get_host()` can
 raise `DisallowedHost`:

 docs: https://docs.djangoproject.com/en/3.1/ref/request-
 response/#django.http.HttpRequest.get_host

 code:
 
https://github.com/django/django/blob/41e6b2a3c5e723256506b9ff49437d52a1f3bf43/django/http/request.py#L130-L135

 I think it would be helpful to mention that so people using the method can
 know to think about whether they need to handle that case.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32580>
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/052.d9b9f0479eb76e1db7a68575f465d82f%40djangoproject.com.

Reply via email to