[wp-trac] [WordPress Trac] #16236: Method to stream file downloads in HTTP API, to reduce update memory footprint
WordPress Trac
wp-trac at lists.automattic.com
Sun Jan 16 00:24:59 UTC 2011
#16236: Method to stream file downloads in HTTP API, to reduce update memory
footprint
----------------------------+-----------------------------
Reporter: markjaquith | Owner:
Type: task (blessed) | Status: new
Priority: normal | Milestone: Future Release
Component: HTTP | Version:
Severity: normal | Resolution:
Keywords: 3.2-early |
----------------------------+-----------------------------
Changes (by dd32):
* keywords: => 3.2-early
* component: General => HTTP
Old description:
New description:
Method to stream file downloads in HTTP API, to reduce update memory
footprint
--
Comment:
fsockopen, fopen: `fread()+fwrite()` loop, easy
streams: `stream_copy_to_stream($http_handle, $new_file_handle);`
HTTP Extension: I cant see a case there which allows for streaming
directly to files, So will probably have to read into memory, and write it
out.
cURL: Can use `CURLOPT_FILE` to specify where to write the output,
`CURLOPT_WRITEHEADER` or `CURLOPT_HEADERFUNCTION` should be able to be
used to capture the header data
Some of the classes might be able to be unset or destroyed better to
decrease memory usage after a request is made.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/16236#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list