AsyncRead + !AsyncSeek
sized response body?
#2415
-
Hello! I have a body type that is |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
No, it is not possible as this would allow for trivially creating "sized" bodies with sizes that don't correspond to the actual body size, confusing clients, violating the HTTP spec, and potentially causing all sorts of security issues. From RFC9110:
I am not certain how you could know the size of your stream in advance, unless you control the CGI script and you account for all possible faults. But if you do happen to know, and the size is small enough, then you may want to read into a |
Beta Was this translation helpful? Give feedback.
No, it is not possible as this would allow for trivially creating "sized" bodies with sizes that don't correspond to the actual body size, confusing clients, violating the HTTP spec, and potentially causing all sorts of security issues. From RFC9110: