#26726 closed defect (bug) (fixed)
Limiting response size doesn't work when streaming a file with cURL
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 4.1 | Priority: | normal |
| Severity: | normal | Version: | 3.6 |
| Component: | HTTP API | Keywords: | |
| Focuses: | Cc: |
Description
The functionality for limiting the response size from an HTTP request was introduced in #23472
However, it doesn't work when stream is set to true and cURL is the transport. I've attached a plugin that'll try to limit the response to 32KB and stream an MP3 to a temporary file. Currently, it downloads the whole file
The attached patch should fix the behavior when using cURL, but I haven't tested the other transports.
Attachments (3)
Change History (8)
Note: See
TracTickets for help on using
tickets.
$this->bytes_written_total .= $bytes_written;should probably be+=but other than that, looks sane to me.Streams should work as-is already by the looks of it.