[wp-trac] [WordPress Trac] #22913: Files "corrupted" when streamed to file via HTTP API
WordPress Trac
noreply at wordpress.org
Fri Apr 12 01:09:21 UTC 2013
#22913: Files "corrupted" when streamed to file via HTTP API
--------------------------+---------------------
Reporter: samthorne | Owner:
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 3.6
Component: HTTP | Version: 3.2
Severity: normal | Resolution: fixed
Keywords: |
--------------------------+---------------------
Changes (by jondaley):
* cc: jondaley (added)
* status: new => closed
* resolution: => fixed
Comment:
I've run into this bug with SimplePress. I'm not sure when it broke - an
upgrade of PHP or cURL? But, I've just spent an hour or two poking
through simple press's code and then finally ending up in WP_HTTP.
I am not behind a proxy, but perhaps simplepress.com is?
The upgrade file is being streamed directly to a file, and since
RETURNTRANSFER is set to true, curl_exec returns "1", so $theBody = '',
and so the decompress() function is run on empty data.
The problem is that when I request:
http://simple-press.com/download-manager.php?id=644&wpupdate=1
with WP_Http, I get a gzipped PKzip file!
If I use curl or wget on the same URL, I get the expected PKzipped file,
so I'm not sure where the extra gzip is happening (or maybe curl and wget
are silently gunzipping it for me).
simplepress's .xml file is gunzipped appropriately (maybe it isn't being
'stream'ed, I didn't check, but it is downloaded fine, just the .zip files
are left gzipped.
In any case, I've downloaded revision 23602 of class-http.php and replaced
the version in wordpress 3.5.1 (and commented out the wp_is_writable to
avoid an error).
And my download now works. Thanks!
--
Ticket URL: <http://core.trac.wordpress.org/ticket/22913#comment:15>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list