#31739: Document dependency between HttpRequest stream IO methods and body.
-------------------------------------+-------------------------------------
     Reporter:  Adam (Chainz)        |                    Owner:  nobody
  Johnson                            |
         Type:                       |                   Status:  new
  Cleanup/optimization               |
    Component:  Documentation        |                  Version:  master
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):

 * component:  HTTP handling => Documentation
 * easy:  1 => 0
 * stage:  Unreviewed => Accepted


Comment:

 I'm not entirely convinced here...

 * It's a bit generous to say `RequestDataTooBig` is documented. It's
 mentioned, yes, but...
 * IMO `request's data stream` is clear enough, since you're using the
 stream IO API (`read()` &co.)
 * Part of this stuff is undocumented because internal no?

 But I guess we could add a note to the
 [https://docs.djangoproject.com/en/3.0/ref/request-
 response/#django.http.HttpRequest.read `HttpRequest.read()` docs] saying
 something like, "if read() is used prior to accessing body, body will no
 longer be available." The body docs link to `read()` saying "see more",
 but then there's nothing said so some expansion might be good.

 (Given that all the stream IO methods have the same issue, perhaps the
 note needs to be in the `body` docs.)

-- 
Ticket URL: <https://code.djangoproject.com/ticket/31739#comment:2>
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/068.af71a74f4781aaf334b2543d49cd9742%40djangoproject.com.

Reply via email to